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: 634113 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1C13C4167B for ; Wed, 14 Dec 2022 12:59:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237426AbiLNM7d (ORCPT ); Wed, 14 Dec 2022 07:59:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238429AbiLNM7a (ORCPT ); Wed, 14 Dec 2022 07:59:30 -0500 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83796B1F3 for ; Wed, 14 Dec 2022 04:59:29 -0800 (PST) Received: by mail-pl1-x632.google.com with SMTP id s7so3244842plk.5 for ; Wed, 14 Dec 2022 04:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=p2haNhsWLcMgD3AmvaIqaCyzLC7UhgQLS5K9Rnr78wk=; b=BDQKqJlG4RjkgGDCNVXvKMMziT/QM4oiL6XklefDBD8yqAX23CfvKAjbtetD7HIIsN xZtUiwRqlsmyUh1/yUvdJiwMm5Pd5CcO8cclK6dq9crzwyIRyiaHbYO7EP1ViIaoFhYW 1iw6qZJUjQinTXrHPDuFuD/hm/F29qwVyhNj8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p2haNhsWLcMgD3AmvaIqaCyzLC7UhgQLS5K9Rnr78wk=; b=uKUi1Y9NB6JQMW6903MNT2sVzZZKUPl8acT4ceyj5sjPbmxU1Tl/CPchiCptXdB2/R 1lwt35g0ZWzPoIAoNeUvN/lEPcB8vSOGwqNJcvV5VryHGGuGrX8/2UwwB/42q5leEIB3 jOlHNPt41vXQK1E5KWn/8OaBluueHA+FQGvyziG/HgfvkiBAviIG2wmxdB3TW8zl6pG7 zDbFUJA9GiNwLogI1EKFcT6lCVGQXw2IJ5adwxLwcqEBehnHKRYenysbWffO8lijbFP4 SX37MuCoQoeO+/BpbvBjh7h4QN8zAXWqjsVUoodBQx3DoXMPzwhirrG5StgYYqctqtqs wlpQ== X-Gm-Message-State: ANoB5pnG7rCaR140J10nEMQk+4XwEzOVV0eSkEbryAj7AvUmqxtZ01ck 6xxLPbQJoZ3rzPnPYJRzfJEnCw== X-Google-Smtp-Source: AA0mqf75/1u51z3U+V4TUa81nNcgv5s+Hoc2FbbAmEVpGBR/jvhHbg46+Dv5H0Frc0WBXQB7h5xG6w== 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 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org 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 Reviewed-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Reviewed-by: Frieder Schrempf Acked-by: Robert Foss Acked-by: Dave Stevenson