From patchwork Thu Jan 26 14:44:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2673 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C99053F046 for ; Thu, 26 Jan 2023 15:44:54 +0100 (CET) Received: by mail-pl1-f198.google.com with SMTP id jc17-20020a17090325d100b00194dd8a6c27sf1176903plb.17 for ; Thu, 26 Jan 2023 06:44:54 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1674744293; cv=pass; d=google.com; s=arc-20160816; b=evq/4ibYE1KYQKUW/ZZ4mJzToYFgb6fHSKEKRaLJMDaPZnMA4oFEa6nnBMfsh2PV8y aiOyWtC+05bQnizi2497iPqPQL3SLBdlHvpeFn91VBLsLD0RVc72rhM+lxuko4qDqa2J h9Us8GZYUkSkz4iZ9CzXeaAY9jUFOGwqXV0NUSque0SxMNvofEvUFxzdIziv3srdFimd UEMuYab2n+z5hhTffNGfUFacM6mTb17Ef+Ydsp+gcquJn8Xm3x9lgZiQ73noHA6vi44g N92zd9RbcfPfaQ+Iz6M8/CGlk8UMOz1N1DN2lsIF75FTlQDhoycoRwFgm0nYXfVPRHsO fhjw== 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=BJUZe/qyQG40TbLViv/AoCx85u8Djwnp/G8lWJ1Xv1M=; b=Ma1q9MWaZ3xFKzlYl/XhU7s4t9khdQqGAL+8BFzvX5QMfJkfZN+iZYviRas3OetVVM vRLy+5TRKlojN0kX3pAKvBFYhDkWZ9qbft1eeS6k5COFvOi8dLrG5SuOdvQIye3/l+u0 M0ftUGzitVm03f9/cC/AYSpJ6lZpUv7q30BB1Q1b38dHLhwWZ0Q9ZBLtOjVlLaTbvZuT c90Mi3G7U4wBVLkmHKN9o0uqH3Y0kHlzR74TTDymQzCnDJQLRHu6YGbrQ+q1tthkbq0C PBi/gQMzXLbdZfYCC2hmA9RmPLFgNFtZYygPFEA1iosR2gJ7ClByvXvOB5TUbuI91n31 Y8Qw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bq5kJ9wJ; 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=BJUZe/qyQG40TbLViv/AoCx85u8Djwnp/G8lWJ1Xv1M=; b=WuvndiMrGLgEtZbw/Cd2z0UhXOwtxteWfuIgVwcK3w5tLv738ECjnQJmZYBZoCg91H DaRLcH/srFRN1Wx6BPJT1ZlxSaFR5Zm0rDK2yfPB3nKWwnIqMoMutf4r+WQ3NWEg9syH USSjV6ezlYuyhxPi8npqszlPsnhA4+YX3zzFk= 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=BJUZe/qyQG40TbLViv/AoCx85u8Djwnp/G8lWJ1Xv1M=; b=OBJ9N3JjoXQJmmNeArQSOhcDGU5LdsD/1Tb/F+3ouKwUOQTgVlAFIwDVXu8A56iYtz iPdUMFko53cuo6g2LVvZi0WIs4BdvxnEBe/GD3MzV8fM5LID3ZeUoma4AlTSID4FPl9S DTYwlsliTzjdRZZOmDnZSuo3BUV+G1ScNNZ0XpfrjUEUbYMkMmeqfI2uZqmPghE7lYiQ bSXU3+3hQOMwpkITLHCIrojBfoU0kP7nXHWDzPIDbY2YVH1kPo4Y3au8JIITXrNSODse /SIwzOlRIVSXfJby4zTYhQBPcxPRJOEZCrEN70wApQLpTV+OUywUd4ZJVswVTQHnDJxO 74gA== X-Gm-Message-State: AFqh2krp+mWPplDioOtyf7Zj2ZfDWogm4ktTly5n60o6fNgid6c+I8Eo U41NzCif/XoTmlPb81yL7HPZghZo X-Google-Smtp-Source: AMrXdXurGXLP0RC6iySFzbq2Y7HF1lQlWieqHN1n4BZUusi22STHFqVFLeyJwvm55YNWEDoDKUz/Ag== X-Received: by 2002:a05:6a00:4c81:b0:583:39ca:82f2 with SMTP id eb1-20020a056a004c8100b0058339ca82f2mr3908209pfb.10.1674744293372; Thu, 26 Jan 2023 06:44:53 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:e9c2:b0:191:1e85:3329 with SMTP id 2-20020a170902e9c200b001911e853329ls2371150plk.3.-pod-prod-gmail; Thu, 26 Jan 2023 06:44:52 -0800 (PST) X-Received: by 2002:a17:902:ec82:b0:196:1c45:6fc8 with SMTP id x2-20020a170902ec8200b001961c456fc8mr9738494plg.60.1674744292331; Thu, 26 Jan 2023 06:44:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674744292; cv=none; d=google.com; s=arc-20160816; b=TN9li1YVy1emp21Cq/YrYlTmTuMobZct2zR1y/aWGSBU82HvGTeN12L3Gl5IuCBGAc bGkh+FnY/iMB+8SRJECzKYGqhCqdU1dF+ZP55Dflh2+/NdhtSapxeI5I+e5Lvj/Ve8jV KaFV9HCLZgrdeznQbopmJ+u0XB2KDfP1V65Se0Gd323INT/+b2usXsOcR/fk430pKlhD rfORjTMzDXJ9ftUHG5WrVbf9AaHv5YTHJ08+HLx/X2WKDhQ57MzoG6o+ejhzvPvaFNTr oU72q6VmSzGrIuQUBew/QA+YaoNlG1b9WlADxc4qMHH5xwL4t2JFICZDjywpZrvq4QMg PM4g== 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=0I6bI65YpFuZrNuqbotUIHksXyoGGdEvXfkJfVg02vU=; b=VAzMDGGZs+bawDnJ0GFt+JCoRjPbI5IVOWOq0oLb1yUHsa6aiYstbNMlSXJqjZ5JLC 5Zk3cNYafaj3TS091EjjdZDLU2NEfnLomczyUBm3tpxRztMlaURTz38+Z3XQl0CIikaS CyGtWtT03ivKXtBChLnZtkwlKktRwS93T3JEv5F38HrmhcKhaXBmNOHqIvGIK1AhHImA d7XYqr4//TLFT9FIAMukB7OsUsnGAnjMP5gYtGNVn3u2P2ez9veByN2WYJOQqYbiN9Fc tlxnIDS/yA3CVamjRui/wThid2jj3b5YcnADDsuoegELwQBOptLFb3VVIJmER+/RhneV NW3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=bq5kJ9wJ; 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 i11-20020a170902c94b00b00194c43382fasor730282pla.142.2023.01.26.06.44.52 for (Google Transport Security); Thu, 26 Jan 2023 06:44:52 -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:2a1c:b0:b6:826b:e17e with SMTP id e28-20020a056a202a1c00b000b6826be17emr36744213pzh.31.1674744291907; Thu, 26 Jan 2023 06:44:51 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a238:3cb1:2156:ef87:8af5]) by smtp.gmail.com with ESMTPSA id d197-20020a6336ce000000b0042988a04bfdsm823660pga.9.2023.01.26.06.44.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 06:44:50 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Robert Foss , 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 v12 00/18] drm: Add Samsung MIPI DSIM bridge Date: Thu, 26 Jan 2023 20:14:09 +0530 Message-Id: <20230126144427.607098-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=bq5kJ9wJ; 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 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-v12 v11: https://lore.kernel.org/all/20230123151212.269082-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 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 | 34 + drivers/gpu/drm/bridge/samsung-dsim.c | 1922 +++++++++++++++++ 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_bridge.h | 2 + include/drm/drm_of.h | 12 + 12 files changed, 2289 insertions(+), 1752 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h Tested-by: Frieder Schrempf # Kontron DL