From patchwork Mon Jan 23 12:23:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2635 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DC2E53F039 for ; Mon, 23 Jan 2023 13:23:37 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id b196-20020a621bcd000000b0058a63dc105esf5183729pfb.6 for ; Mon, 23 Jan 2023 04:23:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674476616; cv=pass; d=google.com; s=arc-20160816; b=ic6NCxf2A9pWuuC4auwMi62Ii910s4d9WVBf6jYzIei+o/Z5s/syoU0FXvzm5bbTLg gBAl3/sxSkd9F4mApWPis6XLffsNqXCjs2G7syhX/Yg62Cvo0XxdtVeSxryOTsSm7xlQ BVeJ6nRt2KPIglQPiDVo3TUpGHKoUMp2Yrotcwc/o9ZBQxzeiOvsFd9xj6aLiPjIQ7pI MbrEvURxqNfhtz31rSYDB6pmGpUapXQ7ImvGW42TK1Sr3yW/7U/aXet6OcKuT9mm8SX6 Sy7gbmwlnNxXPo1dKm21bJvjrZzLaPRdqThxOcTAAe5cN01bwuyRLBmdMlwO8EoHxGtY OVTQ== 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=yLStHsCMnDyFQyJytPV+82IxEG/XS/QYlekzPcaoiGs=; b=mrHnJ6MDKhpqMsbOsGaG95/LZOpweLHd82jMMygvnoAPaAWu5vfs2GiL32j8EcN+eU g5Sl2IIJUw5NO+Rfycr5enrkuB4uTIzi16xXtgr7UORG7co7+1soeu616YbLSHvArORU cNkm4alhk8v6Pw4hrDJ1x67sDdS4xoGsF8a4UPWEXlYIiv1GQfXOYb7Oxv37SqIeo3Nb ddpUJB+BeXTu2X/s9vp8DZkWv2vax4guC6cQTvpep08fTIB9U4fj6EvGnvvOk9Cu0cGq h3XxzKivHadZH1GlAGKl08Q41PIKjabHvxUcc1C/OAch4L+t5EGyDC4nX5MjdfETAzpD tCpA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dHvjQk4f; 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=yLStHsCMnDyFQyJytPV+82IxEG/XS/QYlekzPcaoiGs=; b=Mqo+6iXemp7rbtuLpyyysphIH+OlMZuGh2VCQ0xwux3mfQFMHXNM5+07Oa2QA7TXi9 pM2zmRQ48VIB9GHe1xQZ1xg+vVeT/eOk7EjIzXDrF+8mjsZ5/1Ns9PKTSvdY8nrXTrZI JE0ipi911WEWqY24fSSuamb9rzWm6vB6yykqs= 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=yLStHsCMnDyFQyJytPV+82IxEG/XS/QYlekzPcaoiGs=; b=WLJ+5KOFQDd1jabc87axzPT4XYSo30jNOA5TToUYxcBcSoL+RSSktctof/Q1SkAHTz 1sA04lt63sSTfHzLQE5nxMTHE6RY0WwCBI/AHCEZL1Uyt3IuBJmKTNLaSP3uhzPdoGOV PMfp0bf4Yhu/tQZlfBdAAdKKXmq889OiVqmeJguuRvbnXiHpo/kTtUIu3BKtHrjY5b9s kCodx8L8o5Lv/6uMzf7wA3tHG35mVIKEFUPrNZmLh3UX6udVNPo92VR/J6L6osbKwHIu O1YKZ6N4+MhP6bmV6UKqtQ8z2fuHo5oRUJFUzgVGckR4Mc8a8xJXqsmm8sWMOqoATsvl METg== X-Gm-Message-State: AFqh2koJamJuNfScTlc9Y66g53NotfFj/gM8BX0iHtnZGpQRVC6vdXkw nYkmrfmHSUZgiHtCtT1IfQLHzo3m X-Google-Smtp-Source: AMrXdXu0ewhvZmjP6yWLNJBQFBrUqKfwV7F7e8+AL6nCa4p+0FgWbyY5lWIlxabS3O8mUgDmONS5CQ== X-Received: by 2002:a17:90a:4bcf:b0:229:438e:6189 with SMTP id u15-20020a17090a4bcf00b00229438e6189mr2789124pjl.146.1674476616484; Mon, 23 Jan 2023 04:23:36 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:8c06:b0:210:6f33:e22d with SMTP id a6-20020a17090a8c0600b002106f33e22dls12913464pjo.2.-pod-control-gmail; Mon, 23 Jan 2023 04:23:35 -0800 (PST) X-Received: by 2002:a17:903:1209:b0:189:6f76:9b61 with SMTP id l9-20020a170903120900b001896f769b61mr33857820plh.39.1674476615511; Mon, 23 Jan 2023 04:23:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674476615; cv=none; d=google.com; s=arc-20160816; b=sNvpbdkAUzVfa6IBXs7Bwj7aMpk1DMQhsrKpfveAGeVVZHlP5Il1nuj8DioPe8xe7L w7OLKne0xrO9yLdrEgSJeadOWDYCW8Y5lZfPj7CS/ERvEzKubpBzS4BkCuILnM2EKamu ZIsKq0xilai6hWZ9GracW/fTaQCGx8V8KDStU2UShqz+F+d8Bkqzj5unfrne+vyTdYAf CGrTeORXAF79UL/WtyLkSTy1Px//cXC11Lhnw192F6ZU9JZjGlSOVEsDY0VYNt0qeMq5 UX70rUAhmVDjHjRK/+L3ARHerpXmrReDvRDxHUjYSyJSxhh9UvK7Z7q0zerSqJjRfg+G hN5Q== 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=aIEL5P6p2AgUUtZFiRe5g0PuF0Ki6dnU36M7iQ78QJo=; b=nwDon9B4hKC7VKsBMoGc7MQvlXVm9CpWGmEktGNLrvTgpYvRGWRkDIit718LmRzPgG +aqphYpCkfL3sEah761r/vEVAbsJpHVFdJI5+iDP7u2iVMrlFeaEfP2Eid1dfZiILbQM fawmpAkQuNG+6SbSLlkZHn0yC/yn+Lzho6hpiKEyIWVUFXLTxpVxqgurIm37fWJaczOq 0k3egiZtZ8+jgKwmJtypNJYC21uR3DWLPr66qcaKYJ+panNIJlL4OQi6w8ozmRPVyfXN r74wN2Zsy9TvGmm9vG0LM61UQfD29yfvt8UbohKc3nvaTm+m4qR7lqa+43etNdtf0ONR pPvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dHvjQk4f; 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 t12-20020a170902e1cc00b00189bc07f847sor4399793pla.121.2023.01.23.04.23.35 for (Google Transport Security); Mon, 23 Jan 2023 04:23:35 -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:b083:b0:194:d057:46e5 with SMTP id p3-20020a170902b08300b00194d05746e5mr14536604plr.62.1674476615077; Mon, 23 Jan 2023 04:23:35 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a15f:2279:f361:f93b:7971]) by smtp.gmail.com with ESMTPSA id w10-20020a170902e88a00b001960806728asm1291811plg.88.2023.01.23.04.23.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 04:23:34 -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 v11 00/18] drm: Add Samsung MIPI DSIM bridge Date: Mon, 23 Jan 2023 17:53:01 +0530 Message-Id: <20230123122319.261341-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=dHvjQk4f; 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 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-v11 v10: https://lore.kernel.org/all/20221214125907.376148-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 | 1884 +++++++++++++++++ drivers/gpu/drm/drm_of.c | 112 +- drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1793 +--------------- include/drm/bridge/samsung-dsim.h | 118 ++ include/drm/drm_bridge.h | 2 + include/drm/drm_of.h | 12 + 12 files changed, 2284 insertions(+), 1696 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h