From patchwork Fri Mar 3 14:51:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2763 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 BFCB744AA6 for ; Fri, 3 Mar 2023 15:52:17 +0100 (CET) Received: by mail-pf1-f199.google.com with SMTP id bw25-20020a056a00409900b005a9d0e66a7asf1462178pfb.5 for ; Fri, 03 Mar 2023 06:52:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1677855136; cv=pass; d=google.com; s=arc-20160816; b=iW6mh6V8dXlH7TDEhHQgRAOetAU8h7PVWkzMUdVXVUT+vaEfqlD5R5RcZqjbAjgvzm VqYXbfw24DaozgXaYC7LhmJjIoyehpBU6LW6JdDPiROvxiL2bofuc9FCY3bTNvRvJ9ra V3YwJqGhZVAPqlXzk5nbxCtE21ZiUK5lKiDXUnFOc4gp86jMxH586z6GSt6OUZcl/trk BSvt/ScdV6zZV+hjwHpv1cxGLFXOi+ux7FXgdHisQEZrtahj/j9AjDBqI9ZDegknpQfv dKPKTEG3OwZZ9cNIvUfk1IbMtICNUa2Ogf1p7MmsMnYzSEIFpVNImH6GCjsaR138CnwM SASA== 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=D6x0aWy2JC8UDRy3gPwiNClvxFiIwXkxD4bjw25xfaw=; b=tBe6u5hGefBrDROkxNzX+jbHszg1SMl96I6eBX79faJj6KnVKG5ltltTJUgtwOKJYt wQD+36O7p5UkPfJRSY+Ly1RRGpZrlfj2KwQzbW8brbA1vbFQvcUEYOmFl5S/0XgWHja/ MfeB4jTp9VTkZb13O59ejak3S0tuXN37CdDwDasso3dnrGXQFuuHSVijd0Tc3dRSglVx kQ9snlVyONdO+BVDfxOILoGSSIZ/veUgME2/fMnkPtyYnud1sXbxrxoxi4+/Y9HBfR+W ExY99yqHErWJiFby1xdQNxhAbvW/bcra3Dyl0PZGQyQr3vb5BoWfQVWER5Vhe0p+XjUe TASA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=b2x1xbYM; 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; t=1677855136; 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=D6x0aWy2JC8UDRy3gPwiNClvxFiIwXkxD4bjw25xfaw=; b=iQRbGTWfX7ofh889bWGbgbdudZOj9eV4d//BXLHPVyZRLsTEuAbtTrwZ3DfSHKmnYi YACvZYNXSs/erijgITQ10W2VQ2IoU7YdTGJcDEhhD7YtSs1lMW7gAbzUlYIrqAXTMFqr raLJZ+RZjkRJ4/MjLONdGNMTcGTt8622TEOcA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677855136; 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=D6x0aWy2JC8UDRy3gPwiNClvxFiIwXkxD4bjw25xfaw=; b=rySOq8xhFZQPcnhE+IpAF1GSKe22VcbdXC28JPkQdUpL/oPAupkswu4+35l/5M6CWf 1QltF2hA7zEnvxGSPT0FgXAmUInBBDyG5Hxq0FxuPhU7GXBuQiiJLhm0fB9xlzYWuG5g VxpNVMBchkLsE2hpK/ZveXn+Q6sMMfoAtzd/+8+JW6ss+70R4hUuoX/COQcSSTsdYfX4 0MIN60V71AsNelUZhaPbO06pUeKQ7Apo7y4toNzrj8V1W1OO80Gm4L6Ga8K988mjYwMz ZQZt0936Ae55EqBXjGoCkQFHZ2JLOnjlWK6E2QGKchjlnXhkUFNknNhZ4lmBaAH1dETl WwYw== X-Gm-Message-State: AO0yUKUdE6d31dSbKBoLbUdCU8FSXq7P51fcrZrwDUFoy9VK6X/+np0x JYYaCD6tp88Q0vkiNoSPlNhAkfEd X-Google-Smtp-Source: AK7set8A1J0hDpgmuBlBR1UoT44LUsUnA9+LqTpLJYgKGVR4u9CYMOuhx3wnswzmmfsgVaVpVYQiwQ== X-Received: by 2002:a17:903:2c1:b0:19a:7e41:5a2c with SMTP id s1-20020a17090302c100b0019a7e415a2cmr799099plk.2.1677855136254; Fri, 03 Mar 2023 06:52:16 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:be18:b0:199:50f5:6729 with SMTP id r24-20020a170902be1800b0019950f56729ls3157587pls.11.-pod-prod-gmail; Fri, 03 Mar 2023 06:52:15 -0800 (PST) X-Received: by 2002:a17:902:ec8d:b0:19a:a9dd:ed3f with SMTP id x13-20020a170902ec8d00b0019aa9dded3fmr2456978plg.49.1677855135211; Fri, 03 Mar 2023 06:52:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677855135; cv=none; d=google.com; s=arc-20160816; b=bvu4lABc+O/2X5s0KSxorpXUwr49ki/XiZDIJKkIID3p8yzWIB1cnNeLYBQjd7krow g2V6H0ymPTnBup+uFG0mDigStt1hjF/jyLDE94ctvxUme/NO73VxdnoZ7P1wq9RLMEY9 P1KvXxmHDihioAmj7Gs0Fnfdxsnek4bi8fdCJc/pU+BXDKyjcKb6JbQGGHWijcPXS86x Qq9p809mHDqzqD5qcGmqtoCpbzNYo9RGSuYogvBbDkm/SDP3yP62z821QISZZbqY8Aed ZhULwDliSS+FzlBDKZOSSm4BqX0y7/0RW6hlhXP78EuRMnkaTg6pip5kKGAEjyZD0A1+ I67A== 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=7XuZz6KPqTEYgEjSXk0X89qnpLQBY2hr14DLYpVgyC0=; b=Tb57zZSyXgU4PJ8cVauQm8fkgRku4tmv2zmxvXarUtsQS4D467ayhMRwr9NPyRwsdd y2k0n9gkNP5kRbmFT9rVno75TMQDS6IwuDpH2yyjrjLu8O/6DP/KYz+5Q1XZEoodnqix 5Iu0g8COTjVTl9XnVC5NHCrAp6k++uxQunWV9bBi3CoWkFKdSPLaZKjvRau6aGmPjrOh ElbfLn3QCZXj4Bir+g+yuGfPyQMPRIIQEpNftQROgqKWKSx4M44eVD13lhMC/wzIHi4l CP3hcujtaUXp8R/YrrkSFh0gWWFXYNJWaRnO+LMoC+clu31s/Si6lHMYxSTCAMwXVbVt 763Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=b2x1xbYM; 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 ji17-20020a170903325100b0019927d31610sor1350717plb.157.2023.03.03.06.52.15 for (Google Transport Security); Fri, 03 Mar 2023 06:52:15 -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:a05:6a20:b712:b0:cc:a1dd:d0c1 with SMTP id fg18-20020a056a20b71200b000cca1ddd0c1mr2233861pzb.50.1677855134745; Fri, 03 Mar 2023 06:52:14 -0800 (PST) Received: from localhost.localdomain ([183.83.137.89]) by smtp.gmail.com with ESMTPSA id z4-20020a63e544000000b00502fd70b0bdsm1660856pgj.52.2023.03.03.06.52.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Mar 2023 06:52:14 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Neil Armstrong , Marek Vasut , Maxime Ripard Cc: Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-amarula , Jagan Teki Subject: [PATCH v15 00/16] drm: Add Samsung MIPI DSIM bridge Date: Fri, 3 Mar 2023 20:21:22 +0530 Message-Id: <20230303145138.29233-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=b2x1xbYM; 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. Inki Dae: please note that this series added on top of exynos-drm-next since few exynos dsi changes are not been part of drm-misc-next. Request you to pick these via exynos-drm-next, or let me know if you have any comments? Patch 0001 - 0002: find child DSI bridge and panel Patch 0003 - 0004: optional PHY, PMS_P offset Patch 0005 : introduce hw_type Patch 0006 : fixing host init Patch 0007 : atomic_check Patch 0008 : input_bus_flags Patch 0009 : atomic_get_input_bus_fmts Patch 0010 - 0011: component vs bridge Patch 0012 : DSIM bridge Patch 0013 - 0014: i.MX8M Mini/Nano Patch 0015 - 0016: i.MX8M Plus Changes for v15: - drop drm_of helpers - re-added find DSI bridge/Panel helper in dsim - collect RB from Marek V - fixed leading underscore in function names - commit messages updated - rebased on exynos-drm-next 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-v15 v13: https://lore.kernel.org/all/20230227113925.875425-1-jagan@amarulasolutions.com/ Any inputs? Jagan. Jagan Teki (14): drm: exynos: dsi: Drop explicit call to bridge detach drm: exynos: dsi: Lookup OF-graph or Child node devices 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/samsung-dsim.c | 1965 +++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1817 +-------------- include/drm/bridge/samsung-dsim.h | 115 + 8 files changed, 2190 insertions(+), 1732 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h Tested-by: Marek Szyprowski