From patchwork Wed Mar 29 13:16:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2826 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 12D98414BB for ; Wed, 29 Mar 2023 15:17:55 +0200 (CEST) Received: by mail-pj1-f72.google.com with SMTP id ie21-20020a17090b401500b0023b4ba1e433sf4596129pjb.0 for ; Wed, 29 Mar 2023 06:17:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095873; cv=pass; d=google.com; s=arc-20160816; b=YR4QW7YCEco0RoNouD4ogDQmO0xVjZJVIVByy6nLm28tWnK4XPfhaUNx2D9NikEs81 MsgNeDaIArcqLiTxhBiQr11gexW+apsk+/JnoAZ5GGz99lkobcGW2luQniQQ9A92HvYw qf9biqmp64dEgvNzasv6QoqzYgrOMsTPDJSdsXp66UWz2W13BKkca/0HUHumfG+6o8O9 XAs6QzDglyyHhIPyoNtSuifgooNqfyCApJe4OZyHMMxkMx3gCYY2LfcQCfUQYaAsIybl bKFu8z8moxwXGaE1Nw7V2QQ1tHGLw+5ug6cAb/jXPsKPW3kv+3w3Y6KRuFj97hB3fcpp Yv4w== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=x22X+Fsg30ivCiu1NZUzY1vs90PHG+XI6R6mjyjXpjk=; b=uUnlvaUSBgcA8qlvjWML7aW3lhlEhgSOHV69XzmthRUFh6eWA5QTW83LOFYjCQxV34 1oBGLxZ9qQ2Bn3ey/UR0uQ2IQAunMS6y4E7RUfpPutvJusGHOE1yu5RFmFyJNivF/c85 Gv7kBplq7pWLxjI3FPjcDstN17D0Rwgp/TxbSIO8jcpREe1q+BW7WRafFnRvw6/cllJ7 RFloa0jk2Pbh/ALHVTinvYP44D4TXkLaUIMrg4DgZgBsgWZSuJkn9sYBBjPLyQED7gZ+ cNyB9D1ECfG6QLW3DjBjqFBdoQeA9xlL0nZfta3koOhBp1MQcCkzxCquH2qlLQhOVwnN 7uGg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="lCODPpW/"; 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=1680095873; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=x22X+Fsg30ivCiu1NZUzY1vs90PHG+XI6R6mjyjXpjk=; b=V701ekRkanH/NS73qbnBu23nqCqDVI1RrfRzv+mgtRsZSoXznillAFeLxOsN1GtBmf lPOwKOLg1+rAMgld/iOPyIUgzUN8aQZp9Qoj0FUszi6N9sDwe1/VcbMVfp0N0bpbKqBd Zb5wwbZSXx+H/+ncLGezx+9IbC4PH6BD37rqg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095873; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=x22X+Fsg30ivCiu1NZUzY1vs90PHG+XI6R6mjyjXpjk=; b=N+ernY695l5VlouETK3lPxhyZY43ZgfD2mQAj06EgsAiOXDBfGJezw2TEKZYJ7G9Md P2PsyXYJHGVZbYwcwkf3Jamwjs4RtRiRtDBUqVYU5sjMZ4RkbMPMkd/H0hwfw5jkevSO ux68VyxPGxJ+6axfLV9vIUwGtNUEzfy+In489qS63UeHd398ISA6KHgBm2btGcIrWt/o z9SgVnPDh3sJCrHvmp+G1ys26lajdV8wtQic5Ss4GJkrdRDp3XA+nLlJMfVxWXOqVe44 mOlyT2mjJkk0dvsgpvO2tVF2MpgQ21BMsShBfOXSUk4wd79BxFAWpC/BSvPE0h71pGIm Q13A== X-Gm-Message-State: AAQBX9evCjczswPXMPcc+qTG5M1MPjJFh2EESPkFvjXpnC4B+1Hzsasl NvXQcisdr+ycNnK7MKOujsR829QL X-Google-Smtp-Source: AKy350Y4lWnwPhVlcLIyGpxCleUnE5JVAN0FFd8zdBqufYYWXw/83he2rPWkcmDTWcUsSD9yns8iyA== X-Received: by 2002:a17:902:f693:b0:1a0:5058:f629 with SMTP id l19-20020a170902f69300b001a05058f629mr7769482plg.13.1680095873588; Wed, 29 Mar 2023 06:17:53 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4d8f:b0:234:2ef4:2e9 with SMTP id oj15-20020a17090b4d8f00b002342ef402e9ls2221505pjb.0.-pod-control-gmail; Wed, 29 Mar 2023 06:17:52 -0700 (PDT) X-Received: by 2002:a17:90b:3b4f:b0:234:2485:6743 with SMTP id ot15-20020a17090b3b4f00b0023424856743mr21070772pjb.3.1680095872348; Wed, 29 Mar 2023 06:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095872; cv=none; d=google.com; s=arc-20160816; b=ohsKHJPXdpk7zFssp069OKUlVrf62O8x4uoWbkhJkbgTKdsYQxqxxYVIUjffuqHwYz so78bT2eXMqAmQSKYWqqykl8MuAxYmlGOwGo0wiLXC3Reuz2hA83C4HP+Hkgi3J08vE0 hgWa3HYwHpYRZdQxZAsHsggoQJGRlVGREL4818capXom4Qmqyn0YSaBuygUdvmcKYm9l mhhtFwVVZCk3DE7glxwitijmyfLzjVp1VGUAZq7W7JoTf6VJ9HSNRzwXjILffnj3KahL YIl/8EJJH8wobKCe0EWS5YJGzlOIAxm1lP2/ateDyCbUDqi0DMw0A5z9V+ZpgPz6OStJ 4FFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=X83RR+xeESh5armnw5mGiS+y5yBuHI5QecAlLL/Hrnk=; b=Rox8BXxtowTjzigS0+OKzfa/wm+kTtXbLrUlX6DZRihrkaRBKCamZHzuANiAa7nSXr qjNndDGJJK7xE5B9SbgJrt5YKNRKXLoM89qfq+bv2g2yirmSvNCYrjMmXyhDdtUvOn8u fzi5/Ywry0ON4gQG3mPcmGkHZQLTGGziJwGJxhL/7uSQgrSU12dH8GikYbnrsvwZI46B ES9cIXBhKUJMVTMX9S6+Sb3pKWVzMNRv9YzAxj3ZK0aSldNP2va0LX7JLAS/dpCb7Esc PQ1ygQKTNUD9oGKnQy0aWRIJZjaeY9GDtdkvjx46PPTSAgACRnSONYigR1gn4BfRvjri mQXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="lCODPpW/"; 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 ay6-20020a17090b030600b0023f8962e98asor850074pjb.13.2023.03.29.06.17.52 for (Google Transport Security); Wed, 29 Mar 2023 06:17:52 -0700 (PDT) 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:90b:1e43:b0:23d:1b50:1ebe with SMTP id pi3-20020a17090b1e4300b0023d1b501ebemr22546115pjb.27.1680095871927; Wed, 29 Mar 2023 06:17:51 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:17:51 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 01/12] drm: of: Lookup if child node has DSI panel or bridge Date: Wed, 29 Mar 2023 18:46:07 +0530 Message-Id: <20230329131615.1328366-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> 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="lCODPpW/"; 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: , Devices can also be child nodes when we also control that device through the upstream device (ie, MIPI-DCS for a MIPI-DSI device). Unlike the drm_of_find_panel_or_bridge helper it requires a special case to lookup a child node of the given parent that isn't either port or ports. Lookup for a child DSI node of the given parent that isn't either port or ports. If it is found then it will directly find the panel or bridge otherwise lookup for the child node with a given port and endpoint number as drm_of_find_panel_or_bridge does. Supporting this feature via existing drm_of_find_panel_or_bridge found several issues while handling usecases. Here is the previously failed attempt of similar and the same has been reverted later. commit <80253168dbfd> ("drm: of: Lookup if child node has panel or bridge") So, add a separate helper to handle this DSI use case. An example of the downstream panel represented as a child node: dsi { compatible = "allwinner,sun6i-a31-mipi-dsi"; port { dsi_in_tcon0: endpoint { remote-endpoint = ; }; }; panel@0 { compatible = "feixin,k101-im2ba02"; reg = <0>; }; }; An example of the downstream bridge represented as a port node: dsi { compatible = "allwinner,sun6i-a31-mipi-dsi"; port { dsi_in_tcon0: endpoint@0 { reg = <0>; remote-endpoint = ; }; dsi_out_bridge: endpoint@1 { reg = <1>; remote-endpoint = <&bridge_in_dsi>; }; }; bridge: bridge@0 { compatible = "chipone,icn6211"; reg = <0>; ports { bridge_in: port@0 { reg = <0>; bridge_in_dsi: endpoint { remote-endpoint = <&dsi_out_bridge>; }; }; bridge_out: port@1 { reg = <1>; bridge_out_panel: endpoint { remote-endpoint = <&panel_out_bridge>; }; }; }; }; }; An example of the downstream bridge represented as a ports node: i2c4 { bridge@2c { compatible = "ti,sn65dsi84"; ports { port@0 { reg = <0>; bridge_in_dsi: endpoint { remote-endpoint = <&dsi_out_bridge>; data-lanes = <1 2>; }; }; port@2 { reg = <2>; bridge_out_panel: endpoint { remote-endpoint = <&panel_out_bridge>; }; }; }; }; }; dsi { compatible = "fsl,imx8mm-mipi-dsim"; ports { port@0 { reg = <0>; dsi_in_lcdif: endpoint@0 { reg = <0>; remote-endpoint = <&lcdif_out_dsi>; }; }; port@1 { reg = <1>; dsi_out_bridge: endpoint { remote-endpoint = <&bridge_in_dsi>; }; }; }; }; An example of the downstream bridge represented as a child node, but whose host neither a port nor a ports: dsi0 { compatible = "ste,mcde-dsi"; panel@0 { reg = <0>; }; }; In, summary the DSI downstream devices are likely to be Panel, Bridge and I2C-Configured Bridge. It is possible to connect all three devices using upstream OF-graph port or ports node however only Panel and Bridge are possible to connect via child node but not possible to connect I2C-Configured Bridge via child node since I2C-Configure bridges are child of I2C not upstream DSI hosts and it must represent them via port or ports with endpoint linking. This indeed means, the OF-graph port or ports representation is mandatory for I2C-Configured DSI bridges. This patch tries to add an OF-graph port or ports representation detection code on top of existing child node detection. Overall, this patch makes use of a single standardized DRM helper for a given DSI pipeline representing downstream devices as child or OF-graph port or OF-graph ports node. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/drm_of.c | 112 ++++++++++++++++++++++++++++++++------- include/drm/drm_of.h | 12 +++++ 2 files changed, 104 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3..87cfd685318a 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -217,6 +217,35 @@ int drm_of_encoder_active_endpoint(struct device_node *node, } EXPORT_SYMBOL_GPL(drm_of_encoder_active_endpoint); +static int of_drm_find_panel_or_bridge(struct device_node *remote, + struct drm_panel **panel, + struct drm_bridge **bridge) +{ + int ret = -EPROBE_DEFER; + + if (panel) { + *panel = of_drm_find_panel(remote); + if (!IS_ERR(*panel)) + ret = 0; + else + *panel = NULL; + } + + /* No panel found yet, check for a bridge next. */ + if (bridge) { + if (ret) { + *bridge = of_drm_find_bridge(remote); + if (*bridge) + ret = 0; + } else { + *bridge = NULL; + } + } + + of_node_put(remote); + return ret; +} + /** * drm_of_find_panel_or_bridge - return connected panel or bridge device * @np: device tree node containing encoder output ports @@ -239,7 +268,6 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, struct drm_panel **panel, struct drm_bridge **bridge) { - int ret = -EPROBE_DEFER; struct device_node *remote; if (!panel && !bridge) @@ -260,30 +288,74 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, if (!remote) return -ENODEV; - if (panel) { - *panel = of_drm_find_panel(remote); - if (!IS_ERR(*panel)) - ret = 0; - else - *panel = NULL; - } + return of_drm_find_panel_or_bridge(remote, panel, bridge); +} +EXPORT_SYMBOL_GPL(drm_of_find_panel_or_bridge); - /* No panel found yet, check for a bridge next. */ - if (bridge) { - if (ret) { - *bridge = of_drm_find_bridge(remote); - if (*bridge) - ret = 0; - } else { - *bridge = NULL; - } +/** + * drm_of_dsi_find_panel_or_bridge - return connected DSI panel or bridge device + * @np: device tree node containing encoder output ports + * @port: port in the device tree node + * @endpoint: endpoint in the device tree node + * @panel: pointer to hold returned drm_panel + * @bridge: pointer to hold returned drm_bridge + * + * Lookup for a child DSI node of the given parent that isn't either port + * or ports. If it is found then it will directly find the panel or bridge + * otherwise lookup for the child node with a given port and endpoint number + * as drm_of_find_panel_or_bridge does. + * + * Lookup a given child DSI node or a DT node's port and endpoint number, + * find the connected node and return either the associated struct drm_panel + * or drm_bridge device. Either @panel or @bridge must not be NULL. + * + * Returns zero if successful, or one of the standard error codes if it fails. + */ +int drm_of_dsi_find_panel_or_bridge(const struct device_node *np, + int port, int endpoint, + struct drm_panel **panel, + struct drm_bridge **bridge) +{ + struct device_node *remote; + + if (!panel && !bridge) + return -EINVAL; + if (panel) + *panel = NULL; + /** + * Devices can also be child nodes when we also control that device + * through the upstream device (ie, MIPI-DCS for a MIPI-DSI device). + * + * Lookup for a child node of the given parent that isn't either port + * or ports. + */ + for_each_available_child_of_node(np, remote) { + if (of_node_name_eq(remote, "port") || + of_node_name_eq(remote, "ports")) + continue; + + goto of_find_panel_or_bridge; } - of_node_put(remote); - return ret; + /* + * of_graph_get_remote_node() produces a noisy error message if port + * node isn't found and the absence of the port is a legit case here, + * so at first we silently check whether graph presents in the + * device-tree node. + */ + if (!of_graph_is_present(np)) + return -ENODEV; + + remote = of_graph_get_remote_node(np, port, endpoint); + +of_find_panel_or_bridge: + if (!remote) + return -ENODEV; + + return of_drm_find_panel_or_bridge(remote, panel, bridge); } -EXPORT_SYMBOL_GPL(drm_of_find_panel_or_bridge); +EXPORT_SYMBOL_GPL(drm_of_dsi_find_panel_or_bridge); enum drm_of_lvds_pixels { DRM_OF_LVDS_EVEN = BIT(0), diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 082a6e980d01..5e0d958121ce 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -49,6 +49,10 @@ int drm_of_find_panel_or_bridge(const struct device_node *np, int port, int endpoint, struct drm_panel **panel, struct drm_bridge **bridge); +int drm_of_dsi_find_panel_or_bridge(const struct device_node *np, + int port, int endpoint, + struct drm_panel **panel, + struct drm_bridge **bridge); int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, const struct device_node *port2); int drm_of_lvds_get_data_mapping(const struct device_node *port); @@ -101,6 +105,14 @@ static inline int drm_of_find_panel_or_bridge(const struct device_node *np, return -EINVAL; } +static inline int drm_of_dsi_find_panel_or_bridge(const struct device_node *np, + int port, int endpoint, + struct drm_panel **panel, + struct drm_bridge **bridge) +{ + return -EINVAL; +} + static inline int drm_of_lvds_get_dual_link_pixel_order(const struct device_node *port1, const struct device_node *port2) From patchwork Wed Mar 29 13:16:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2827 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id EE254414BB for ; Wed, 29 Mar 2023 15:18:01 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id 9-20020a630009000000b0051393797707sf162171pga.5 for ; Wed, 29 Mar 2023 06:18:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095880; cv=pass; d=google.com; s=arc-20160816; b=OT/OIOaXkdb6Dy6z4AfDqh9KZrv1W3tEjebdZn9ER5L/T8M2PItvZxj1rzYOy8yyrN I/hOD61GnGBz8K/KIJvTKoQCXLJh6r3ZSVtyAHPreS8XX7sFEp6sATPD/j4lJu5HU8v7 RYTqIjDN9k0to/KCuVT//8CJL21v5zi+X0rKFlu6H8bn+3fCq60rtKEoz2xofj/KG5T6 RGBzJtR5uV3RUuoiM7FyLWnHU60uqQuxBrz1PWR29+aAD3kPSPP1tOKu/3mAvc4yiDlC x266WokIN9rHmXCK9nOOslCsTYOLxaJaROcbjKXsJna2rKWJYbs04OjsyrYdh9/EIB6Z 4jdQ== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=axkRWJMsKTJPfMMd1Tk8SawIqreqLXOk3MdDwGtkvLY=; b=NEWx7ei3guUmzynOMwQUbtm7D4lQWfp/PUm8hWC5ENpm0riqyDO55tV3H/+WrqhuTm ysxGmijJEJ0YA++AoQCAkFPgsQS2YMHJoN9I/HejvpHNZ5XoDsR7JHimxjI2lXp7Racz rluhnng8ju6Q8TbXykPnJwpPwJzmTTXu7XFhlittaPahvRZCBwRNn1vhX/JCi002xgwc BirqBHjSfLdSt131otBbvlbWVdRYfWTrPdA1b2LdZsSCT4b8jlurkF8cSW7b/jwfzomS Ia/RBJN7rFQMF1UHv6Rc7/zYDXzzoEDrm/I0Hfs/YuRXhMup/hxOUg/MTljgzi9q2s3D 0S6A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cqidfaD6; 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=1680095880; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=axkRWJMsKTJPfMMd1Tk8SawIqreqLXOk3MdDwGtkvLY=; b=WN9HW6heRJFKGKCCVfiKxTZo6OYL0Rrgr1DzkFt+4a8Hd5XjEvZfc/4UQjgPowtXXp 1TkjLF7x3B1WecVy1lnwlLppYPRvgm7rlLsvdrl4u+WuJQQ2JEWRt/xazOIRSEecKtgI EHtO1P3liJ8aPvU2uP7iA5X8WSnuS9zae3KPY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095880; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=axkRWJMsKTJPfMMd1Tk8SawIqreqLXOk3MdDwGtkvLY=; b=zPIMw4YviiJZFzlDyS27TM+jysVSdDwoYW4MwZ2f6G1/Lo8ogKIcEl0czDCsvhZhWz a/C2atBFWq+j2ro7MOpNPs3FXQLtEeGPZ/6w4lJhsnH5AQiGUcWAZgtRcMP7UmtlGpXH 29YhFpbbLNYoz5XQYWWdq52nlxMQ/BGg4lEpjEnTgTJR3R0HX3qpw3L4IVb7dfuIMRkH j35jku59D4fPKmxqvevSq9xzvcy/yTIipkL8eVs5oDYDkCBFEDbrVlL8R9LE+OpFyLD5 SEY4r+hBzYZOHgQkYEHXHQkPik5izjGWlPUQgQMThFCL9Uot7C8EoG6jNcDzk59kwhG3 073g== X-Gm-Message-State: AAQBX9eeSmLJ6RnmksFtv3/3pDmRNgWI408Pmhz7ln+Cg4MlA/mW5o9w da7As1JsGggtT6+bHhFDyenwHt4e X-Google-Smtp-Source: AKy350ZBiFNnHoLO/rt4PQBeAmXTKc7nCfKobGNV50au6thLQtsQBkiqgqk3P1XB9YpiBae6Ipfx/w== X-Received: by 2002:a17:903:183:b0:1a0:4aa3:3a9a with SMTP id z3-20020a170903018300b001a04aa33a9amr7482011plg.2.1680095880703; Wed, 29 Mar 2023 06:18:00 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4d8f:b0:234:2ef4:2e9 with SMTP id oj15-20020a17090b4d8f00b002342ef402e9ls2221767pjb.0.-pod-control-gmail; Wed, 29 Mar 2023 06:18:00 -0700 (PDT) X-Received: by 2002:a17:90b:4c10:b0:22c:816e:d67d with SMTP id na16-20020a17090b4c1000b0022c816ed67dmr21486706pjb.24.1680095879737; Wed, 29 Mar 2023 06:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095879; cv=none; d=google.com; s=arc-20160816; b=EvwBnh2tps4bCOo1gOHD+uwy9vidBR6acr5WR3tvSyQc0aez5+dPKtwGlZGgG+1Boa GpzZr5Pm874bclxwU9+8NmJ0GQ9I31N8HR76JKcgZPN1Ca7tAiJ4uBLb7A1OYEze3AxL iTfC6sOjDGBPdhDa+9uk0BCx9nGuCJLUU+7SlKSLMNJCcsH01odIgY7c15OM5m4G8x4m buxlDTiNxA2L1dSLVgwGUdIaM6G2ainT7+ileWXQNvyQ0CrWr2vUZZXkxgFvTjbJvGKH WIczIYhGSuHPkBzPOyvJUHpjBlkeZ+DtdN4ADOIalT3oEeqE7BKDUvO94EEKj83rX5sV 2qwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0wNTb2LrxaKFlmHgalrnrr3A4EG008KaVwysZvYEb6Q=; b=oX7cDC4gGCR6PHlpSFR3CA/W+7rU93QZ7zrlIKCkYYRNvIEBy3gI/jaJTLyulDwWFu LfpQnhKLSFyZWm8Dgt0da6dlITcvzutbMoB/zfg6IjWbWRlPfwzYgy090aBQaxT4XDSP 0e5JlJ5nfNUiHRJnPyyj6D5mxC5pwziDpMURvjOJnsJgeYUTAUAiUMqazngC3/xAFezf Ka1FAxPLFEcBJSaqCCtK9paZiSfRu1QRxtmffSZ3GRSBnhkVL+rX89NxWJQ02CyrRRiN QJdicniwI1rufuQDhVHdM4r2GNHnQKTt24/wYWhAqM8w7eTySl8lWc70sOtk1FSDWxoC q6/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cqidfaD6; 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 h1-20020a17090ac38100b0022bf7fe90aesor789591pjt.31.2023.03.29.06.17.59 for (Google Transport Security); Wed, 29 Mar 2023 06:17:59 -0700 (PDT) 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:90b:3511:b0:23f:a4da:1208 with SMTP id ls17-20020a17090b351100b0023fa4da1208mr21913619pjb.39.1680095879378; Wed, 29 Mar 2023 06:17:59 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.17.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:17:58 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 02/12] drm: bridge: panel: Implement drmm_of_dsi_get_bridge helper Date: Wed, 29 Mar 2023 18:46:08 +0530 Message-Id: <20230329131615.1328366-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> 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=cqidfaD6; 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: , Implement a DRM-managed action helper that returns the next DSI bridge in the chain. Unlike general bridge return helper drmm_of_get_bridge, this helper uses the dsi specific panel_or_bridge helper to find the next DSI device in the pipeline. Helper lookup a given downstream DSI device that has been added via child or OF-graph port or ports node. Upstream DSI looks for downstream devices using drm pointer, port and endpoint number. Downstream devices added via child node don't affect the port and endpoint number arguments. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/bridge/panel.c | 34 ++++++++++++++++++++++++++++++++++ include/drm/drm_bridge.h | 10 ++++++++++ 2 files changed, 44 insertions(+) diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c index d4b112911a99..d047c7d9551d 100644 --- a/drivers/gpu/drm/bridge/panel.c +++ b/drivers/gpu/drm/bridge/panel.c @@ -501,4 +501,38 @@ struct drm_bridge *drmm_of_get_bridge(struct drm_device *drm, } EXPORT_SYMBOL(drmm_of_get_bridge); +/** + * drmm_of_dsi_get_bridge - Return next DSI bridge in the chain + * @drm: device to tie the bridge lifetime to + * @np: device tree node containing DSI output ports + * @port: port in the device tree node + * @endpoint: endpoint in the device tree node + * + * Given a DT node's port and endpoint number, finds the connected node + * and returns the associated DSI bridge if any, or creates and returns + * a DSI panel bridge instance if a panel is connected. + * + * Returns a drmm managed pointer to the DSI bridge if successful, or + * an error pointer otherwise. + */ +struct drm_bridge *drmm_of_dsi_get_bridge(struct drm_device *drm, + struct device_node *np, + u32 port, u32 endpoint) +{ + struct drm_bridge *bridge; + struct drm_panel *panel; + int ret; + + ret = drm_of_dsi_find_panel_or_bridge(np, port, endpoint, + &panel, &bridge); + if (ret) + return ERR_PTR(ret); + + if (panel) + bridge = drmm_panel_bridge_add(drm, panel); + + return bridge; +} +EXPORT_SYMBOL(drmm_of_dsi_get_bridge); + #endif diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 42f86327b40a..a1a31704b917 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -931,6 +931,9 @@ struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node u32 port, u32 endpoint); struct drm_bridge *drmm_of_get_bridge(struct drm_device *drm, struct device_node *node, u32 port, u32 endpoint); +struct drm_bridge *drmm_of_dsi_get_bridge(struct drm_device *drm, + struct device_node *node, + u32 port, u32 endpoint); #else static inline struct drm_bridge *devm_drm_of_get_bridge(struct device *dev, struct device_node *node, @@ -947,6 +950,13 @@ static inline struct drm_bridge *drmm_of_get_bridge(struct drm_device *drm, { return ERR_PTR(-ENODEV); } + +static inline struct drm_bridge *drmm_of_dsi_get_bridge(struct drm_device *drm, + struct device_node *node, + u32 port, u32 endpoint) +{ + return ERR_PTR(-ENODEV); +} #endif #endif From patchwork Wed Mar 29 13:16:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2828 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 75512414BB for ; Wed, 29 Mar 2023 15:18:08 +0200 (CEST) Received: by mail-pf1-f197.google.com with SMTP id b8-20020aa78708000000b005eaa50faa35sf7469433pfo.20 for ; Wed, 29 Mar 2023 06:18:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095887; cv=pass; d=google.com; s=arc-20160816; b=OE+sWCmUGuIVuhr6jF890C6F8AnsFA9HsdibzQ31kdbdYvKzE9heE7cGiY8V01Pyim wXAmsj42Vye0xChSNtGw9HZtAN5rDXKbxzXwYD0EUakBLWTnz6MyJ7S8D/q3qj2wpl+d KrFZCmf8tFXDwA2KbGT8Ap1qB/YbNkLq75UPgXMt7akTvPEgrjUj5xA+IJwTRZ+l1XGb qXktu1FjWzkjqhkKUDr6Ybr4fLo05o6HnAZQ0chDQdx3ZhURxJFZkkUlxm1gNFGx9CUQ rWx/lU4mJ/2lxm1P0CoRLkgHR7J9d1rajdNFCg9T5rEafxLf7Xbq3Tue9cfYiq49FN/p L5Sw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yIoWhZEG3P3DxLvki9tIi/eP3HJI/GD2xijO83Z8auI=; b=Swtc9UyaJ2fnYfXPvl7ZgcwDJ9rJ5CEQlWx5j9g0uBYGU8qncnz35KfIxChkFXcEBt vgvYOoZzhxCP4UHnEdAw/N8sLB9sdCjtxjHlGu1z1UKIQigsTHUpMCRl/7ih4IDoyM4J wh0OBeGbRep9T+C9nD8UfyskbIwMf/r9Y/WoATLoVHk3SRfTXJ71L9YqcvthOZAlFfMr 39JD0wqdnPpPJEHPWOLJiZ5TNjXBqG+UP0kXlfKMVG9ib6+bv6uUfEcmag/4THn3qNhB XDm65JEzqn4mDTAzI9BOM7RxU3kQ3+nj6O+0oJ1z/ThNVOhJZmnRab/NsUT4BtbNYHIt PZsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dq2gflaX; 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=1680095887; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=yIoWhZEG3P3DxLvki9tIi/eP3HJI/GD2xijO83Z8auI=; b=o0UMlp6Uv0XdB9oemXcbVJ1yS0pTncFrygD+53JwarSvnKbp0gU8h0otAmj1nRTsGQ UgKKmzBgtR0N+yJLnQXX8AS1++ylSDgwDQ6RClP3mFDmc8S+PhU+hH3J1bQhLBw9EhTU 6wV6G9x1y4gEupFfkmsjvHRaAuON3oblUmoqc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095887; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yIoWhZEG3P3DxLvki9tIi/eP3HJI/GD2xijO83Z8auI=; b=39j6vgC7dgbGm6uOuR3B+freDajLcjrs7DxuK458QgRE2NBNQCWfCgAY7W5/Ztd54E jZBpKZTDdYATU1sf6gEKxcxmkmkNc/tbeBMqKoE8EPynrFHcEktFe2SGFjNFO6bUcXoC 2CA7pnZ8qMAhUITT50gTtli3UwaAWQtpggKLGYnFFz8HgIeNwPLWOL/hgouglUlT9/Jy IqjW7rtj2s6gXMkbeSid4LSzBeYDKlhV28heVemDCyBUF2IXHCLUwxzNfnF1GvTdxgCJ rS8cBHX47UzqroyBkawwVt+I4lWMNjYsENUs1UKv+qWmw2X72wAh9KNZCXmVmDj4i8j4 cM+A== X-Gm-Message-State: AAQBX9cH2PvrLUAwMNt0+n6G5z0JxzZtDqTqp8JP6WfVxa6JXXErFWxB k2140GoiFio3floZIHfOxdrG5T9i X-Google-Smtp-Source: AKy350bpjOmZzGvS1rT+FDu6CRmsozzRN0Y1CCttYe5eV1f97snlT0XzdpPPad3gDqyGrficF3VJzw== X-Received: by 2002:a63:dd0f:0:b0:4fc:a80e:e6ec with SMTP id t15-20020a63dd0f000000b004fca80ee6ecmr5320206pgg.5.1680095887084; Wed, 29 Mar 2023 06:18:07 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4d8f:b0:234:2ef4:2e9 with SMTP id oj15-20020a17090b4d8f00b002342ef402e9ls2222036pjb.0.-pod-control-gmail; Wed, 29 Mar 2023 06:18:06 -0700 (PDT) X-Received: by 2002:a17:90b:1b0c:b0:23f:5273:1ae1 with SMTP id nu12-20020a17090b1b0c00b0023f52731ae1mr20352649pjb.14.1680095886206; Wed, 29 Mar 2023 06:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095886; cv=none; d=google.com; s=arc-20160816; b=LCWCPjEOBYToeK2H0z9Wcd4Ivzaj6qSoQqYBlAABadOteeybuMjT04NqqLPtovG0CM tPzKhW9YaL9bJE75/DeQoCs47jkmZkycbzJfU81ep/MWCvDP03cdttYP994KkMRWx9AG ez2SFcO7kgXAFUcw7aCfcsp9V9JXT+JWcOaACS6KsMHYkQSQmDTNkKB8EA7/6yqHiMRU lOHEC2sHoHzohyExlrKfyd7rwo776aFlK7Oj4v/lfpxQoXSMUaI6N+rOkyqjGZKstrZG 6puo2y5ABStcrEr5D9eyTI0X8gwH/YH720lfuc1AhRjIfKki6hJLrTB4rlHlvFM3kOv8 v0yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cv6/4Vvh1vUo/moG1pbR53z8ML2U7R1WxCNXSlwjPc4=; b=of1q1IlmwJXGf1O5MSigaRfi4+AqQxluHEBFA84/mlqT8ozddHOXdG6fM2N+fQRhEU H3/KoHEj4xK20YAkejST/r4eGDYWiQ+FlJa1ugyZpSCAeAeDlJPRsHL0m4hSHu9Kn8JZ Op0oDnJe546t9DBCjTA3ZFS++CaHa5rEWdcQOT3fIsqpPBMNAmvsGipMqzHAE8hoVdo2 Ps6YT97NcWvJb8dXFCayoynJir7a/J9tKIYf4M2pAVxZQGW3ntoFVd4vFrz4iubBqVVe 3+NyGIriumg4QyoGbKDtnzMnI2qWQd7KnS/daNSOQthoUiMKeMwjuG9NFjbd1B/zz4ib VLRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dq2gflaX; 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 fa13-20020a17090af0cd00b0023417e10e13sor794855pjb.19.2023.03.29.06.18.06 for (Google Transport Security); Wed, 29 Mar 2023 06:18:06 -0700 (PDT) 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:90a:19d:b0:23f:ebf2:d3de with SMTP id 29-20020a17090a019d00b0023febf2d3demr21536210pjc.27.1680095885930; Wed, 29 Mar 2023 06:18:05 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.17.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:05 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 03/12] drm: panel: feiyang-fy07024di26a30d: Enable prepare_prev_first flag Date: Wed, 29 Mar 2023 18:46:09 +0530 Message-Id: <20230329131615.1328366-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=dq2gflaX; 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 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: , Enable the drm panel prepare_prev_first flag for feiyang-fy07024di26a30d so-that the previous controller should be prepared first before the prepare for the panel is called.     This makes sure that the previous controller(sun6i-mipi-dsi), likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c index df493da50afe..77d66dbe01fe 100644 --- a/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c +++ b/drivers/gpu/drm/panel/panel-feiyang-fy07024di26a30d.c @@ -198,6 +198,7 @@ static int feiyang_dsi_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, &dsi->dev, &feiyang_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; ctx->dvdd = devm_regulator_get(&dsi->dev, "dvdd"); if (IS_ERR(ctx->dvdd)) From patchwork Wed Mar 29 13:16:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2829 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id C1598414BB for ; Wed, 29 Mar 2023 15:18:15 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id j18-20020a170902da9200b001a055243657sf9408915plx.19 for ; Wed, 29 Mar 2023 06:18:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095894; cv=pass; d=google.com; s=arc-20160816; b=VE1Rxc9mIbIRZyzx5j+9MqFpiaWg8hBP3EPsa+8zBN2flSvan1mplzvlqwlppj71XE 1/iqzP+e8vnihv2FT8HYnSucrddFq7NhKvVtho50SNcuKEr3G9Axqzk546D4z5L0dDdf RE4C/9erW02Sk17Cf/2ewiTHocEW5tInEwdiU7jUq5qO+q/f1sYItJmidWVww+2o39xR DOJsVLfvEE8hs1PlnaBe1592FtHlwEew9gKw54VjtoozjSzYUe9PJOdSNYrBDL0+qzsr x6vbM+48k9Dgrk6P70QATbRujRo9lPQuyVS4yH9Oo5qAtuY7181hEKcaC4f0vdhWdrTA q0GQ== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ILG+GXP1iTB/k1Z87/7jzoFF3PlDLBkGLV2VfkgKUpU=; b=ooEBy/9p+XHAOrXX+Ugx6hy1tyUDXbxdW6rwsD3nJVDVNguXdr2CDpNcDlzklNM0Zz +nHSC6ar3EFqka9aGC3GswL0uoCz2Brp1jFRzMX1sJw8PvqexNc8/PEBatn96Lm1OoNQ 7jJ+JPHU2W4oOMROCbGnEKlV86I6fy9WKAcHuQfycKMjcTLwDnp1zc+jCwd9tJ0B7VD7 6jznYuZGEDA82ZtCZXWYHFf7DjPtVQFMWHuX3XBR7mqLWzffzVgkppSQwOctEwHG6qdO uY8fnyvA0h9wvwtq97yyKuaJEesBoPzbH5EclapxD8kaUTdsvI11k4jFEno6wPvN1g5I rbIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pNuu1Gkc; 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=1680095894; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=ILG+GXP1iTB/k1Z87/7jzoFF3PlDLBkGLV2VfkgKUpU=; b=AkNWS/0iIep7+b8KvDYo41Fpzx6WMw+eviBdnJrAtlxVSyscaMEfUlSCHd9m0Lb3zW UP6zm2dr1wyINWz7R6iPiXGuIv6nu2r/kLWaF8G58/twQqI9G2yoYyB3pifbckszlfWU 1NO2s9OQzh4MhNud2qQJfqnAu86EQ+o4KQsWI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095894; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ILG+GXP1iTB/k1Z87/7jzoFF3PlDLBkGLV2VfkgKUpU=; b=oP1krnRoY9slgruKlxUgUe32+WfNrOv/MlZlszXiR8f5y+tVTbCPy7PXi12tiHWHcx 2eBOATuCLZhPbq2pe7OahTYwJk0cDozTaf+U8/ddLqF0SqAKz9CmbzXq9T0vaD/OcGjm 5Wpj53bW/4k+aYKDWceJlOx1INY7bsmiMfG6hZdn0+Cb0KowP5d0OTKNbxBaTWuIN9Mv cLZCUXMRDiN9Kd4nnKCgbS5qbuqNqTbs/H2LmS4bXOG9pNg99PU3fmIEkZZH8Um364nD n58PO2PsvibrvGMdrCuZy0/knKj993rFQXcs0ldSgzaHukxUpwYLJ0PjxAg2dAe5uPb8 /yVw== X-Gm-Message-State: AAQBX9flBFjMFK2k1igpbzDOTC8Bsbqwpz7gqKuIkJFSNdpeC6c6XOmn WJeeQWLg+fZiDlL7UvaGJesew/KE X-Google-Smtp-Source: AKy350aOHEfMKvH7pQGh1EXzLBJeNnqdRS7tg+LRtN1pofpmUefXdgSPGvabFl1FR2eNmedAa/nJBA== X-Received: by 2002:a17:902:ecd2:b0:1a2:278d:1824 with SMTP id a18-20020a170902ecd200b001a2278d1824mr6128824plh.12.1680095894434; Wed, 29 Mar 2023 06:18:14 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:f7cf:b0:19c:a86d:b340 with SMTP id h15-20020a170902f7cf00b0019ca86db340ls12563116plw.9.-pod-prod-gmail; Wed, 29 Mar 2023 06:18:12 -0700 (PDT) X-Received: by 2002:a17:90b:3846:b0:236:6a28:f781 with SMTP id nl6-20020a17090b384600b002366a28f781mr21214659pjb.22.1680095892514; Wed, 29 Mar 2023 06:18:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095892; cv=none; d=google.com; s=arc-20160816; b=cL7c7/0cPjPOBTJtIBSCbTeSpV4VjeYJRaEY8umSnfXUCF41PQ/+SsA68aI0WuOZ8e 7YfeA9FIPL8SYs6EF206VkgRPiXILhcuvlU04xOJCQJ31iWFZCGQ60+Gly3VUXTSdC45 T6HYRNg/JALLpHQ2Wd66pWfLzbBOpj7oxXDzmPdGD4CqboUPZFWedrZnpTqOiPwh9UPJ HRZ+/ljZl0MSAST1gEprTHzgher6prbNuS89A4QwwsJauMPhyXloRJ2yR/xF57JYewfB WSR8bhTRHXTqcWtHTVV3GUMWG3AVBPr7Ax276KFfX4WQTNaNXCZCBaIVAFy1XlK9Edal 34lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=d+PX9J3U7p5qZlBeWmtYaZVahtk7x+bKgv0zxDQ5NKg=; b=p8onSctCPwxxOU6fDeqeJOdxikK87J3a4k1YV0kIZPI3gEJ+QqKEY1242hmCaM6u1U LVJlaCcgfaPXi993omV2CAx7vzQSpX7y4wq++BvgBr2LLuIAKEEkN+1h3YfpW0FyqPYA 5VroNnHiPE+gh42pf6BKlndKkA3fo8p9lfKrxOwsOlmghZqc0Ri40Qrt2+DhSHmkSHsn 5Uzbj/P2psCQWcCOvOaiNAa/CW1RtNRTZux1TErpxXMgDT7R5WpNZqJDAujDwwRcpZku YylREWgPIw/zI9oEgAlWaoxaIiPZBcBAf6b+u5FXOe4EFNaYtArl27YsVyTSkJKZV/3l Es5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pNuu1Gkc; 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 bk18-20020a17090b081200b0023cfb3c221dsor825379pjb.38.2023.03.29.06.18.12 for (Google Transport Security); Wed, 29 Mar 2023 06:18:12 -0700 (PDT) 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:90b:3b44:b0:23b:50ff:59ba with SMTP id ot4-20020a17090b3b4400b0023b50ff59bamr19952654pjb.21.1680095892216; Wed, 29 Mar 2023 06:18:12 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:11 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 04/12] drm: panel: sitronix-st7701: Enable prepare_prev_first for ts8550b Date: Wed, 29 Mar 2023 18:46:10 +0530 Message-Id: <20230329131615.1328366-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=pNuu1Gkc; 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 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: , Enable the drm panel prepare_prev_first flag for ts8550b panel so-that the previous controller should be prepared first before the prepare for the panel is called.     This makes sure that the previous controller(sun6i-mipi-dsi), likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/panel/panel-sitronix-st7701.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c index 7eae83aa0ea1..dc7677412023 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -105,6 +105,7 @@ struct st7701_panel_desc { unsigned int lanes; enum mipi_dsi_pixel_format format; unsigned int panel_sleep_delay; + bool prepare_prev_first; /* TFT matrix driver configuration, panel specific. */ const u8 pv_gamma[16]; /* Positive voltage gamma control */ @@ -564,6 +565,7 @@ static const struct st7701_panel_desc ts8550b_desc = { .lanes = 2, .format = MIPI_DSI_FMT_RGB888, .panel_sleep_delay = 80, /* panel need extra 80ms for sleep out cmd */ + .prepare_prev_first = true, .pv_gamma = { CFIELD_PREP(DSI_CMD2_BK0_GAMCTRL_AJ_MASK, 0) | @@ -875,6 +877,7 @@ static int st7701_dsi_probe(struct mipi_dsi_device *dsi) drm_panel_init(&st7701->panel, &dsi->dev, &st7701_funcs, DRM_MODE_CONNECTOR_DSI); + st7701->panel.prepare_prev_first = desc->prepare_prev_first; /** * Once sleep out has been issued, ST7701 IC required to wait 120ms From patchwork Wed Mar 29 13:16:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2830 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B748D414BB for ; Wed, 29 Mar 2023 15:18:21 +0200 (CEST) Received: by mail-pj1-f70.google.com with SMTP id q8-20020a17090ad38800b0023f116f305bsf7702160pju.0 for ; Wed, 29 Mar 2023 06:18:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095900; cv=pass; d=google.com; s=arc-20160816; b=IA+gJ1jA+mHhQ/9XqbllkcyllqCzPIm8iOvlC1lwtOxI+xLzc3uEcZheC8BHJlCtBK Tqk5TStAORvL0lHNdqfrysvoc7OPnFba9GWVpTT1XPlRW48unLWeUaqEkodyGYNuDnXo MVDNDgERt3L6iEahP4caCCWXbV4OjpYPVWtKlX9enzZmIU+HB1yALNLodNnB2Q3hC5YJ Ro1JDqFMYMxBHqWWulWtWwhLLH0aoimXwYjKLuQ86mVOVk7xzHYVJf7+v8k0wopS60mU ammRpfvwL1H50swwolVwhW+nZX5MNDikSV7ASczYlA08XJgTAw2qSGTROTIHkhHErJd7 f/hw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zf0llEd/mVETTfkDa0b39Wl3dJlDNm2Bv3uLzJgi3zE=; b=SGWyb/9HJqEf+1VcbUM92BTMvTEGPGHqBQuYDaj0pqlRwxDLRhJNGNI4WKksxVWXWd fjvWIvKnO6Mae5kuLIRv7L8/VsKeTiaB3qjlOyFJNIm07CD4UJji7YIinXf9vI8I56/y mcbRkStvmpJ4Ht/4eAcB0Y8Fc9tOnk0/flVh209rxOPLX3SvQL8YWr0P4F4L22EDyTGj FT7xLIVnNZ0WBnNLTdL9EwI63WkU21pu67rqvgn8QTeG9wIfcr0kH/FBUQBNa8mp5mSn q+pujn11ztgjMgpVswY/FU76bsQcmS+bRPWkMXvZPMx4kxKWTuZYB2ir5LkO50KgpSgS 0qag== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Ou/OtLmp"; 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=1680095900; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=Zf0llEd/mVETTfkDa0b39Wl3dJlDNm2Bv3uLzJgi3zE=; b=MgCqfhzTQA1BMqBJYVkWY/6HcFFYqXNVCucJgS+kiyqLZMm4OSpEmqIOQBLnRKO7rN /mo+IYeRhNFjZ7XEE55QuGgHMhnVCESNWV4REpQyr3ETrg3Aw7S38yv9bVluZ/zwWvSR vqZqETNWQsEFEBk+SmD9v2lNvZ6bBEzFoJQog= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095900; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zf0llEd/mVETTfkDa0b39Wl3dJlDNm2Bv3uLzJgi3zE=; b=OkdSwPNIHhzN2eD3iot6mSGK9a8AepZ58O2d1ZcpmbVBI9DRb7WVu4zMlpnDnRlpvQ X5IabaDYl8UbTmVpkfnOXl2dXEkXnsE2wPA7QAECLY2mgtePw2A3XKm7+z+1v8iZMe9k PA0yLefj+5OCIr2Vl0MOyGoWnMnzmk5HqiZz+m6/hS5EJ3TOs7krWqQQ75HnhpOiWGzI JAbBgfI+n97YQeo2cxsYdxhAc27r+r8/SzRFpd2c4DtS3z52kxbU8zkeMVliIxZaAMC1 oQUxFN5hO+n8lkaweAoJd5g3wyYy9+KIiN0oj4gSzWrXcvktjp/1CrVktLbBS/TbC3YN OgHQ== X-Gm-Message-State: AAQBX9dw8Pxu/zNgW9IfaLq/fvrCfP0ova4D/5OITGymwHq4zXaeelUD x0Gp82iOfmbzbFLvFSCA7BCzChxC X-Google-Smtp-Source: AKy350Zmpmo9F2QyeFRw4NWC9Jv9/qlg/AGa+8dkf3HV1Z/fAdGSOXbx2AO7wJD77CM45XQprx7CJw== X-Received: by 2002:a05:6a00:1a03:b0:623:8990:4712 with SMTP id g3-20020a056a001a0300b0062389904712mr10251509pfv.1.1680095900519; Wed, 29 Mar 2023 06:18:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:33c3:b0:23d:3f08:4703 with SMTP id lk3-20020a17090b33c300b0023d3f084703ls2198488pjb.1.-pod-canary-gmail; Wed, 29 Mar 2023 06:18:20 -0700 (PDT) X-Received: by 2002:a17:902:e543:b0:19a:e762:a1af with SMTP id n3-20020a170902e54300b0019ae762a1afmr2202431plf.33.1680095899605; Wed, 29 Mar 2023 06:18:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095899; cv=none; d=google.com; s=arc-20160816; b=HSuKhf7htEVj5rpHX7dlNUSy1fVdYbQtsb4zNb06oqfK9djO23shHJZCNQxDS8AI9g l/7WXeCDB34+miW68lfO/x4D2wp6zgDzsiVrJxaGlSYoPCc33NNiK/mwC8m/UbEcwNen cTDWSI0IO5zj32qoMDJP/vrriBE2gNo+Bi8wQ48GBw0oKA7DgJUpqhO9+v5CtFbwB3Z+ uCJP0FfYJZp5ZzGOfmHviVMsCtkdFzp+kM/4lWDJKkEukbYVAKsfVnofJ7GKTRBHj+sk 40wyCZ5YebmYmKLO4LkMD7076x3rm3Rh0QuzhXQAbO1Bz4U/ch9vlI1UiQSIAuEOPuzf DEbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=f+Jq4CQBAwZOjvBLdvikVzLpWjI0SGbxRpeBtUQtDcQ=; b=bhLYGNeMN4DCkzMti9bPJAhth1NATF6DiZJF7ELFk7ov3LCHYObvW99Zx72bdYGI3r gvCNGVt59QEwyTPL6n5Qnj/fxKoblDdIbUAS9JSv+yF8aKB6YBRRl4PKyS0/mOTiEAgE aQmBTkMu6TqdnqPXpqd3KxqkeEKP8+vhVilUmVw35xMVPmPM5KfK5fWajXuI/NfmxLYz Hq+dZWf/1A2Gk8qb+hxkLjjQUvd6Mw0h5fbYivxBKbAglrFqgfmdy3bSKUQ5v6S/J4s2 7NdDn8aiKyBJuJxthxiXQvyFaRtL43yn90X9FXoLnoBafRse3mjADsV55poOwTkgfbIX 3SpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Ou/OtLmp"; 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 gw6-20020a17090b0a4600b0023d059fa83asor839061pjb.43.2023.03.29.06.18.19 for (Google Transport Security); Wed, 29 Mar 2023 06:18:19 -0700 (PDT) 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:90b:1e4f:b0:23b:4438:e9ee with SMTP id pi15-20020a17090b1e4f00b0023b4438e9eemr2098113pjb.12.1680095899302; Wed, 29 Mar 2023 06:18:19 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:18 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki , Ondrej Jirman Subject: [PATCH v7 05/12] drm: panel: sitronix-st7703: Enable prepare_prev_first for xbd599 Date: Wed, 29 Mar 2023 18:46:11 +0530 Message-Id: <20230329131615.1328366-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="Ou/OtLmp"; 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 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: , Enable the drm panel prepare_prev_first flag for xbd599 panel so-that the previous controller should be prepared first before the prepare for the panel is called.     This makes sure that the previous controller(sun6i-mipi-dsi), likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Cc: Ondrej Jirman Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/panel/panel-sitronix-st7703.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c index 6747ca237ced..6e6112f5d971 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c @@ -65,6 +65,7 @@ struct st7703_panel_desc { unsigned int lanes; unsigned long mode_flags; enum mipi_dsi_pixel_format format; + bool prepare_prev_first; int (*init_sequence)(struct st7703 *ctx); }; @@ -335,6 +336,7 @@ static const struct st7703_panel_desc xbd599_desc = { .lanes = 4, .mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE, .format = MIPI_DSI_FMT_RGB888, + .prepare_prev_first = true, .init_sequence = xbd599_init_sequence, }; @@ -544,6 +546,7 @@ static int st7703_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, dev, &st7703_drm_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = ctx->desc->prepare_prev_first; ret = drm_panel_of_backlight(&ctx->panel); if (ret) From patchwork Wed Mar 29 13:16:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2831 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 24617414BB for ; Wed, 29 Mar 2023 15:18:28 +0200 (CEST) Received: by mail-pg1-f197.google.com with SMTP id t2-20020a632d02000000b005075b896422sf4311061pgt.19 for ; Wed, 29 Mar 2023 06:18:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095907; cv=pass; d=google.com; s=arc-20160816; b=x095YnfKREQLz+fYXwtoT2eZ5DF1isEohdoRw42+uErVRurDkYl5kzQvJa9qyQQ07O I8qe2f+JECIA8wZdVKsihqQhNqAHU7LDY6VQCIBd8y+bWunGbBhTH1XPG3qijksFbuob yX1fu53IGjmBYPfX+a1y6nqj3HjfZuG0RoHEGlSg8lsh7b9jMLCVfchfv0ib7iE0SV8i 9avPoUygyVnzXQEKhT4RgH3czGMr7/H3JZFRFy4pqZP1vphHzNWVioyHDifPjiUns01n bojgRpF+XPnf/FERD0pfj0Pr2WJ3/35sbaedoCrkKHaBXSmApKPQ5f2Xe81EULxs+Eza p6SQ== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pvuZbXsMEyj2vWGz0/PGuyewVzRUEWPIzwV0mP8tZk8=; b=LIy+FG2jAzbKav2absr3DRjYQ4ATevaY7rA1niZjFwTJ/bMxtvxr3tlrilviOWTIyt FqvIJz6fOzZd1SZTvkn+Cw7hfsDfvLsNZ37YarVMYaAOaNVTvoqIWIMvValB8sED0f0y SNaX8SVcxp2RYpupgn/kE4r8hvc85ml4KUwOfvwemvJRlIuoluTXAmpwnK4jN8Us7J5g cMGdsay/mreGzV1XphOe3mN4Yp9Bth4lh6tCXSKyvxmynECW9IasemLbzsJlZtLW5J/H pjtTdN10HKvRoHbW1geo1ipcicYRVtthHrubbrEpE3lNZgE+Ttqee4eH1xHMMgFzUf3n oigA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="UdCHrE7/"; 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=1680095907; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=pvuZbXsMEyj2vWGz0/PGuyewVzRUEWPIzwV0mP8tZk8=; b=gXII7xMRJuRf6qkROSoSIaB5rJ4GroPPOmPIYYKwz17AitNn8Nc+T91fGU8wA5F7vh I7Ujym2ritGP67GC3NMKRl0LkYa24XQXJ3Sz1dJR97CXiier7VtSRBkVQj31eaMncUzn /k0o6CZLkNQPUOSaL83cOB/d7rF1meRkfsnNg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095907; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pvuZbXsMEyj2vWGz0/PGuyewVzRUEWPIzwV0mP8tZk8=; b=UjcoLrPacEDNIlhpxXEVQy/XZ7neaGotHKal8Mz3E5XDzNqAf+u2la68TDswU0aG7s 0KwQVWHQPV+1P9UgPJEYsAOW6lZy57FxxNrvE70x3CujmD+DMdRPUxD6We0fjIJ6MXrA 5MtPC3EdQ2ZziguQ1ltPk7BVnu5a/uXJ06RfURLdtF4afZDAVZJqgnSLAR1fdmsKoSwj OBcW3jY9G3JsOF87B4hpWupcwJj4l1MVhU+ha5KybiFmCNjwYMnzJpOoGNRtoWo3aymu hqkN3JnIzxbSNBcEZduJaoTPNGzDoKlC+pS4x06vE4nNaQHGr/JZqpV7arBGfM+INRzY SEoQ== X-Gm-Message-State: AAQBX9fYtj29W9nMRHUyTh7Xq9SJn7inAVKoUTr/VAK3BLhTJboGoiub Be2PP+At6U5+b7S1gFSaKRrybXTSRdHS+AMQ X-Google-Smtp-Source: AKy350ZlyT6W+Xme/F1IP/IpbgAaW0dDI+g71ULaG32gv0m28qMLqIqtOtjCtknUHGHO3eBkD7plhQ== X-Received: by 2002:a17:902:e88e:b0:1a0:7630:8ef9 with SMTP id w14-20020a170902e88e00b001a076308ef9mr7456813plg.12.1680095906919; Wed, 29 Mar 2023 06:18:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:4d8f:b0:234:2ef4:2e9 with SMTP id oj15-20020a17090b4d8f00b002342ef402e9ls2222760pjb.0.-pod-control-gmail; Wed, 29 Mar 2023 06:18:26 -0700 (PDT) X-Received: by 2002:a17:90a:e7cb:b0:237:d44c:5861 with SMTP id kb11-20020a17090ae7cb00b00237d44c5861mr23223503pjb.12.1680095906124; Wed, 29 Mar 2023 06:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095906; cv=none; d=google.com; s=arc-20160816; b=nkYFdHfyyyaba30CCObLOKB2qnvadfC+aJxxwC3hgj524nYj2IaK2l3dX95YI0UZQQ 366gX7e3D7Fwn+K+Z+Bhx6Jd2NVZr7BNRLX4A9MaOBDEdnLnqdWZCdvXFjKqlzeTB6Mo byqTOAvn5iJUI54MsmEzPWYu7BYkbo8H2rtY0z9/BLoqLe5J7ey7MBlRFRGGwtMGZsX+ CEnpeNLnbeflnHFj52O6zB9jduuEm5XSXLvfzo7RtE66svBPHc+XcTDI+L3B9yiiY5I2 qSeFbFmSu1DLNrEdVChFP2mUmgFgC1kMRoZkw0lceqwunKlzVUtG9Hwgds6rVrJMlWaQ AyPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=O2tcpLeWl99rVNnc/BvvLtZEsLOgUmupjkNUsxeTVcU=; b=Iwm5FBOQVkJfDvu/ZWli5n8mfpnyWlwc2f9VXdUMwGhUSdq5HoypZxKuDDOiBB4Hcy 9lcYfgPKNj38WU2rcBelWekRQgr6/slGMxbAGLiMIsepLr//j7cmtBHi9pipsbaN6QeK hd8wxFYnNZ5MVayITbjOzOfvFtTzgvIioLkgSG1sKPowMsWq5eijIsFOaxyw/AMBUAkw ajn4A9Sug6tkyERgkOXrhFxZjuoc/akaD4krqjSETte0K+ZMKzXBhKvVUhZnhG5Wmuo2 O1UNgt3S7k0SnV0kniFUQq2vHUZUSE+PMCnnzzZXG2vNuAqK+/BuH0feEVruH3aIt9l3 ZCmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="UdCHrE7/"; 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 s7-20020a17090b070700b00231286c6f31sor850662pjz.12.2023.03.29.06.18.26 for (Google Transport Security); Wed, 29 Mar 2023 06:18:26 -0700 (PDT) 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:90b:4acf:b0:236:99c4:6096 with SMTP id mh15-20020a17090b4acf00b0023699c46096mr20503031pjb.35.1680095905750; Wed, 29 Mar 2023 06:18:25 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:25 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki , Icenowy Zheng Subject: [PATCH v7 06/12] drm: panel: feixin-k101-im2ba02: Enable prepare_prev_first flag Date: Wed, 29 Mar 2023 18:46:12 +0530 Message-Id: <20230329131615.1328366-7-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="UdCHrE7/"; 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 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: , Enable the drm panel prepare_prev_first flag for feixin-k101-im2ba02 so-that the previous controller should be prepared first before the prepare for the panel is called.     This makes sure that the previous controller(sun6i-mipi-dsi), likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Cc: Icenowy Zheng Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c index 76572c922983..77c936496eef 100644 --- a/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c +++ b/drivers/gpu/drm/panel/panel-feixin-k101-im2ba02.c @@ -466,6 +466,7 @@ static int k101_im2ba02_dsi_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, &dsi->dev, &k101_im2ba02_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = true; ret = drm_panel_of_backlight(&ctx->panel); if (ret) From patchwork Wed Mar 29 13:16:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2832 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 2C41B414BB for ; Wed, 29 Mar 2023 15:18:35 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id l1-20020a170903244100b001a0468b4afcsf9459834pls.12 for ; Wed, 29 Mar 2023 06:18:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095914; cv=pass; d=google.com; s=arc-20160816; b=AnUdY60YXEpqC+ZpZJBfiYhcu6eoZnRdRjwN09jOerLZaOOvQ638+iqPIbOVUnnJLb 9QcpA7kjIXqFASrIzr7zSWq6CuBkaBS7YZcSyNZO4P/3+L+07ch7NhPjhhmVxPne/OOl nF1LLejiu65vAzlrpzOmoPVy0WnlC+aeU5bdG4jFvF707kdc2SiR4YNcTIO3vNSh1u1q E+Wuk+BSks40IKBXMMHGv1ddNzBxIlTVArbW747w0Pe3A4sCqIeNKEigFd/UCfz7PUAx 3dGm0wt57FH5N3glx5aGGg1ssnzqmW/yi8V870oToDbiioNPwJhG+jlANHE4rqSJBSLI g9gw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=bZjmWD5beQ0ZFBqajHfsYTdUSK/oYYrHJ7V2kfuN5iE=; b=xfIju2MNUtG0CZ9fcBcOTYRH+PJwruJQSebU5XdaLlwOBMXln8MFulFPF8dMkds3Ce E1WspLGUAVr2LTtWkhzGfW7bTXW3okrCyCQ6Q+Y2xM0U+ZVCKkhDKpgwwtjqc/fDFUPR leiKEIcG65SV5uFXv1uRPlHajMlz3ju8s+0LZKX3KF2cqr3dnSdZE6eIwrRp6xhg7tGg BMJhI58vxiGrOrtgJyywYxAramA4sAC3iopC3fM6tyOSz1EXsCE8OfpfOcyD1XtIrV4t 2RpiMbsV9toxl3xpYQwA4bdJzydFiQ2sYrkWsGf3RJeY0/GkjrWS3GpBWzmXFIoIahlm 8DyA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PP7u3tIV; 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=1680095914; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=bZjmWD5beQ0ZFBqajHfsYTdUSK/oYYrHJ7V2kfuN5iE=; b=HG4Vy2gynHh+QKbnEKGd/NOjLSmxV+sC7+p+aGHogTpFzT9JupS3I8Fxd/xQK0uSBV mKl71tjZjOXxe9YXFhxekQ8SsV7BoYg5i2SV9z52lrTZhYcB1l+h6i9M5JNDyweB4AKT cvvn534WO6IVWp42OrQ3ZsFwrNq1irDUCXFIE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095914; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bZjmWD5beQ0ZFBqajHfsYTdUSK/oYYrHJ7V2kfuN5iE=; b=VpvMR6ds/FOvhTxPYdKYdflrrp/AyYmPSECf9uJ4pq+MNzEkRmAW6RwMi3aOb06rbd mqSVBgcPgGaTpi1f/7RoOfYd3TUmL3K+R8tiqfdT4hJB+rTukw7vzDE2ZU3kaoNnsNQX 0DJvp3RMp6ElG391NlkQ2ImUfBklumxj01otNEjaK3bPn4hQll434sL09gzcWFQjNHKY WipO/K9iN9dF+9VTs9D/48eqgClV9OHcnLq3F7ba6LyA8MLiPiWsJjr/cjcauZ1Nbq2v jm3nlH3/FELM7mvLOOa+w6gy8BmrmLgECo0/BuX0lSqXtaBw2L91yHlIHMRGYkEDljFZ eP7A== X-Gm-Message-State: AAQBX9c6Q49CxmraShbuN24OvniLVfCWQnqGkDTs5JOUJwEGe0Xi1aXC WZiWqwwh9OUBPIagZiUj7P9Q51z5+cf7AWMV X-Google-Smtp-Source: AKy350YhyEBwZ+2oZszYOBf1JG8dn6mwB4yP7vReR7XWm9cVg2YTZQ0ii2UBiqjRPod4t57VG3SNwg== X-Received: by 2002:a17:90a:4595:b0:23e:fad0:dda1 with SMTP id v21-20020a17090a459500b0023efad0dda1mr5696111pjg.1.1680095913969; Wed, 29 Mar 2023 06:18:33 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:a2e:b0:237:18be:2595 with SMTP id o43-20020a17090a0a2e00b0023718be2595ls2190481pjo.3.-pod-control-gmail; Wed, 29 Mar 2023 06:18:33 -0700 (PDT) X-Received: by 2002:a17:90a:196:b0:234:5eb:2177 with SMTP id 22-20020a17090a019600b0023405eb2177mr22672669pjc.9.1680095913145; Wed, 29 Mar 2023 06:18:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095913; cv=none; d=google.com; s=arc-20160816; b=cddvkz5a+YVbh60EVrcM5KxiWuaO9Y7zFuZBe1TQ4NNBgMVjeaA6ukaqaZZcyF96Bb HYjIr/mIXJGR373sCTQVlsqIYQUBu7RZPIjrKSgE8BVHHuonqjbiUon40gVILpBGuPic gIrX8xOEiH4H7RXSe2GsrZCnIRClt/c4BavIQujJ7NvSn9qbjUEFYWb7BfQVBA7Y4y/Z l0oGgnlUIZt1EOC4wpwy8J0cZuqZNHINsN6pTHOmsmo2ZTxcSzxTiDg55ltp0cc0VmBt VW75Y3KMPdl/sia8fv6u10h+6e238e9cv2NJEFzrifsRInjFjjEldTyS0jQ2cKfS6mte BFWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=oygreZW8DvOSbrfdutvOrgL5JnDv+HmvzMABB2AWGTU=; b=d/kd9i9iMKcFGlnPKkTrsL94BuMLntJp+WekKadhc0gJPPwCrO4qceLKNsHjtyiUcq Qv2xeDf+W1PTkwIVMuS2p2VD06JA1eAUcqueKGZ9LZP+FcfHx4upjCOw8P1Zl1IUS/co EQPvAphSPZylFv8u6tY8O+YbqsninsdGojeUxu/IB7S/Z8xEEtfpdd596UADiqp2Rdm/ Si+L2WYD+FWBx6HhgH6xitppBLn1bCAvuNvXXStKZcI1xk0egNHYOOg3DG/xyHpcmhh2 A8omPJANmHh32AXX18pqY/yoQKoNNZKbqp00KUjIYH/1kpNDcokRL9c9gll56rwl6iad 0VTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PP7u3tIV; 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 h1-20020a17090ac38100b002344bdd90f1sor844723pjt.28.2023.03.29.06.18.33 for (Google Transport Security); Wed, 29 Mar 2023 06:18:33 -0700 (PDT) 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:90b:1d02:b0:23d:133a:62cc with SMTP id on2-20020a17090b1d0200b0023d133a62ccmr21046371pjb.17.1680095912864; Wed, 29 Mar 2023 06:18:32 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:32 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki , Icenowy Zheng Subject: [PATCH v7 07/12] drm: panel: ilitek-ili9881c: Enable prepare_prev_first for k101_im2byl02 Date: Wed, 29 Mar 2023 18:46:13 +0530 Message-Id: <20230329131615.1328366-8-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=PP7u3tIV; 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 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: , Enable the drm panel prepare_prev_first flag for k101_im2byl02 panel so-that the previous controller should be prepared first before the prepare for the panel is called.     This makes sure that the previous controller(sun6i-mipi-dsi), likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Cc: Icenowy Zheng Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c index 1ec696adf9de..102a1df0cea0 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c @@ -42,6 +42,7 @@ struct ili9881c_desc { const size_t init_length; const struct drm_display_mode *mode; const unsigned long mode_flags; + bool prepare_prev_first; }; struct ili9881c { @@ -891,6 +892,7 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi) drm_panel_init(&ctx->panel, &dsi->dev, &ili9881c_funcs, DRM_MODE_CONNECTOR_DSI); + ctx->panel.prepare_prev_first = ctx->desc->prepare_prev_first; ctx->power = devm_regulator_get(&dsi->dev, "power"); if (IS_ERR(ctx->power)) @@ -942,6 +944,7 @@ static const struct ili9881c_desc k101_im2byl02_desc = { .init_length = ARRAY_SIZE(k101_im2byl02_init), .mode = &k101_im2byl02_default_mode, .mode_flags = MIPI_DSI_MODE_VIDEO_SYNC_PULSE, + .prepare_prev_first = true, }; static const struct ili9881c_desc w552946aba_desc = { From patchwork Wed Mar 29 13:16:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2833 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A0BDD414BB for ; Wed, 29 Mar 2023 15:18:41 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id q9-20020a170902dac900b001a18ceff5ebsf9369315plx.4 for ; Wed, 29 Mar 2023 06:18:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095920; cv=pass; d=google.com; s=arc-20160816; b=H6ZGQOtzCIt3jBKq72X799BxwrPEhUszGnHK8jIk6wsMXYZ7kn0Lb0fCjkh5lFE5xp reOnaGjmk7Ycd+BMvMdqGKCtrbJSZEUmswJb8HhB0dWD0Tp2SFa2OOcGb7qKC420XWY0 FeexqZ5dwaGgGTvkrUJbRukJfB08dY6Ce4gAS5v4Dhtxf3KPYXJ39vAEs1IZZbGsqfSq Eaw/if3JZToXYfDfo4g9MEuk3C/x1P9NEMw6NLKdC9ggzxArpNJe7vtMmG7iQ4yO6nDD KiK2P9W6JilugMOElDrMhoBMSGlD9GckEPDip2CyyVCkRnMjTjngNEYuZAGc9Lywob51 6gZg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Zib/oXCNJSB2dMp8yqZNVCTfuZgbNcnBZ1p+a7T/HqI=; b=J9sqnXbpukcLXYkUUpmMnuuDTqZ8BnUmTpkN5N2tTgVwlHFAYZFLvueIIGkipiLBBN xnuhVN1Ex9muuZPkc9l2iGIQEWhT+9zTMteBuTDIddhxM/j/JHBVGqml5IrxWdZ8xclG ZQEMTCy7bLJMVpqGi4p6SeIArRlpByVOeL2UQSnIdXeHZk87eGiIXVOzGfVd3HyK4aX0 1RdBcww//yyVftkW/ZxtTKThvfzOt+7AdjQoxnsks12p7+YL06z37RhplBS1ckA1oHlj aUuFkiV+xrVFQMCAfE4Rmfs3ayqo5tEjDg+mLxwGwqv0jpwzVvuJ523oP4Y+mbeQ3ZRU torA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BxNdyUGA; 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=1680095920; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Zib/oXCNJSB2dMp8yqZNVCTfuZgbNcnBZ1p+a7T/HqI=; b=F6shbEdUs5wkeZtfbrcyujATG9TLactWB7ZL/vnDvl/EnGHGFRquKn6fQg9brNLkEq s+wH88mVv1LwwlDcbZGSPLnwyn3lTrgf7nqpUhuBNlCO2pGKpk6Hh8xJZRSM40Oxvc2l ZspNODfkiGIR7JA8Xr+hNXnUUMKqryF+DojJc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095920; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Zib/oXCNJSB2dMp8yqZNVCTfuZgbNcnBZ1p+a7T/HqI=; b=tQNkc5kBnzKOUCfowU2oAJIigFxwpl3h6C68WUmSHbXmEVVjzi9OJe+5qkS72pz561 C9XexPAGcTrBAmxX99hx8xXErQv8Ci3TBG9bQXUnXDixNr5Vq1ixG029midxlRP1j9BZ Owzefzo8UP1F4XJlAnhSZquFhyBGbCpktsFlNVWd/fui+BOVNSdcGRFTj1KpCwz2X+La 4wVQ2PBECqFtSnWJI3zOs4BI+fzbaMklZ3rAKEPF5Hn+0TIdAf2AslRRJ82HSihpkIYq yc4KiiDYPm2YmL+qJIBGlFPfnuqQ026LTxTf5/F9gtYRm6zWoKLoURRGlaanyzcrQ2xj hs0w== X-Gm-Message-State: AAQBX9dGAn0aQiwU4wpAUbsPOBW9tX0U/TckxLEH3JMEB5agPqL5fC6u 0ejDy46L5AAlj2acuAdCCLCPIjb6 X-Google-Smtp-Source: AKy350a9hCG19JxBGtPqoK2zFdp//ek9CQTbOSbtH/JAXPtlrKXi3wCTywAfqj27DQkKvpvR281kcQ== X-Received: by 2002:a63:1424:0:b0:503:4a2c:5f0 with SMTP id u36-20020a631424000000b005034a2c05f0mr5199884pgl.9.1680095920322; Wed, 29 Mar 2023 06:18:40 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:8bcc:b0:196:751e:4f6e with SMTP id r12-20020a1709028bcc00b00196751e4f6els12550761plo.10.-pod-prod-gmail; Wed, 29 Mar 2023 06:18:39 -0700 (PDT) X-Received: by 2002:a17:90b:4f48:b0:23a:87d1:9586 with SMTP id pj8-20020a17090b4f4800b0023a87d19586mr20233837pjb.23.1680095919336; Wed, 29 Mar 2023 06:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095919; cv=none; d=google.com; s=arc-20160816; b=GrPRJnNqcuGPym3xsz25vweuBhgaRsN5AzriVgofpmlzyqoUnPWDvJ43gl5WXaq8E4 lfEtCB2pzkaJ1tmZKSl8HMTCtLpLOv367VBaeJQZ5mpDnkFxzzsnJeAwYgrVwZ1vn+6n nuyc3/xPhnxIFsR+3uwSYegSM50GqLz6ImrOrc4ung+bqY5dNytnJRxAGyrzUBUYjnDO lU2jneGh9H/LXhJ1otxkZ0An6nNGL95jgGol0gMs4IQZAHAqv3Ylvs17vzOujeB3f9xr 2UaMIXvxMwvoj+6OZ+99O19bJM3nZrxUtpVYLqjCC0SmPJLv4fUsrBTfSNHb4f1ipcnL ZAeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=nd2Hzi5pbnX457/tZ1SGDUudK/Mgpe+Ly4/pUeQ6HnM=; b=VxXAM0/0aypDCEBCrxp2PLX6UyrrAnuUqR/5nKMco8kaNfWFC2S2zDbruBQUoD7kpe pjcaCuZgX56pe3AT5arJEJyvC7z6Qmg37T4B5akqzR4wZcsy10cSNbZsN54QT7vz3vn5 7B09oj8CgKU2HBCKBdAG6dNfK0lWOAfrk+Jl19pTLcJ8C5LiB4pErRN9V1g1IKbu3nHK u739lPwi1zqLuM5O6Xw33uNJwMewouMaQ5q1KMWqjHFzsIYgWRrVmK8i3RbTM4PkqpTR gOVCnpLB3xReu9ZvBWyfrw8qQUa4qVvnYFn9mdh9OyF3a1ua0zvAR1U+/rP18hdvf+b/ RBOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=BxNdyUGA; 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 u14-20020a17090a5e4e00b0023d3d7964desor850312pji.15.2023.03.29.06.18.39 for (Google Transport Security); Wed, 29 Mar 2023 06:18:39 -0700 (PDT) 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:90b:1d8e:b0:23f:37b6:48f4 with SMTP id pf14-20020a17090b1d8e00b0023f37b648f4mr20675024pjb.43.1680095918961; Wed, 29 Mar 2023 06:18:38 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:38 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 08/12] ARM: dts: sun8i: a33: Add endpoint@0 to dsi_in_tcon0 Date: Wed, 29 Mar 2023 18:46:14 +0530 Message-Id: <20230329131615.1328366-9-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> 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=BxNdyUGA; 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: , The DSI downstream devices are likely to be Panel, Bridge and I2C-Configured Bridge. It is possible to connect all three devices using upstream OF-graph port or ports node however only Panel and Bridge are possible to connect via child node but not possible to connect I2C-Configured Bridge via child node since I2C-Configure bridges are child of I2C not upstream DSI hosts and it must represent them via port or ports with endpoint linking. Allwinner R33 DSI node already has a port so add endpoint 0 for input tcon so that the downstream DSI devices can use endpoint 1 to connect Panel or Bridge or I2C-Configured Bridge. An example of the I2C-Configured downstream bridge representation is, i2c1 { bridge@1b { compatible = "ti,dlpc3433"; ports { port@0 { reg = <0>; bridge_in_dsi: endpoint { remote-endpoint = <&dsi_out_bridge>; data-lanes = <1 2 3 4>; }; }; port@2 { reg = <2>; bridge_out_dmd: endpoint { remote-endpoint = <&dmd_out_bridge>; }; }; }; }; }; dsi { compatible = "allwinner,sun6i-a31-mipi-dsi"; port { dsi_in_tcon0: endpoint@0 { reg = <0>; remote-endpoint = ; }; dsi_out_bridge: endpoint@1 { reg = <1>; remote-endpoint = <&bridge_in_dsi>; }; }; }; Note that existing device bindings are untouched and still represent the downstream devices via child nodes since the sun6i-mipi-dsi host will migrate to a standardized single helper to lookup for a downstream device via child or OF-graph port or port node. Signed-off-by: Jagan Teki --- Changes for v7: - new patch arch/arm/boot/dts/sun8i-a33.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi index b3d1bdfb5118..50c2424ec31e 100644 --- a/arch/arm/boot/dts/sun8i-a33.dtsi +++ b/arch/arm/boot/dts/sun8i-a33.dtsi @@ -269,7 +269,11 @@ dsi: dsi@1ca0000 { #size-cells = <0>; port { - dsi_in_tcon0: endpoint { + #address-cells = <1>; + #size-cells = <0>; + + dsi_in_tcon0: endpoint@0 { + reg = <0>; remote-endpoint = <&tcon0_out_dsi>; }; }; From patchwork Wed Mar 29 13:16:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2834 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id E6A01414BB for ; Wed, 29 Mar 2023 15:18:47 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id e5-20020a17090301c500b001a1aa687e4bsf9436873plh.17 for ; Wed, 29 Mar 2023 06:18:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095926; cv=pass; d=google.com; s=arc-20160816; b=SSbxtQi0XawA0da7wpYnXM50wjwgvoZEicyXOvwAnNvGsewYJTnR3t10aJUMyN1nW5 eqcnd3X2A3sTDEUBsnURi4q8POMJAdKeYOmVQ2h04cGY2n6S9Q8dvl5enJT+UTIFDX9m RLRtrpBvc5TeWM3E6dZQTPZ24IDlR3JdTi/IXisCtKjIL8Y7Jv+WpSke23bfBiImhiu7 ShmvIEbFcqqksgcDcTJsnA0iCNWYjZ4AnGWkzIrsYXc+Tx1bEIuZ+EPdElmEKy28PeXv agKZ5UgC8kC2LQ1QxulFloRBUWczaxAKoCNrxycgkKn0TQxLN9+O8hUbf8wtyblJYxmr h4fA== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=0kPMf5STnJGXg/gr/+r2B0YzlEZINEuvimdgZWzGh9s=; b=A+lSk9WCZNAs87o/29/K74k4XKpG139a5cWSvrOsaqitM7zjPM4T6+LJ4zTkf1l3cw SCLC1QM92tGDmwoTo3rr/Q9OpHJAEmMaQ6v7QsXUYR09J5PaERiUVRvyS3KqFRy4hFRT 8jeEXS9TautopNDoh6KHJelM+3M9jb8uHFJpGgmL6uRZ6Vnr504BVNKu4RneTdqNV5GQ 7XSBbhbP9DA2Azns++W5HkdozGLbyPOjLeWYQ7UWA6L8DIDtDdvz7tqFxddYjoo3bTDl vwFSX43nf911BSH5Fa35F5Th8LH3nxiwxjeLzdCXHkVHtrlz70SRciD1SChDAzHpcrLB F4TA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tkq5mhDm; 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=1680095926; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=0kPMf5STnJGXg/gr/+r2B0YzlEZINEuvimdgZWzGh9s=; b=UwKHwlb1gHiwL2AQIEvX1V3vRDzvW12A+BkLGnnPkJX/+ykmUqsY9Id6FMBF6yjMWH RLCUd9DRM/OYxhK1xvFTCIyzG4CmkgEKv3/bmqH4CA/gIEg0ql0sjI4LuFLnjhkm51At RhrYitZ1G4nqPsL8MCFsLYdHIBNJXA/bvS8sU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095926; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=0kPMf5STnJGXg/gr/+r2B0YzlEZINEuvimdgZWzGh9s=; b=vwPt9qzMpbJCes5Uw+FJC1ii6Yh5jtGmy3AvjEweQaSM+FMVRSivINzAF9ualLY7XB X34hms1B2KR3XbGxc8jsU41c85PzV02WGQUyGOd5yy1y8rLGNvJoj/H3u6kMNyRY68P8 FJ+ekiV+/GH20NpZqn1u9WM3FWc4L97JrI+NVOc5ruoK4j09B0ES5jhVVBGcAzCMwS9Q hnnxYAKTDLpv0u9aql7GmeLY/N1rZVfG+9ran6LD3OFSPQYSYKfmhpor2zXBtcDtZek1 KoG0/7xlqEtCU8tVc/E8o5LDOtqJVfAFcFLFADTsdrd9q2E+4q16qnDvPk4A3aaO2xR2 X8ZA== X-Gm-Message-State: AAQBX9eFV/Lp0XBCZBmUdVCXexvFxcKbpq0YJvVYbxBwEjaMuOB9No7e qxcl7vAhpou1Kf2b+tAl0Ii00lfM8FdpcsQ2 X-Google-Smtp-Source: AKy350ZbcAFqnQt15LPjOtzhKZPY4U+p8kiXWFTI/9+mGp9OY6znYO/85lgAOObjDlrTI3A2wEyz/w== X-Received: by 2002:a17:902:a502:b0:1a0:d6b:1211 with SMTP id s2-20020a170902a50200b001a00d6b1211mr6497991plq.6.1680095926694; Wed, 29 Mar 2023 06:18:46 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:1992:b0:237:7ef0:5b8 with SMTP id 18-20020a17090a199200b002377ef005b8ls2186067pji.3.-pod-canary-gmail; Wed, 29 Mar 2023 06:18:46 -0700 (PDT) X-Received: by 2002:a17:90b:3891:b0:237:3dfb:9095 with SMTP id mu17-20020a17090b389100b002373dfb9095mr21157640pjb.6.1680095925787; Wed, 29 Mar 2023 06:18:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095925; cv=none; d=google.com; s=arc-20160816; b=CJe1V6oywkM2RBAnkV+JBFPNYKaadRgd7UBl9AtKVr3ULQEhQzMaNhe19cB0k1LBC/ ZRFHqCiAAyxzNK11uFQ5Ql5W5mCGF1P0cX9Zpz/YL/X4K3+K8Wlxq4wdX0+lUDhc7SWL j+6ro4jKdnpjwWypoeiruuC5W7+zctkm4xSgiyNQ7qqkawKm14Oc1TQAYgzMIZ7Ad3a+ jNeGLErHqa1u+3YuRHVTYUxRQBWrHUIaf6OGWZoYrf1EH5udGWKSaYkiMhoXkHeY/9CG EEUfJ596tWbn0IZ4h+aWQj+0+AU2xA84CkecvftRbyUujbu+o3ObI+e4O3QzNKmZPdxv a6bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=ayYxgFJMhixN73Dm9Yf7ruaoOJe6G2KL+MHmxqG0S5Q=; b=wZpupWdntKaQ7WoP1ZUsRe1PicyTCaxh3f0ABJOGD4+AIJphwqMY3Dv2GGK85EjPjT XjaT0gtx6+TjN3PjZa6ODn17cR2iDpw0/OETKJqDaZyPKDL0uL7KqQCd2qr7exjM0ODS 8A7kYQLtJ6lOdKuwXV/Fe04nl7SzRZSk9a0iyk5ERO4w1Bywr4W9WwJDe17YCUoN5gFr ib5XuWd922niteq/tynZKuI4B0zyUdaOj166XAQYe+MvpwR7Uroa1jekGUH9sdW7pwjB X6oQ0f2NunAcf1byw9cOTFlhSUXRSKYPzv9mClpZX2LxJ066TtjizN/s9+E6Ytb3ZSIs HG9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Tkq5mhDm; 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 nk16-20020a17090b195000b0023d3857de45sor920503pjb.8.2023.03.29.06.18.45 for (Google Transport Security); Wed, 29 Mar 2023 06:18:45 -0700 (PDT) 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:90b:1b49:b0:23d:1fc0:dd20 with SMTP id nv9-20020a17090b1b4900b0023d1fc0dd20mr20207025pjb.17.1680095925196; Wed, 29 Mar 2023 06:18:45 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:44 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 09/12] arm64: dts: rockchip: a64: Add endpoint@0 to dsi_in_tcon0 Date: Wed, 29 Mar 2023 18:46:15 +0530 Message-Id: <20230329131615.1328366-10-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> 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=Tkq5mhDm; 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: , The DSI downstream devices are likely to be Panel, Bridge and I2C-Configured Bridge. It is possible to connect all three devices using upstream OF-graph port or ports node however only Panel and Bridge are possible to connect via child node but not possible to connect I2C-Configured Bridge via child node since I2C-Configure bridges are child of I2C not upstream DSI hosts and it must represent them via port or ports with endpoint linking. Allwinner A64 DSI node already has a port so add endpoint 0 for input tcon so that the downstream DSI devices can use endpoint 1 to connect Panel or Bridge or I2C-Configured Bridge. An example of the I2C-Configured downstream bridge representation is, i2c1 { bridge@1b { compatible = "ti,dlpc3433"; ports { port@0 { reg = <0>; bridge_in_dsi: endpoint { remote-endpoint = <&dsi_out_bridge>; data-lanes = <1 2 3 4>; }; }; port@2 { reg = <2>; bridge_out_dmd: endpoint { remote-endpoint = <&dmd_out_bridge>; }; }; }; }; }; dsi { compatible = "allwinner,sun50i-a64-mipi-dsi"; port { dsi_in_tcon0: endpoint@0 { reg = <0>; remote-endpoint = ; }; dsi_out_bridge: endpoint@1 { reg = <1>; remote-endpoint = <&bridge_in_dsi>; }; }; }; Note that existing device bindings are untouched and still represent the downstream devices via child nodes since the sun6i-mipi-dsi host will migrate to a standardized single helper to lookup for a downstream device via child or OF-graph port or port node. Signed-off-by: Jagan Teki --- Changes for v7: - new patch arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi index 77b5349f6087..3ed566dc2172 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi @@ -1189,7 +1189,11 @@ dsi: dsi@1ca0000 { #size-cells = <0>; port { - dsi_in_tcon0: endpoint { + #address-cells = <1>; + #size-cells = <0>; + + dsi_in_tcon0: endpoint@0 { + reg = <0>; remote-endpoint = <&tcon0_out_dsi>; }; }; From patchwork Wed Mar 29 13:19:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2835 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F0C014147B for ; Wed, 29 Mar 2023 15:19:42 +0200 (CEST) Received: by mail-pg1-f198.google.com with SMTP id d22-20020a63d716000000b00502e3fb8ff3sf4330287pgg.10 for ; Wed, 29 Mar 2023 06:19:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095981; cv=pass; d=google.com; s=arc-20160816; b=MIIoboImk3ql8ZOAwjttO/b26m33bMamcFrfNR7DdhgQ3vUuXxDL6Ptvb+CF8g12xK mGcGtsD3L4vvjrXWucqW8E1WvJ2Cst5yytC0ilsN7uA9DdEigPJeyARoGa0KU2t1neAI W1SXe3pLYmwLVkt1yOVlkIz/mJg5Km5xcGb7l6Hk1HoY0bi47T8TO/vcqXXLIFYWX0wA WGA8CSyVkiqdr11FxqMR2tW+H3ySBTp3ftr8Dx29bNqqtGlVWVc6B0n+PIw2NBHwph2C mBFhWBKDs0gVAdtjAvqmamWl9YLxplMUc8kgfA0u2aB80Q2xm1j7qypKtG9Rhzq0xDCQ AD1g== 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:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=FJdir9A6ElHpN6zeinOpcBxM/Q7BBAs//TYH/+ijVXs=; b=lBjP9DPhWxLW5xMIrE/rDrgHvkZytKBmio/Z+hF6SFeTwZ9kFeLEv2r5Vtd2n4clhU bFoeGyGAfaQn2bwa797x4ECShgCiPOBczdH39Cu0FryC9ZeSiyXe73woWxsohq2Vqdk3 S0s1iMoZxxPczsqokp2uWL/7XPMlWtBq0oiAa7LsM6SH6gpTiSg6/f351dYXiPfJceyA sZxdEkMEss6r29oNmooo7xtx/wJjLXsS6B5HbQ5gKIa8VPjgOrMBq9u9VyOiznm5ugy/ N3ULQSZdmybuT3nXbbKVVg7/XcTrsI09IHdzuSlLGSuvqf9qy4wwlmbE1zfSw4NVl5nn H+sg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Yk1ZX+WL; 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=1680095981; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=FJdir9A6ElHpN6zeinOpcBxM/Q7BBAs//TYH/+ijVXs=; b=jr4n8gG82yI5kFnxiKJsZQNfsxZ8K1CPXc2/eTn+HNv/WNm+Hix92wKMxg/lP2ItlN DkvBTzy9megkuoD10SrFbKLNHKA1fxNNgL9MItFEvae/AhD4q6S0jSYkUia+HCWIlWKY mUdSHB07/GLnImfMy89JoSYuMDWa9jUsTmQlg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095981; 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 :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=FJdir9A6ElHpN6zeinOpcBxM/Q7BBAs//TYH/+ijVXs=; b=F/pxEgMx0RAxqrT0ptfRYODmlyyxOeefKs/cWsB3pSjA5TFwEjVmuntetdbFr45KFy 8TNQM7zTA0N8zINqnOamfm2X1Cod/zB8PNjvlzkQSQcCVyTIXBAdYrqztMZG5vthcilV Ro0ydI3KMTgvyLTuS7cuXVRoWvuwbHYmV8pcZHIYxgID+OxgHURRnJ7Y0tyGViOVetHz 7XrL0pXJjxRIuoD08s3RLb1rEAswdwhAusN8TMjA/Exk2a+2yKVLAPcdOCVeR9vQZr+e BBhQQsMj+fjm7oQrCMIzRKyPfn/hMiGUwDRSvbQLA69KeDdzczfJHJhDcHQaLKsZXEEL Vsxg== X-Gm-Message-State: AAQBX9fy3j1ysC/PsgiLwmBzXlDE8bbq0bct0G3YbQvvvBLipkQNeTVB 65WiHmP6pAVgBeygyYMrdvmJl0k8 X-Google-Smtp-Source: AKy350YkWbke+gJPXt0DhEu8xepuqUrEMrXemtHS1XsKOClNRzJIaotoIPyco5JeJ0B3avuOPAgRrw== X-Received: by 2002:a17:90a:d684:b0:23b:517d:beca with SMTP id x4-20020a17090ad68400b0023b517dbecamr6005530pju.0.1680095981718; Wed, 29 Mar 2023 06:19:41 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:a70b:b0:19f:3460:3f0 with SMTP id w11-20020a170902a70b00b0019f346003f0ls12569140plq.5.-pod-prod-gmail; Wed, 29 Mar 2023 06:19:41 -0700 (PDT) X-Received: by 2002:a17:90b:3905:b0:237:99b8:4eef with SMTP id ob5-20020a17090b390500b0023799b84eefmr20981508pjb.9.1680095980813; Wed, 29 Mar 2023 06:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095980; cv=none; d=google.com; s=arc-20160816; b=PdrlrE69wzUM3wFZtkxIIMdfexaBzVrEL+erzYM7ZKlI7knTMzlJcQMr1WPWYUoPG/ UeZMONjb/zsNHdmVx9fdRgdnEZnGPcr4Ia+uFY8TvTnLU2qkR7bS/yg4rEppqKznzmjn LaIvnocgGnucn5Olz9Cu3Z2FLP6ATd8MEUWMBLk0OpfperF34oYOlEpn376fE0ZBHwN1 EkOSc7oaUjMDBUdFoj0kYCzzwcUNBvtojzuxSUir79BWFLOcAXhVVney350T70S815vU PBOAEnp1trS0WAgaeIj6OyBwURq9Rsq05hmmQn27D/Cu2Zfm/Qc1svJZei7ZSa1D/xX0 LQYA== 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=/v0aeTjxkLPm8Geh7qWRGFN17I5ZClwfGotSGAvvgRo=; b=hYaDs/kERbClVSWe+gsv0iITzFZ31Qppg8T1kDpYkjnsLgcqeIeGxwvBtHwJ9hUiAD OG87xRnBVB1bxV9rIFnbygTCQARKd+YwGL7jKcQDN8PhwJRozsjOs35JLZz9NHKe4kF0 i31Dndx36CS/VN3nQtuKe1OudRIMXu23ILBU27oOn9Im8p2mKV3lZ1LPlhyhLPUtoqtP Hbebo0UFqsTXKQqB2rmQUd0nAtokNYRULJoZJP1JIRMrtJbjgtg/GeN+Y4Og/yapEr27 pHUPcfqKQQud2PahK6rhskjFS9vL1PcFoq4EGHJtZuvKUzMzmgvRel5kZLp82QaBWrp/ PcpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Yk1ZX+WL; 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 s14-20020a170902b18e00b001a1bfe84f99sor11666747plr.120.2023.03.29.06.19.40 for (Google Transport Security); Wed, 29 Mar 2023 06:19:40 -0700 (PDT) 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:22cb:b0:1a1:b174:8363 with SMTP id y11-20020a17090322cb00b001a1b1748363mr23482597plg.59.1680095980475; Wed, 29 Mar 2023 06:19:40 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id d9-20020a170902854900b0019c90f8c831sm22949389plo.242.2023.03.29.06.19.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:19:39 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 10/12] drm/bridge: Implement enable_next_first to alter bridge init order Date: Wed, 29 Mar 2023 18:49:27 +0530 Message-Id: <20230329131929.1328612-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Yk1ZX+WL; 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 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: , DSI sink devices typically send the MIPI-DCS commands to the DSI host via general MIPI_DSI_DCS read and write API. The classical DSI sequence mentioned that the DSI host receives MIPI-DCS commands from the DSI sink first in order to switch HS mode properly. Once the DSI host switches to HS mode any MIPI-DCS commands from the DSI sink are unfunctional. DSI sink uses the @enable function to send the MIPI-DCS commands. In a typical DSI host, sink pipeline the @enable call chain start with the DSI host, and then the DSI sink which is the "wrong" order as DSI host @enable is called and switched to HS mode before DSI sink @enable. If the DSI host enables with the @enable_next_first flag then the @enable for the DSI sink will be called first before the @enable of the DSI host. This alter bridge init order makes sure that the MIPI-DCS commands send first and then switch to the HS mode properly by DSI host. This new flag @enable_next_first that any bridg can set to swap the order of @enable (and #disable) for that and the immediately next bridge. [enable] If a bridge sets @enable_next_first, then the @enable for the next bridge will be called first before enable of this bridge. [disable] If a bridge sets @enable_next_first, then the @disable for the next bridge will be called first before @disable of this bridge to reverse the @enable calling direction. eg: - Panel - Bridge 1 - Bridge 2 enable_next_first - Bridge 3 - Bridge 4 enable_next_first - Bridge 5 enable_next_first - Bridge 6 - Encoder Would result in enable's being called as Encoder, Bridge 6, Bridge 3, Bridge 4, Bridge 5, Bridge 1, Bridge 2, Panel. and the result in disable's being called as Panel, Bridge 2, Bridge 1, Bridge 5, Bridge 4, Bridge 3, Bridge 6, Encoder. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/drm_bridge.c | 171 ++++++++++++++++++++++++++++++----- include/drm/drm_bridge.h | 8 ++ 2 files changed, 154 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index caf0f341e524..cdc2669b3512 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -577,6 +577,24 @@ void drm_bridge_chain_mode_set(struct drm_bridge *bridge, } EXPORT_SYMBOL(drm_bridge_chain_mode_set); +static void drm_atomic_bridge_call_disable(struct drm_bridge *bridge, + struct drm_atomic_state *old_state) +{ + if (old_state && bridge->funcs->atomic_disable) { + struct drm_bridge_state *old_bridge_state; + + old_bridge_state = + drm_atomic_get_old_bridge_state(old_state, + bridge); + if (WARN_ON(!old_bridge_state)) + return; + + bridge->funcs->atomic_disable(bridge, old_bridge_state); + } else if (bridge->funcs->disable) { + bridge->funcs->disable(bridge); + } +} + /** * drm_atomic_bridge_chain_disable - disables all bridges in the encoder chain * @bridge: bridge control structure @@ -587,33 +605,73 @@ EXPORT_SYMBOL(drm_bridge_chain_mode_set); * starting from the last bridge to the first. These are called before calling * &drm_encoder_helper_funcs.atomic_disable * + * If a bridge sets @enable_next_first, then the @disable for the next bridge + * will be called first before @disable of this bridge to reverse the @enable + * calling direction. + * + * Example: + * Bridge A ---> Bridge B ---> Bridge C ---> Bridge D ---> Bridge E + * + * With enable_next_first flag enable in Bridge A, C, D then the resulting + * @disable order would be, + * Bridge C, Bridge D, Bridge E, Bridge A, Bridge B. + * * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_disable(struct drm_bridge *bridge, struct drm_atomic_state *old_state) { struct drm_encoder *encoder; - struct drm_bridge *iter; + struct drm_bridge *iter, *next, *limit; if (!bridge) return; encoder = bridge->encoder; + list_for_each_entry_reverse(iter, &encoder->bridge_chain, chain_node) { - if (iter->funcs->atomic_disable) { - struct drm_bridge_state *old_bridge_state; - - old_bridge_state = - drm_atomic_get_old_bridge_state(old_state, - iter); - if (WARN_ON(!old_bridge_state)) - return; - - iter->funcs->atomic_disable(iter, old_bridge_state); - } else if (iter->funcs->disable) { - iter->funcs->disable(iter); + limit = NULL; + + if (!list_is_first(&iter->chain_node, &encoder->bridge_chain)) { + next = list_prev_entry(iter, chain_node); + + if (next->enable_next_first) { + limit = bridge; + list_for_each_entry_from_reverse(next, + &encoder->bridge_chain, + chain_node) { + if (next == bridge) + break; + + if (!next->enable_next_first) { + /* Found first bridge that does NOT + * request next to be enabled first + */ + next = list_next_entry(next, chain_node); + limit = next; + break; + } + } + + list_for_each_entry_from(next, &encoder->bridge_chain, chain_node) { + /* Call requested next bridge enable in order */ + if (next == iter) + /* At the first bridge to request next + * bridges called first. + */ + break; + + drm_atomic_bridge_call_disable(next, old_state); + } + } } + drm_atomic_bridge_call_disable(iter, old_state); + + if (limit) + /* Jump all bridges that we have already disabled */ + iter = limit; + if (iter == bridge) break; } @@ -822,6 +880,24 @@ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge, } EXPORT_SYMBOL(drm_atomic_bridge_chain_pre_enable); +static void drm_atomic_bridge_call_enable(struct drm_bridge *bridge, + struct drm_atomic_state *old_state) +{ + if (old_state && bridge->funcs->atomic_enable) { + struct drm_bridge_state *old_bridge_state; + + old_bridge_state = + drm_atomic_get_old_bridge_state(old_state, + bridge); + if (WARN_ON(!old_bridge_state)) + return; + + bridge->funcs->atomic_enable(bridge, old_bridge_state); + } else if (bridge->funcs->enable) { + bridge->funcs->enable(bridge); + } +} + /** * drm_atomic_bridge_chain_enable - enables all bridges in the encoder chain * @bridge: bridge control structure @@ -832,31 +908,76 @@ EXPORT_SYMBOL(drm_atomic_bridge_chain_pre_enable); * starting from the first bridge to the last. These are called after completing * &drm_encoder_helper_funcs.atomic_enable * + * If a bridge sets @enable_next_first, then the @enable for the next bridge + * will be called first before enable of this bridge. + * + * Example: + * Bridge A ---> Bridge B ---> Bridge C ---> Bridge D ---> Bridge E + * + * With enable_next_first flag enable in Bridge A, C, D then the resulting + * @enable order would be, + * Bridge B, Bridge A, Bridge E, Bridge D, Bridge C. + * * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_enable(struct drm_bridge *bridge, struct drm_atomic_state *old_state) { struct drm_encoder *encoder; + struct drm_bridge *next, *limit; if (!bridge) return; encoder = bridge->encoder; + list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) { - if (bridge->funcs->atomic_enable) { - struct drm_bridge_state *old_bridge_state; - - old_bridge_state = - drm_atomic_get_old_bridge_state(old_state, - bridge); - if (WARN_ON(!old_bridge_state)) - return; - - bridge->funcs->atomic_enable(bridge, old_bridge_state); - } else if (bridge->funcs->enable) { - bridge->funcs->enable(bridge); + limit = NULL; + + if (!list_is_last(&bridge->chain_node, &encoder->bridge_chain)) { + if (bridge->enable_next_first) { + /* next bridge had requested that next + * was enabled first, so disabled last + */ + next = list_next_entry(bridge, chain_node); + limit = next; + + list_for_each_entry_from(next, &encoder->bridge_chain, + chain_node) { + /* Find the next bridge that has NOT requested + * next to be enabled first / disabled last + */ + if (!next->enable_next_first) { + limit = next; + break; + } + + /* Last bridge has requested next to be limit + * otherwise the control move to end of chain + */ + if (list_is_last(&next->chain_node, + &encoder->bridge_chain)) { + limit = next; + break; + } + } + + /* Call these bridges in reverse order */ + list_for_each_entry_from_reverse(next, &encoder->bridge_chain, + chain_node) { + if (next == bridge) + break; + + drm_atomic_bridge_call_enable(next, old_state); + } + } } + + drm_atomic_bridge_call_enable(bridge, old_state); + + if (limit) + /* Jump all bridges that we have already enabled */ + bridge = limit; } } EXPORT_SYMBOL(drm_atomic_bridge_chain_enable); diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index a1a31704b917..9879129047e4 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -752,6 +752,14 @@ struct drm_bridge { * before the peripheral. */ bool pre_enable_prev_first; + /** + * @enable_next_first: The bridge requires that the next bridge @enable + * function is called first before its @enable, and conversely for + * @disable. This is most frequently a requirement for a DSI host to + * receive MIPI-DCS commands from DSI sink first in order to switch + * HS mode properly. + */ + bool enable_next_first; /** * @ddc: Associated I2C adapter for DDC access, if any. */ From patchwork Wed Mar 29 13:19:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2836 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id B05FB4147B for ; Wed, 29 Mar 2023 15:19:49 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id kw3-20020a170902f90300b001a274ccf620sf817087plb.8 for ; Wed, 29 Mar 2023 06:19:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095988; cv=pass; d=google.com; s=arc-20160816; b=Gnn5cVbcViSuAq7zNIJH/SPfjoCzX87WkhZCBJpMbI1i1hXWGAIGSTdH1Ubq3t0ePS AiiRFOdYzTVrMhsffBEzJyCQt5bXSAQsf7o9s8U1E6ZlddCvtOZwbHajl9QcuTmPz2R6 VfeBxsh4p5SBtlohhvn+J4Y3kqup9vbLQrxG7Zcae8YkngHMv7TGFc0rBYWTEVOM/wvq 30Nl4C2JTuaq5KzvXrqz6RqMnnwii5DQfZnw1yz0eYwaxNNglTEpOI1FMLoNPHdbI8tA 3qGtpZt/FpJ9TjA6Gwfm484b8CMRPVfJqkPqP52tDwZyvzN8ro5PYzaH6t/ZC9rubRkm SdFw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p3D+WGy+NelEqfVsf1DveonTqZinQVOhuobjO16ZyIg=; b=nX5eM8RuLtz+5sfKCjD8Ova2kG+Nrc/zf6e5YMtZukvidncl7O+faPW+bTS5GRdJom 5Wl8G29Z/yC5wwUX8jaa/TDwlRlkL8fcl1IVzIIB740m283MAitUs/siDV8N2z3qrguc qvI8YgKk44MdKPrrqyX2J7J0iDoIALyPuafzwz49oOMhkXjoH/TOwD09/vM1PgaSFzQE HAu+KBtuHWgbuqhYHE6Pnx9iIqBbiIpiI+j69oEmg5iUP4LokH8RwrBi7s32UmN2Gcqs JRxewaaaUtv9q6p4QmF+fwzTKR2GRJirMtgqeyUsQYSQYXbC5VgrBJWxQg+n1kbiZwu9 vHcg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QQ4mv0hz; 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=1680095988; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=p3D+WGy+NelEqfVsf1DveonTqZinQVOhuobjO16ZyIg=; b=HN8x4iOgi4MBjekHxK+fbhQom7Na/V2WntaSJUFTrEtG0tKhGQJDMThY3eBlIHzCuG C4kPJ8AFhCZZFxcILJX9Sws5Hruf7/vx51SqHBj31cgrVz2/xFV5eADkqLT2YehYxSj1 lxSmcYWjv3Y2fTonXBxmByUg/TYF86dPcOaxw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095988; 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 :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=p3D+WGy+NelEqfVsf1DveonTqZinQVOhuobjO16ZyIg=; b=woQbIgjS+bK6aAS/uv4bpwMRkTNEJPOvCCrcSPAALGGqYl8iqn+8Udjrwjp2gf6sxK 0BLhHZpG7DqMXM9UdoiYMgCULtwYkP6dmp6/4dGIKtVQQPVrNryrP8SqvjVc0bNEV0hh YExqFU5DNu/osqyEZRmzd11tGkkt8juF+k+igu428/hPylSbncxb6Hxy11zdlMxZoKEk TwCprPJmQVYSCIRkGEmJGwsodR5N0sBsV7EabKT7Uv0Qn+RiVhKklpiUzFJ6UN4LJIKI jLgexLrtJLs2/NpEp6HxnaoWNOU3QnwZALtpYcW/gHnkdBrj+eDvruGT84wQ3LOSSYHZ Dl5g== X-Gm-Message-State: AAQBX9dSgRviVVHLG+Yw6TPrn+f5LtSqbRNAAgQjSEhfKDV9vCm7//Qd /P36PXkUXDzFxcwOxQN7fLSrxcAL X-Google-Smtp-Source: AKy350beJgk5jn0zDF1OxnP3wBDzEVvUB/I50wenyvuR+3eZ5dXAam7Ks4RQhRBUnMGNWUGUtafiQQ== X-Received: by 2002:a17:902:b195:b0:19f:3aa9:9ea1 with SMTP id s21-20020a170902b19500b0019f3aa99ea1mr7482169plr.8.1680095988499; Wed, 29 Mar 2023 06:19:48 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:1992:b0:237:7ef0:5b8 with SMTP id 18-20020a17090a199200b002377ef005b8ls2188046pji.3.-pod-canary-gmail; Wed, 29 Mar 2023 06:19:47 -0700 (PDT) X-Received: by 2002:a17:902:d4ca:b0:19d:20a:a219 with SMTP id o10-20020a170902d4ca00b0019d020aa219mr23523368plg.66.1680095987450; Wed, 29 Mar 2023 06:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095987; cv=none; d=google.com; s=arc-20160816; b=tPUewMffJiY2UMkKxCvUkBDpnyFuIaYR+0gm7CJJBhUohk1GlQta/VQG1vuW1ltxmj 3kfrChBi0Zn8cwUElWYLzze3YcXt6WlyVMmJmr72OnvaNExCegNvulicvhNoXbGyzjf5 0qjNI9g9cFkRMf8+zlsu3XO4fbZv4Ov8Mg5RSVZ/6S4PXCFXBGGBMIhk8P/pl3mEzy4+ 5HBtueJnc+a0XDQs5VoREUzOSl00bVKT7r0Uxw3jg33rO6kOKrAjbcrSHg7BthLSdXem h36lS282KddCTw/fLuArV22iwlCLEaAnarzajKjbMIHY8AGJrDYWAK4Rp+HRzDCRoudc JJyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=u6Zop59KiDms2RJ1oWf1wfATSRqRH4OJms0tUCu66Ds=; b=snBfi/PD9WTyzuB13wubXNyZlaM2T8BXmPXpJe3sU6ccV8dnHNJxNu0JbFAia6SP6I M3QjNquRtBuJYUeVhxsZgG7Z8enHrJQ3fr4EaBYL4YmYublxca3S5t2Mc1Uatr42SW/u K/Z/408/ItwabLodiHxWPDAVYsnYi7yDFHbprobWqZH29TjuwSzcLpjm8f/Io3J+nZNy mNmIXObVEkpD9EyBGlt4JS4ZtbFEpCyReq/au0JarhH9+yDI4ItFlv3Swz8ch5wWI4kN cEAmW8aRXeiFtO0XZkKHqvVHv37sEqa+RLBg+ez7EZIhuEBnKQu7QLUhpNsX/K/mKU40 MjeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QQ4mv0hz; 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 n4-20020a170902e54400b001a066c17627sor13708263plf.11.2023.03.29.06.19.47 for (Google Transport Security); Wed, 29 Mar 2023 06:19:47 -0700 (PDT) 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:d2d2:b0:1a0:6ed9:f9d0 with SMTP id n18-20020a170902d2d200b001a06ed9f9d0mr24347448plc.68.1680095987116; Wed, 29 Mar 2023 06:19:47 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id d9-20020a170902854900b0019c90f8c831sm22949389plo.242.2023.03.29.06.19.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:19:46 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 11/12] drm/bridge: Document bridge init order with enable_next_first Date: Wed, 29 Mar 2023 18:49:28 +0530 Message-Id: <20230329131929.1328612-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131929.1328612-1-jagan@amarulasolutions.com> References: <20230329131929.1328612-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=QQ4mv0hz; 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 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: , In order to switch HS mode properly by DSI host, the DSI sink has to send the MIPI-DCS commands first before the DSI host switches to HS mode. This behavior requires a bridge init alter in @enable and @disable function calls with the help of @enable_next_first. Document the affected bridge init order with a proper explanation. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/drm_bridge.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index cdc2669b3512..3c6c9937537a 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -190,6 +190,21 @@ * Ultra Low Power State (ULPS) is not explicitly supported by DRM. If * implemented, it therefore needs to be handled entirely within the DSI Host * driver. + * + * DSI sink devices typically send the MIPI-DCS commands to the DSI host via + * general MIPI_DSI_DCS read and write API. The classical DSI sequence + * mentioned that the DSI host receives MIPI-DCS commands from the DSI sink + * first in order to switch HS mode properly. Once the DSI host switches to + * HS mode any MIPI-DCS commands from the DSI sink are unfunctional. + * + * DSI sink uses the @enable function to send the MIPI-DCS commands. In a + * typical DSI host, sink pipeline the @enable call chain start with the + * DSI host, and then the DSI sink which is the "wrong" order as DSI host + * @enable is called and switched to HS mode before DSI sink @enable. If + * the DSI host enables with the @enable_next_first flag then the @enable + * for the DSI sink will be called first before the @enable of the DSI host. + * This alter bridge init order makes sure that the MIPI-DCS commands send + * first and then switch to the HS mode properly by the DSI host. */ static DEFINE_MUTEX(bridge_lock); From patchwork Wed Mar 29 13:19:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2837 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7639D4147B for ; Wed, 29 Mar 2023 15:19:56 +0200 (CEST) Received: by mail-pj1-f71.google.com with SMTP id nm11-20020a17090b19cb00b0023d0c90d851sf4595324pjb.1 for ; Wed, 29 Mar 2023 06:19:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680095995; cv=pass; d=google.com; s=arc-20160816; b=eFPHSSLcwQnB/0CrF55prnzQc4fgcZc7u36he9jI2ZzW2musatZyJh8oRwSX0L3iIy xxeb9Qfokaod7XWWEUmhGdoPPGpVzouHMK0bykeT3R6iEtgrDqd25NqUJTaJFijK6mvE omh36juEhHXZybgJHbPxB20J4DkaI0OYBS47lp3AVqj12p3DcBqrcGbbXt3/8DW2YK5f Pq8QLDcJ2RnxAd4dwmux9iPT/5lvn9q56M3e7WUmtEBAfbp+i4Xftv1ul0RqoMQ8wiZ9 UWOYbjRVB/gH79hvY5ofs/J54xBCf3xpXZS8ATZ9LIRihOSVPk0M4upTqWLrygg2/V7Q OxZg== 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:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=K5g/NXuvc6GVWE036zZCT77mMPS9OYcZm25MgdOMi5Y=; b=QmAdle2cXgzC3kmtkfVCF3bHpyQn12qvvnjlDcjddUInRL68xfoSPbkMdec6Xn3taH GjQjih1a8DTcW0wfKD6ulWLCFUDQh+7hGjjMDYa2TElEhUyNmZ7pavYbthuU5dLFrEN7 aqqpfV2MM5j+88OoRcyLMyGITzXVee8LUzkPgSvayhQZUWK8SjaDFTO8frmdSLAPy+wv nrfwV9j6KUkC0qbzu+zML3JKPwFlFRHqPeG1s2eruqQtu0NIdjO0VCW6GTMGW0YbEiqm 0AcVTXiTyAz3zQTQ5EOEXQArhE+arvJgjRb7i40fqfdksTvk5HYviy9ucNdfHUXlyYPJ SnYg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HKqkbFZ2; 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=1680095995; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=K5g/NXuvc6GVWE036zZCT77mMPS9OYcZm25MgdOMi5Y=; b=Ufp+0E8JACtsNr77w7HclqhJnML+w8gPIWFZMoptLl0vnKaGkMnPw7ix3PfsICqCnA FwYi06ejKyALj7uxJ3F1AWQdEyx+HXEAFTQQD2aqQmSb8bfo5f0S8oRhnLeM4+BvTTC8 R+UCb3ZLOjk/lrxzS8lsxcwjD4DnZQEhAZoOk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095995; 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 :references:in-reply-to:message-id:date:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=K5g/NXuvc6GVWE036zZCT77mMPS9OYcZm25MgdOMi5Y=; b=qmZJ1jacbxtdcMDHMMmqPkdSOzTRIY+RjILVdBlkd2XmGkF6zEi95SQ4DBavBV3hUm H9l8w3950XnY1FcOwck8MhufGI7AYslBMRKthvDsg5F5mCcNwpYMK+b84l3Z2fNTgo0G mXNC01gMmUwYPKMZwQaViQbPyFXyIwKn14PzD2gmMwJcBJgiw6PFWzYcgARTbVGu8jbX UA5pKiwIU1gWwqDJ/g5PDtU9rpKpNWV7oRGRlQXAaTqKVHJ1jHaEGT1RnqHvILss9gax jHRLdji1S8FWoTsn8+8bYDfcoBnr963E5vg4tqbw6hilarXIJ6vUb7dc26q3161R+gG/ UTIw== X-Gm-Message-State: AAQBX9dQnaJJVeZjM7zrZyALYxlN0M3WtagiHKxQjsqCmMNaH9rRgz3C oKhbs7rysDaBRcZaaR9lrPENCgCXSRowCSyJ X-Google-Smtp-Source: AKy350bwUJycTFmmlir3k+QfeeSI19OG0+PpxUp4toealcnDVVlu7qdEYMyth0Yheg20AezXf0VjZQ== X-Received: by 2002:a05:6a00:98e:b0:625:f78a:56f with SMTP id u14-20020a056a00098e00b00625f78a056fmr1088340pfg.3.1680095995154; Wed, 29 Mar 2023 06:19:55 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:903:1ca:b0:1a1:f67e:e4c4 with SMTP id e10-20020a17090301ca00b001a1f67ee4c4ls12564609plh.8.-pod-prod-gmail; Wed, 29 Mar 2023 06:19:54 -0700 (PDT) X-Received: by 2002:a17:903:70b:b0:1a1:ab92:5c6b with SMTP id kk11-20020a170903070b00b001a1ab925c6bmr14820218plb.57.1680095994211; Wed, 29 Mar 2023 06:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680095994; cv=none; d=google.com; s=arc-20160816; b=CohTtfEdvP1lAc/hKLFfmGRW/qRDcrP+dDASQUKAOGvAHr28fczAkqfn2Xpb2737TA z8StoIHEQHQyhB02Qk4KPDZM1SNJoTgwoGLJuCNkGUtW1ULTNsfUtltew1nF5xa+4vHK fMv+6TNpo4TK8J/vE8+5wYfvhG2fKAJXEU/jXclqR8YJR8OZCAF4NAGu1HjUCqtn3ayV OvsPM8cWAXV5Jh/1LXjImqnZgZ5IwQwyEnm+Ft28Ed8pnFIHoVUBA1nPwpK+crY4Cubv HC6CY2htKDO+9UKJhAEpYDi1f5UxaPXVClNBmuHrJXv7LbMrtwUpnNpVVvPQe7VwnVXW iMXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=cAaFhF/a5ENgWUKZdfeicYv37T8G+yzz+kNYaBM8Ibc=; b=rFK7eztgzhfqRBmKuIK2T6vXUR8cEKx3hK/5VKysWwk4BIFhM0yVnGnHidfc9i437u SJPI1tnfTvebogHaUkIQndSxEmatwE6yRPrBJcoCgebcQ5uTevVPJI4/E8Uu3ROT+Ukh f4GlybXnzru6hlGTeKIRU3enL3imYbhKkcJ13KpHjXOJVdysyiMOD+BkoJB9fnTgIVqX iD6hTSBlQjt5zAKtLo/0L17FPbDvC+QDLZw4wWqXrb0x2dbIdelMfURRKR8sjHS6Frq/ 7Wq+X654Fk4bc3YOjOZIMGkZf3N62PZoeuU8xqGr9qYUHnd7/QNHu22uygKeZYSudGFV ik6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=HKqkbFZ2; 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 l9-20020a170903120900b001a18976b935sor13689653plh.190.2023.03.29.06.19.54 for (Google Transport Security); Wed, 29 Mar 2023 06:19:54 -0700 (PDT) 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:f551:b0:1a0:616d:7618 with SMTP id h17-20020a170902f55100b001a0616d7618mr18983382plf.51.1680095993863; Wed, 29 Mar 2023 06:19:53 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id d9-20020a170902854900b0019c90f8c831sm22949389plo.242.2023.03.29.06.19.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:19:53 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 12/12] drm: sun4: dsi: Convert to bridge driver Date: Wed, 29 Mar 2023 18:49:29 +0530 Message-Id: <20230329131929.1328612-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131929.1328612-1-jagan@amarulasolutions.com> References: <20230329131929.1328612-1-jagan@amarulasolutions.com> 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=HKqkbFZ2; 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: , Convert the encoder to bridge driver in order to standardize on a single API by supporting all varients of downstream bridge devices. The drm_encoder can't be removed as it's exposed to userspace, so it then becomes a dumb encoder, without any operation implemented. Tested on DSI Panel, DSI Bridge, I2C-Configured DSI Bridge. Signed-off-by: Jagan Teki --- Changes for v7: - drop bridge call chain - use drmm_of_dsi_get_bridge - switch to atomic bridge calls - use atomic_pre_enable and atomic_enable for previous enable Changes for v6: - support donwstream bridge - drop bridge conversion - devm_drm_of_get_bridge() require child lookup https://patchwork.kernel.org/project/dri-devel/cover/20211207054747.461029-1-jagan@amarulasolutions.com/ Changes for v5: - add atomic APIs - find host and device variant DSI devices. Changes for v4, v3: - none drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c | 143 ++++++++++--------------- drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h | 10 +- 2 files changed, 61 insertions(+), 92 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c index 760ff05eabf4..71951a6dc914 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.c @@ -20,8 +20,8 @@ #include #include +#include #include -#include #include #include #include @@ -713,10 +713,11 @@ static int sun6i_dsi_start(struct sun6i_dsi *dsi, return 0; } -static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder) +static void sun6i_dsi_bridge_pre_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_state) { - struct drm_display_mode *mode = &encoder->crtc->state->adjusted_mode; - struct sun6i_dsi *dsi = encoder_to_sun6i_dsi(encoder); + struct drm_display_mode *mode = &bridge->encoder->crtc->state->adjusted_mode; + struct sun6i_dsi *dsi = bridge_to_sun6i_dsi(bridge); struct mipi_dsi_device *device = dsi->device; union phy_configure_opts opts = { }; struct phy_configure_opts_mipi_dphy *cfg = &opts.mipi_dphy; @@ -768,9 +769,12 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder) phy_set_mode(dsi->dphy, PHY_MODE_MIPI_DPHY); phy_configure(dsi->dphy, &opts); phy_power_on(dsi->dphy); +} - if (dsi->panel) - drm_panel_prepare(dsi->panel); +static void sun6i_dsi_bridge_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_state) +{ + struct sun6i_dsi *dsi = bridge_to_sun6i_dsi(bridge); /* * FIXME: This should be moved after the switch to HS mode. @@ -784,9 +788,6 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder) * ordering on the panels I've tested it with, so I guess this * will do for now, until that IP is better understood. */ - if (dsi->panel) - drm_panel_enable(dsi->panel); - sun6i_dsi_start(dsi, DSI_START_HSC); udelay(1000); @@ -794,17 +795,13 @@ static void sun6i_dsi_encoder_enable(struct drm_encoder *encoder) sun6i_dsi_start(dsi, DSI_START_HSD); } -static void sun6i_dsi_encoder_disable(struct drm_encoder *encoder) +static void sun6i_dsi_bridge_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_state) { - struct sun6i_dsi *dsi = encoder_to_sun6i_dsi(encoder); + struct sun6i_dsi *dsi = bridge_to_sun6i_dsi(bridge); DRM_DEBUG_DRIVER("Disabling DSI output\n"); - if (dsi->panel) { - drm_panel_disable(dsi->panel); - drm_panel_unprepare(dsi->panel); - } - phy_power_off(dsi->dphy); phy_exit(dsi->dphy); @@ -813,38 +810,23 @@ static void sun6i_dsi_encoder_disable(struct drm_encoder *encoder) regulator_disable(dsi->regulator); } -static int sun6i_dsi_get_modes(struct drm_connector *connector) -{ - struct sun6i_dsi *dsi = connector_to_sun6i_dsi(connector); - - return drm_panel_get_modes(dsi->panel, connector); -} - -static const struct drm_connector_helper_funcs sun6i_dsi_connector_helper_funcs = { - .get_modes = sun6i_dsi_get_modes, -}; - -static enum drm_connector_status -sun6i_dsi_connector_detect(struct drm_connector *connector, bool force) +static int sun6i_dsi_bridge_attach(struct drm_bridge *bridge, + enum drm_bridge_attach_flags flags) { - struct sun6i_dsi *dsi = connector_to_sun6i_dsi(connector); + struct sun6i_dsi *dsi = bridge_to_sun6i_dsi(bridge); - return dsi->panel ? connector_status_connected : - connector_status_disconnected; + return drm_bridge_attach(bridge->encoder, dsi->out_bridge, + &dsi->bridge, flags); } -static const struct drm_connector_funcs sun6i_dsi_connector_funcs = { - .detect = sun6i_dsi_connector_detect, - .fill_modes = drm_helper_probe_single_connector_modes, - .destroy = drm_connector_cleanup, - .reset = drm_atomic_helper_connector_reset, - .atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state, - .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, -}; - -static const struct drm_encoder_helper_funcs sun6i_dsi_enc_helper_funcs = { - .disable = sun6i_dsi_encoder_disable, - .enable = sun6i_dsi_encoder_enable, +static const struct drm_bridge_funcs sun6i_mipi_dsi_bridge_funcs = { + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + .atomic_pre_enable = sun6i_dsi_bridge_pre_enable, + .atomic_enable = sun6i_dsi_bridge_enable, + .atomic_disable = sun6i_dsi_bridge_disable, + .attach = sun6i_dsi_bridge_attach, }; static u32 sun6i_dsi_dcs_build_pkt_hdr(struct sun6i_dsi *dsi, @@ -959,20 +941,27 @@ static int sun6i_dsi_dcs_read(struct sun6i_dsi *dsi, return 1; } +static const struct component_ops sun6i_dsi_ops; + static int sun6i_dsi_attach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct sun6i_dsi *dsi = host_to_sun6i_dsi(host); - struct drm_panel *panel = of_drm_find_panel(device->dev.of_node); + int ret; + + dsi->device = device; + + drm_bridge_add(&dsi->bridge); + + ret = component_add(dsi->dev, &sun6i_dsi_ops); + if (ret) { + dev_err(dsi->dev, "Couldn't register our component\n"); + return ret; + } - if (IS_ERR(panel)) - return PTR_ERR(panel); if (!dsi->drm || !dsi->drm->registered) return -EPROBE_DEFER; - dsi->panel = panel; - dsi->device = device; - drm_kms_helper_hotplug_event(dsi->drm); dev_info(host->dev, "Attached device %s\n", device->name); @@ -985,11 +974,10 @@ static int sun6i_dsi_detach(struct mipi_dsi_host *host, { struct sun6i_dsi *dsi = host_to_sun6i_dsi(host); - dsi->panel = NULL; + component_del(dsi->dev, &sun6i_dsi_ops); + drm_bridge_remove(&dsi->bridge); dsi->device = NULL; - drm_kms_helper_hotplug_event(dsi->drm); - return 0; } @@ -1054,8 +1042,13 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master, struct sun6i_dsi *dsi = dev_get_drvdata(dev); int ret; - drm_encoder_helper_add(&dsi->encoder, - &sun6i_dsi_enc_helper_funcs); + dsi->out_bridge = drmm_of_dsi_get_bridge(drm, dev->of_node, 0, 1); + if (IS_ERR(dsi->out_bridge)) { + ret = PTR_ERR(dsi->out_bridge); + DRM_DEV_ERROR(dsi->dev, "failed to find the bridge: %d\n", ret); + return ret; + } + ret = drm_simple_encoder_init(drm, &dsi->encoder, DRM_MODE_ENCODER_DSI); if (ret) { @@ -1064,39 +1057,19 @@ static int sun6i_dsi_bind(struct device *dev, struct device *master, } dsi->encoder.possible_crtcs = BIT(0); - drm_connector_helper_add(&dsi->connector, - &sun6i_dsi_connector_helper_funcs); - ret = drm_connector_init(drm, &dsi->connector, - &sun6i_dsi_connector_funcs, - DRM_MODE_CONNECTOR_DSI); + ret = drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, 0); if (ret) { - dev_err(dsi->dev, - "Couldn't initialise the DSI connector\n"); - goto err_cleanup_connector; + dev_err(dsi->dev, "Couldn't attach the DSI bridge\n"); + return ret; } - drm_connector_attach_encoder(&dsi->connector, &dsi->encoder); - dsi->drm = drm; return 0; - -err_cleanup_connector: - drm_encoder_cleanup(&dsi->encoder); - return ret; -} - -static void sun6i_dsi_unbind(struct device *dev, struct device *master, - void *data) -{ - struct sun6i_dsi *dsi = dev_get_drvdata(dev); - - dsi->drm = NULL; } static const struct component_ops sun6i_dsi_ops = { .bind = sun6i_dsi_bind, - .unbind = sun6i_dsi_unbind, }; static int sun6i_dsi_probe(struct platform_device *pdev) @@ -1175,22 +1148,19 @@ static int sun6i_dsi_probe(struct platform_device *pdev) goto err_unprotect_clk; } + dsi->bridge.funcs = &sun6i_mipi_dsi_bridge_funcs; + dsi->bridge.of_node = dev->of_node; + dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + dsi->bridge.enable_next_first = true; + ret = mipi_dsi_host_register(&dsi->host); if (ret) { dev_err(dev, "Couldn't register MIPI-DSI host\n"); goto err_unprotect_clk; } - ret = component_add(&pdev->dev, &sun6i_dsi_ops); - if (ret) { - dev_err(dev, "Couldn't register our component\n"); - goto err_remove_dsi_host; - } - return 0; -err_remove_dsi_host: - mipi_dsi_host_unregister(&dsi->host); err_unprotect_clk: if (dsi->variant->has_mod_clk && dsi->variant->set_mod_clk) clk_rate_exclusive_put(dsi->mod_clk); @@ -1205,7 +1175,6 @@ static int sun6i_dsi_remove(struct platform_device *pdev) struct device *dev = &pdev->dev; struct sun6i_dsi *dsi = dev_get_drvdata(dev); - component_del(&pdev->dev, &sun6i_dsi_ops); mipi_dsi_host_unregister(&dsi->host); if (dsi->variant->has_mod_clk && dsi->variant->set_mod_clk) clk_rate_exclusive_put(dsi->mod_clk); diff --git a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h index f1ddefe0f554..8b9263e0f4ef 100644 --- a/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h +++ b/drivers/gpu/drm/sun4i/sun6i_mipi_dsi.h @@ -21,9 +21,9 @@ struct sun6i_dsi_variant { }; struct sun6i_dsi { - struct drm_connector connector; struct drm_encoder encoder; struct mipi_dsi_host host; + struct drm_bridge bridge; struct clk *bus_clk; struct clk *mod_clk; @@ -35,7 +35,7 @@ struct sun6i_dsi { struct device *dev; struct mipi_dsi_device *device; struct drm_device *drm; - struct drm_panel *panel; + struct drm_bridge *out_bridge; const struct sun6i_dsi_variant *variant; }; @@ -45,10 +45,10 @@ static inline struct sun6i_dsi *host_to_sun6i_dsi(struct mipi_dsi_host *host) return container_of(host, struct sun6i_dsi, host); }; -static inline struct sun6i_dsi *connector_to_sun6i_dsi(struct drm_connector *connector) +static inline struct sun6i_dsi *bridge_to_sun6i_dsi(struct drm_bridge *bridge) { - return container_of(connector, struct sun6i_dsi, connector); -}; + return container_of(bridge, struct sun6i_dsi, bridge); +} static inline struct sun6i_dsi *encoder_to_sun6i_dsi(const struct drm_encoder *encoder) {