From patchwork Mon Feb 27 11:39:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2740 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 8D6713F9C2 for ; Mon, 27 Feb 2023 12:39:39 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id n11-20020a63e04b000000b004fac0fa0f9esf1772309pgj.19 for ; Mon, 27 Feb 2023 03:39:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677497978; cv=pass; d=google.com; s=arc-20160816; b=JrPVHFZ/pijO0evIhngeYZrcwaJZPICiPj2OcsasoAeenT881K93MqrrB3KUHnn43j a8+LDL53YXa9az55QsudI9r7AGKSX90Og9/ASNzj+a7OTheSFRq3pmLffr6nb+ixUDGY 8GDUDALuI9aI7lfh4vn1mEBW0BSCJXyG7V8VkyBYbWRjTSn3KmXqUgS87ZktrNbhLx2F 2/u5isHs9tjGYUavuOvCC3aSDj/VYJIn0n24gKK4RtLGEF1falsW3s7sepZ9ZhibajWa 195cvazBJQfrgzfzY4pK1XmWmqmAIb27IVI96/yUFVApL2A5ErWeZBumDcpa8vfa5W0/ 80og== 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=gjUr2PUKSPLf46tPzA1+KOIUHELV2QZ4pgkSERI3174=; b=ChOf7Jt+XW3vVEvmInqufxZ/j2zyVMLKRY5sfQ6rU1E0if8q6ovbwhhIRs3aIHURlC vylU1MQRS8UYTL+JX+VUPaZYDfjiJC56Z8AJXENt1vSEhLNP3GUKcSIb9kaMVlQVKbeX UW8ibQQLn0OKo1lDxdvFVJbXcC7eoAZpPVD6pMSzEH3fDPMQwosb6iiW13Py5EuYum04 cwOuWW/+Zz91gxTO3AgKwQeCuiDrcH32j1jQ4/11TOrtxoqfGhm/SJOF/nn7VSg5vr86 PUWJQAyryA+Fy2yClFfpYqWu6b7m7UfzF+1bYb33ck6s3oqagJ5eMAy7Dhe7CZy3l5EB aMEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="E/TKChr6"; 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=gjUr2PUKSPLf46tPzA1+KOIUHELV2QZ4pgkSERI3174=; b=irHWmb8un+W9tv5V3IFsCwZJUYIIGuJkSYlBTFwgC96Xn7P/N5EP/3RMT5F+ge/Zra Xn3p89zVQsDU3fwIzsnz3ze+sNAjcWZgMfcO5DGBd8PEzoWh4N9zQ4T0CdXFuf2yKKTE c2jQX4TRq2xzhHnvIJ1uNCuzwmXz0MkBkYN+Y= 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=gjUr2PUKSPLf46tPzA1+KOIUHELV2QZ4pgkSERI3174=; b=iaE7NM4TvpyDWIfc07H88I1kcaXai4gtdHNGxD23+pDeNDubffIXyvH1fhJtqlyErW rBIq3ViTdbBFXN+63npp/DmMRYaFioZLJv2GM7q8len9/Iz3iA9mU7+1Gr15jtuDu3UF cRV3uOUcmACZV4t713fw7jS9uLZS1Aas2+ktPvn8GPWXxmfNsXS7G4B+yfwZ2bXdHj4j sKXSLZcv+2/4D1i2e6DvvDU1wU6PL0QRLGSn/vuGOKZPua2c4PC5rYyRxi9SOkAnT7ji blsP3ZX5R4x81V1N3JiCGMaHkTwn+kU7tW1Z6XhEWIgkU0wgrTmzh5mFs7e4fwQTFu59 AEJA== X-Gm-Message-State: AO0yUKWheTYLR/ivWWStopy8nAp76tPKWLfkQWr2aDr8NZcK3hNzCLEa ltlc8CfJXKnrqvf91lqIjQCf+bGx X-Google-Smtp-Source: AK7set81g1rQrKVNCDOvlwi9RGGWxTjAseqxFWDTi/eWMFbxlLt5SlUaClXuIfWBJZ9cfAWaeIlRJA== X-Received: by 2002:a63:7555:0:b0:4fd:4602:1b9a with SMTP id f21-20020a637555000000b004fd46021b9amr5880173pgn.9.1677497978171; Mon, 27 Feb 2023 03:39:38 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:d50d:b0:199:50f5:6729 with SMTP id b13-20020a170902d50d00b0019950f56729ls10423686plg.11.-pod-prod-gmail; Mon, 27 Feb 2023 03:39:37 -0800 (PST) X-Received: by 2002:a17:902:7408:b0:19c:ff35:35d1 with SMTP id g8-20020a170902740800b0019cff3535d1mr5501785pll.6.1677497977240; Mon, 27 Feb 2023 03:39:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677497977; cv=none; d=google.com; s=arc-20160816; b=bnigNkXpX+x9q72qD9dJ4V+ZKAYnPkrzLI4+jP3iYZGIJaPQZ1hnVaVZkKawno9fGP oi642Xn/3nsu5jCNAlPMgwPCoXZUJ536ZJaCVtscMqZ0VWEp7VTRYvyAq7x/Gz2Izdij /vOAqp2wPfU2SFDDupbtqOhhXy+HYjEvihVozfv4NoeIIpFeKV2ortOIIl+MUyJmWEe3 2pEHWppr7OPEkR6s9ICwfGVTiYCbkZN/XagqSkbeZkMNbjX4eRmjAfsCnFAwcTcQ6gEc gKi/qcv3CKI2QC0EwwhvvkN99KWPU9CMRr4hXb8yawgchQhReZxE09tjhDKqav7kgHqk 6rLg== 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=+B+4fWqTJ+kpLsspGC/byjd+RBAKSMPeH8ZfrgeNAFg=; b=YYXkV25kwGHaP+ywkSPcMlI9puJ3RGK4HbjdHE/XQTokuUMZtz1BHXZ1fEctV9v3h1 fCAfOZRtQDpIxXrzC2H8OCwkbjvbB3oiHKlP0UtpXuJij3eEC93y+crzODW4i2TbzF8M tBRsAtGdLC3YBMFJOZON/JgRaLeo70q1y7H5ZUcwRryvSZIECCKczU0LcFr8SKHzDQxk g2WPSyrmPi0CqLhPsc6cxRpZd1xgCBZ+y2u4Y8jjevw8lrfcWLdGjXgaBnyRNjCPvgDu YViF580LXDZX9MXQnQk7EHLtIMrb3c4GWnNDvENrvsroYM9M49WMhR+smW33PEl1r8/J HIGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="E/TKChr6"; 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 d14-20020a170902654e00b0019cb98430b7sor2446963pln.61.2023.02.27.03.39.37 for (Google Transport Security); Mon, 27 Feb 2023 03:39:37 -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:e80f:b0:19a:972a:7cb3 with SMTP id u15-20020a170902e80f00b0019a972a7cb3mr29524107plg.60.1677497976857; Mon, 27 Feb 2023 03:39:36 -0800 (PST) Received: from localhost.localdomain ([94.140.8.120]) by smtp.gmail.com with ESMTPSA id k10-20020a170902ba8a00b0019c919bccf8sm4395277pls.86.2023.02.27.03.39.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 03:39:36 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Laurent Pinchart , 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 v13 00/18] drm: Add Samsung MIPI DSIM bridge Date: Mon, 27 Feb 2023 17:09:07 +0530 Message-Id: <20230227113925.875425-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="E/TKChr6"; 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: find child DSI bridge and panel 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 v13: - remove devm call for DSI panel or bridge finding - rebased on drm-misc-next Changes for v12: - collect RB from Marek V - add te_irq_handler hook - fix comments from Marek V - update atomic_get_input_bus_fmts logic Changes for v11: - collect RB from Frieder Schrempf - collect ACK from Rob - collect ACK from Robert - fix BIT macro replacements - fix checkpatch --strict warnings - fix unneeded commit text - drop extra lines 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://github.com/openedev/kernel/tree/imx8mm-dsi-v13 v11: https://lore.kernel.org/all/20230126144427.607098-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (16): drm: of: Lookup if child node has DSI panel or bridge drm: bridge: panel: Support nodrm case for drmm_panel_bridge_add drm: exynos: dsi: Drop explicit call to bridge detach drm: exynos: dsi: Switch to DSI panel or bridge find helper 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 host helper for te_irq_handler 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 | 7 + drivers/gpu/drm/bridge/samsung-dsim.c | 1933 +++++++++++++++++ drivers/gpu/drm/drm_of.c | 112 +- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1819 +--------------- include/drm/bridge/samsung-dsim.h | 115 + include/drm/drm_of.h | 12 + 11 files changed, 2271 insertions(+), 1752 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h