From patchwork Wed Dec 14 12:58:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2551 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C69A43F0FB for ; Wed, 14 Dec 2022 13:59:31 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id b17-20020a170903229100b00189da3b178bsf2500150plh.7 for ; Wed, 14 Dec 2022 04:59:31 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1671022770; cv=pass; d=google.com; s=arc-20160816; b=PNh61NBxR58pLb6a+edy1Zm8XZBrQneb0k7Kqlce//8CuhwX0qJ7S72vTct8Xx89Je st/CB08jj3YwwavQLOGdsxAG+VyGvfkE3STvrlWtTpOKqhWelIfsVcd4gyA0uM0IWr+O zZoof6lPrhg6L0v91cFgIXIPQOVtCS8cr2BrPo59Mjw7LZJaf4uKIOWmC20eLYs4Nuzw /S/mbmcDWV9K9la/2lW+nMWnWppuwqNu0feGDEkvyzUHQHxLZWgq9hoFMlHoPiUowuHV pZStG26e5zuo4p2atKV8B5m8RzjAvFk+civTVFIADMa/RMP57GeV0f9JRbgw1WSRWQiy 8w5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=+phRUeL1CmuqNJP6DPGX/p3KJQ8mpG/Q1oa27YoVxxQ=; b=iNLP5qQo/zPedoUvF6npDgobN6wgSiuO8l2RqNfRZFxTPy6nTFYYlTM7diZiBYBVJK XduxQ2Ck0K+82UzXyZ5+jfZ3a/k3Qju0/T73iYh4zhs1Dx8FQUmG7Medt1iDSPsrljuo it/feJHlDmOTiHSkPfJcjVCHVj+P5ZZdWyit4o1vQQAej1e+CdE52a7rAJeXIL5r4EXl Op6MyaXW0VZ08jB0AhWPCikfyfrhMgpguYZrBa+DQZLqAQTuckWFood/oQqm21cIa4hC uMGIMYZ0lX3Di0GCdUIyhMVDN2NW0iUjcZysMTS/VzTQ77lOxuSWm8VgogIWxu9lR6FX 39bg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BDQKqJlG; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=+phRUeL1CmuqNJP6DPGX/p3KJQ8mpG/Q1oa27YoVxxQ=; b=b+xzJzX6Fe6hEXIaO/vP1iA4+2oJG53Fw9Xlqj0H+o17Vpknte0z4gNv+TA2Dg/wk3 KCNE3ZojgJ4LP3/kVMok13pmBKkLUCg2exavG8+bMmyq2dHm+O4cxsXRZvy0dlskUO0z fm7B2jxqdWUgcU9TJWcR3tIDTLJvXavD3FKI4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+phRUeL1CmuqNJP6DPGX/p3KJQ8mpG/Q1oa27YoVxxQ=; b=p8WcBfmuQOVsOBeZLcyvmcQtj3kX4+bQEkjZf7RnIZ20BqwZCzmrwMaDyI5YyVw9ns hzrO9o3twZNBw/SPUmDbRavxLump/YFjlS5qT0ugY3Ar3P2Uh/WIpDDbRNSzrs8TuYe0 qoJtXZw5eJlhbBMRSSi+zuJ3r2zGwsZ9TZaRIWmAsPECXB9B0nOH2dk5Rviy1y9ZjNoT LT5YKZ6rfl/ckWd9E8GLI4m/sWIVy7Veh1L2340FxYm7Qe/p9muAx2mp5Tdi7nGbMXEn IuIFmvZ6m8TzdCCtCZUlxxGVhL3sUBtY4X8cPNXst6fpx2A3RQsvejRpIqO7vaeMxICB kIKQ== X-Gm-Message-State: ANoB5pkDFuLHqJ9LJO5k12HLOIE1Sxts6XHOc6CLKS6D5T3LZMYDAAQ+ DE3IxHFCGaHejo+OCf242mALBb9h X-Google-Smtp-Source: AA0mqf6/MjcbAkIgSeNC9kyL+9q53OqQwdwK6CHDApmhh3Dpzk7KYzSf9AHLMyOCTxHhpoP0sOe4/A== X-Received: by 2002:a17:902:ee82:b0:189:6ed3:95ea with SMTP id a2-20020a170902ee8200b001896ed395eamr63377829pld.164.1671022770366; Wed, 14 Dec 2022 04:59:30 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:8a94:b0:218:a5af:5c43 with SMTP id x20-20020a17090a8a9400b00218a5af5c43ls24227118pjn.3.-pod-control-gmail; Wed, 14 Dec 2022 04:59:29 -0800 (PST) X-Received: by 2002:a17:902:6bcc:b0:186:6ae1:5ee with SMTP id m12-20020a1709026bcc00b001866ae105eemr23209759plt.26.1671022769387; Wed, 14 Dec 2022 04:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671022769; cv=none; d=google.com; s=arc-20160816; b=prPuVXf4J0EP1KUnnPRLELNqhlq5BM0AaiQBLD6K+gwBPjPki2swmAHr8HlR4JbWfN GO/c/Q6lnuDDkEBCW4C7iEKs2Bjm65cOrrumiFkRjqx1fm39UOovgo6CDpnLySCHEhqV 5zSUXfBgwQsLJRrO0UGMTLiuFyTEqExrfgPZjDKfGGK/uJZScqBecnkEpssPly5uX6t0 mIS6vsBQiMhzXO/RP5gY9BodxKbKDRrTNo/jl9yaGEQXMOP4Q+HqqC+Au1WHDd4brUYD HJ4uVBugYXvks5J7ciAVyL3Cl9ZcuXgDqFpy/ZaKu3KeztM+kiJLeYmItjkaY3GB+7qg yeFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=p2haNhsWLcMgD3AmvaIqaCyzLC7UhgQLS5K9Rnr78wk=; b=LOcr3D0Tgd4pseqvQg2RUH5yTHpIAALIQHREVseFJZWfJeI7wPXfMIWffCyVmiu+hk OT10a42g2OirNPeNjFONMnm+kGSuojeMCUQODkyNFCxiRoHxUfYR4KIoIJicT+0DbljU yS3b41Yz/JZjSa5lsaGMUi7uroxbXM/iulNMSPM0vu41mB6gqLyCtpATvq4feEUPPDeQ arqldGOzE4FcrL3gwKEBhRigKS132avdJgxh39pmsaVTKts2KDjjzsqp+81Kqux1OP6Z /75wb6sH38wgnhPHjto3I5i4pGoZmNHUBzUNLp85c+aS/BORfiR5T2y5x/KgQ9a8CxTU WVYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BDQKqJlG; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id z10-20020a170902d54a00b00188bc08063fsor1492952plf.46.2022.12.14.04.59.29 for (Google Transport Security); Wed, 14 Dec 2022 04:59:29 -0800 (PST) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:aa47:b0:185:441e:222a with SMTP id c7-20020a170902aa4700b00185441e222amr24954442plr.37.1671022768977; Wed, 14 Dec 2022 04:59:28 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:5e03:faf:846e:352d]) by smtp.gmail.com with ESMTPSA id ix17-20020a170902f81100b001895f7c8a71sm1838651plb.97.2022.12.14.04.59.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Dec 2022 04:59:28 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v10 00/18] drm: Add Samsung MIPI DSIM bridge Date: Wed, 14 Dec 2022 18:28:49 +0530 Message-Id: <20221214125907.376148-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BDQKqJlG; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This series supports common bridge support for Samsung MIPI DSIM which is used in Exynos and i.MX8MM SoC's. The final bridge supports both the Exynos and i.MX8M Mini/Nano/Plus. Patch 0001 - 0004: adding devm_drm_of_dsi_get_bridge Patch 0005 - 0006: optional PHY, PMS_P offset Patch 0007 : introduce hw_type Patch 0008 : fixing host init Patch 0009 : atomic_check Patch 0010 : input_bus_flags Patch 0011 : atomic_get_input_bus_fmts Patch 0012 - 0013: component vs bridge Patch 0014 : DSIM bridge Patch 0015 - 0016: i.MX8M Mini/Nano Patch 0017 - 0018: i.MX8M Plus Changes for v10: - rebase on drm-misc-next - add drm_of_dsi_find_panel_or_bridge - add devm_drm_of_dsi_get_bridge - fix host initialization (Thanks to Marek Szyprowski) - rearrange the tiny patches for easy to review - update simple names for enum hw_type - add is_hw_exynos macro - rework on commit messages Changes for v9: - rebase on drm-misc-next - drop drm bridge attach fix for Exynos - added prepare_prev_first flag - added pre_enable_prev_first flag - fix bridge chain order for exynos - added fix for Exynos host init for first DSI transfer - added MEDIA_BUS_FMT_FIXED - return MEDIA_BUS_FMT_RGB888_1X24 output_fmt if supported output_fmt list is unsupported. - added MEDIA_BUS_FMT_YUYV10_1X20 - added MEDIA_BUS_FMT_YUYV12_1X24 Changes for v8: * fixed comment lines * fixed commit messages * fixed video mode bits * collect Marek Ack * fixed video mode bit names * update input formats logic * added imx8mplus support Changes for v7: * fix the drm bridge attach chain for exynos drm dsi driver * fix the hw_type checking logic Changes for v6: * handle previous bridge for exynos dsi while attaching bridge Changes for v5: * bridge changes to support multi-arch * updated and clear commit messages * add hw_type via plat data * removed unneeded quirk * rebased on linux-next Changes for v4: * include Inki Dae in MAINTAINERS * remove dsi_driver probe in exynos_drm_drv to support multi-arch build * update init handling to ensure host init done on first cmd transfer Changes for v3: * fix the mult-arch build * fix dsi host init * updated commit messages Changes for v2: * fix bridge handling * fix dsi host init * correct the commit messages Tested in Engicam i.Core MX8M Mini SoM. Repo: https://gitlab.com/openedev/kernel/-/commits/imx8mm-dsi-v10 v9: https://lore.kernel.org/all/20221209152343.180139-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (16): drm: of: Lookup if child node has DSI panel or bridge drm: bridge: panel: Add devm_drm_of_dsi_get_bridge helper drm: exynos: dsi: Drop explicit call to bridge detach drm: exynos: dsi: Switch to devm_drm_of_dsi_get_bridge drm: exynos: dsi: Mark PHY as optional drm: exynos: dsi: Add platform PLL_P (PMS_P) offset drm: exynos: dsi: Introduce hw_type platform data drm: exynos: dsi: Add atomic check drm: exynos: dsi: Add input_bus_flags drm: exynos: dsi: Add atomic_get_input_bus_fmts drm: exynos: dsi: Consolidate component and bridge drm: exynos: dsi: Add Exynos based host irq hooks drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge dt-bindings: display: exynos: dsim: Add NXP i.MX8M Mini/Nano support drm: bridge: samsung-dsim: Add i.MX8M Mini/Nano support dt-bindings: display: exynos: dsim: Add NXP i.MX8M Plus support Marek Szyprowski (1): drm: exynos: dsi: Handle proper host initialization Marek Vasut (1): drm: bridge: samsung-dsim: Add i.MX8M Plus support .../bindings/display/exynos/exynos_dsim.txt | 2 + MAINTAINERS | 9 + drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/panel.c | 34 + drivers/gpu/drm/bridge/samsung-dsim.c | 1883 +++++++++++++++++ drivers/gpu/drm/drm_of.c | 113 +- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1793 +--------------- include/drm/bridge/samsung-dsim.h | 119 ++ include/drm/drm_bridge.h | 2 + include/drm/drm_of.h | 12 + 12 files changed, 2285 insertions(+), 1696 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h Acked-by: Dave Stevenson