From patchwork Fri Dec 9 15:23:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2519 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1C3653F039 for ; Fri, 9 Dec 2022 16:24:36 +0100 (CET) Received: by mail-pg1-f197.google.com with SMTP id g1-20020a636b01000000b00479222d9875sf692950pgc.12 for ; Fri, 09 Dec 2022 07:24:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599474; cv=pass; d=google.com; s=arc-20160816; b=zDB6+pUu1lQhCR2mIuUy1pOqJJxQmsNAdoCrWRALjWloZW7nYem5egw+y/zzNMPcPL qWESwE3vfrSSjO7vP+K7kcoklyB96j96wuMfO4ZHxc+LT4qsMhPiXFF7vU4yKj37ALQ5 NpSbCIAOTLp5ZzaEotio5XrAN25+shQrA9AHHFVBjfra5KWioAoGOeoYrjIDZDm/UWcK ABsXgsZ7BuXtXifV/knu+LaDYVu58a3gevxMI5/gGcn2NqI/vvpfhZHEgBvtHuArDR1J 6B9frsdWDL84aG0uyi97OlfAJDumdEtrwuumhG9By+Eri3xMPGcIC/BiBJx5TNFFDpaC KK3A== 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=VPdrDvtYN7dJzRPuIi/HNufwju6dnSF1uk//7C+rpjM=; b=ZpVhKUfDZbLESTeAiAqV95a7KaooBzKGq/r5Yn1JrRGxLvciy1ETyiBEuJclpdL083 vpX5fsqFJ3984NyeF514fL9dPXgRAkW46yp4codD3uhpARc8I+htG4ptXVSmalhDbJaK 9LEI3P/p3Ha4tUzMlebiLnI+nu/lMUIHLeoGdNmAhL3OrSrWn5DnFFzQzUSwWnAoDUtV cjeHylyoBFFFPTGzz/94NlVT6c3ripZ4CtO84WcxP1rE3Uynp+pBQ9qNg74G1tyhiTjW dnwonFosv3Qg64bAtAPVtVAUzKE5FPsnEZg8FIYBOxghFwz+PAU7eSddqIu4xvB3cOSm GwFw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YaRRKeW7; 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=VPdrDvtYN7dJzRPuIi/HNufwju6dnSF1uk//7C+rpjM=; b=bepiHNHiw7euAn8bZ+iT1coO5Hi2pnb4U6WmXzQzHAaGVxm5/mu2CWJEsqKUyvB+0/ IKsUxfsf+rub3T/+Vitvb2BW2Y2mQCPu6QYBJnidkHOYZZ82RBmgV2rkBwUM12+ImfzM 9LFxE7iZFVg4jOvB6ccCp1JMXYa1dZzbkFCGs= 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=VPdrDvtYN7dJzRPuIi/HNufwju6dnSF1uk//7C+rpjM=; b=Q8qJvQEyJhii9YtnhKXDrRak3lSIdHOuKu8K1MrdE4Lr5YS5j6V9XPu4Yenx8V2NTV VrkFQqhLyon3DHL+PCMwhbOXv4Ng45qe5K/Udg/aDnjBAXrPGmFs92DP/bESb38AUi1h cOhzFgLZ3KzGxs/bKCFW3jxUXlfG3miPjcVoUhWsFF52LaUd2A9zSogLn2EQMFcGAP+t zI4u6lfDskSL+Yx0fGfSDHLjbD/qA/bXXKY5ZMIVJ7aWj3KGycfGnnbBszLPqXje8QJI SYCS5bJOa28YCd7XI1Cvm8fto1d2aRtY+6UvwFHSfZLpyeWna9q4Y3q5Rs3g9e33ygbw 2y+w== X-Gm-Message-State: ANoB5pnLQuArL9ZCUQkglb7RGOYeuCoG8XfBTO21T8aAPbWI+bR5ValH ONoeEy9OTGhY8Ap6cEOWKMH2ATay X-Google-Smtp-Source: AA0mqf5K3uNp7NzwF1nxLh6hbykiYjog96I9U95SabmPKJABvo6r0AIats+/x/FK07+0Hyv/0qtuVg== X-Received: by 2002:a63:e509:0:b0:474:4380:cca6 with SMTP id r9-20020a63e509000000b004744380cca6mr67525875pgh.229.1670599474684; Fri, 09 Dec 2022 07:24:34 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:ed49:b0:178:3881:c7e3 with SMTP id y9-20020a170902ed4900b001783881c7e3ls8462842plb.11.-pod-prod-gmail; Fri, 09 Dec 2022 07:24:34 -0800 (PST) X-Received: by 2002:a17:902:7c90:b0:188:533e:da22 with SMTP id y16-20020a1709027c9000b00188533eda22mr5667814pll.12.1670599473676; Fri, 09 Dec 2022 07:24:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599473; cv=none; d=google.com; s=arc-20160816; b=Iz7j8s1W0abIngzbi/OVV5KTcr+W59IXcNBUOrbhnVCGqiF9zrB7ncERTVsyuchUGG 2JuEugNZgFvwef5NG4ANHBQZGcwkIKb3VFOJjEgR0qIOHjT70eog9vldVGdSDkRVbNpY zXUtrvvAb+0jWF/mFOn2FrKUHfqdp7uFPipTkXEZrIuyCajG9mKvMCuVN9DwwLBosPzL e9JW+aAXGJcSmvltWquRUEdy+62sba1Cyx+tQQ35i7Vaw2bjS946aiTpH9Zjf4KPIfRe Z4M8vTr8tG3YfGfYrCEGZLRo3OR0N697c1iIi2PTqGYhZltcQLJ9PqPCW6KBbFfLBVNK SBoQ== 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=OXC2J8gtGNCluV+1whLnrK+sDhHk+0PxofuJ1e2mza8=; b=qGumBuvWoWegJSd6L+vOkGCX193tmPhJ+DS4DVnVjy7pqINB59A5emzSzH1NVo6s5V Zbe9z1jcF0R6SlSEWU9Ua6qouDvXymBEit6cESzqh7Ide1GdPaIMwQi4BO2ifGrh20fi kG3iXNHO0N76ApEeGx9ofq1mgJsm6GZu7WpEX6nCk0f7OaWV+9aE63ps49WqTojgYiBe Jviw5tKMh92Q1yHx/awjRxzBQqrudHaEvN/9nmA7+KEdDWIPuYWXrrq82t4EKuZDmZH7 7O86BuH8p0nhkleLiweG7bvSfKIhg21+8Oosr0EH1QGJiY/F8A2chdXqEYfoYJf/8XcS YJqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=YaRRKeW7; 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 iy21-20020a170903131500b001893df49ab0sor1037123plb.141.2022.12.09.07.24.33 for (Google Transport Security); Fri, 09 Dec 2022 07:24:33 -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:903:3254:b0:189:907b:7cbb with SMTP id ji20-20020a170903325400b00189907b7cbbmr6539871plb.50.1670599473108; Fri, 09 Dec 2022 07:24:33 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.24.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:24:32 -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 v9 00/18] drm: bridge: Add Samsung MIPI DSIM bridge Date: Fri, 9 Dec 2022 20:53:25 +0530 Message-Id: <20221209152343.180139-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=YaRRKeW7; 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. 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 t 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-v9 v8: https://lore.kernel.org/all/20221110183853.3678209-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (16): drm: panel: Enable prepare_prev_first flag for samsung-s6e panels drm: exynos: dsi: Fix MIPI_DSI*_NO_* mode flags drm: exynos: dsi: Properly name HSA/HBP/HFP/HSE bits drm: bridge: Generalize Exynos-DSI driver into a Samsung DSIM bridge drm: bridge: samsung-dsim: Lookup OF-graph or Child node devices drm: bridge: samsung-dsim: Mark PHY as optional drm: bridge: samsung-dsim: Add host init in pre_enable drm: bridge: samsung-dsim: Init exynos host for first DSI transfer drm: bridge: samsung-dsim: Add atomic_check drm: bridge: samsung-dsim: Add platform PLL_P (PMS_P) offset drm: bridge: samsung-dsim: Add atomic_get_input_bus_fmts drm: bridge: samsung-dsim: Add input_bus_flags 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 drm: bridge: samsung-dsim: Add i.MX8M Plus support Marek Szyprowski (2): drm/bridge: tc358764: Enable pre_enable_prev_first flag drm: exynos: dsi: Restore proper bridge chain order .../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/samsung-dsim.c | 1934 +++++++++++++++++ drivers/gpu/drm/bridge/tc358764.c | 1 + drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1769 +-------------- drivers/gpu/drm/panel/panel-samsung-s6e3ha2.c | 1 + .../gpu/drm/panel/panel-samsung-s6e63j0x03.c | 1 + drivers/gpu/drm/panel/panel-samsung-s6e8aa0.c | 1 + include/drm/bridge/samsung-dsim.h | 116 + 12 files changed, 2195 insertions(+), 1653 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h Tested-by: Marek Szyprowski