[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201124171956.981307-1-lukas@mntre.com>
Date: Tue, 24 Nov 2020 18:19:57 +0100
From: "Lukas F. Hartmann" <lukas@...re.com>
To: lukas@...re.com
Cc: agx@...xcpu.org, laurentiu.palcu@....com,
Laurentiu Palcu <laurentiu.palcu@....nxp.com>,
Lucas Stach <l.stach@...gutronix.de>,
Philipp Zabel <p.zabel@...gutronix.de>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [RFC] dcss: fix attaching to sn56dsi86 bridge
The sn56dsi86 DSI to eDP bridge driver does not support attaching
without a drm connector. This patch makes the attachment work. Required
for the display chain in MNT Reform 2.0 (DCSS->NWL DSI->SN56DSI86->EDP).
Signed-off-by: Lukas F. Hartmann <lukas@...re.com>
---
drivers/gpu/drm/imx/dcss/dcss-kms.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/imx/dcss/dcss-kms.c b/drivers/gpu/drm/imx/dcss/dcss-kms.c
index 135a62366..4967f828b 100644
--- a/drivers/gpu/drm/imx/dcss/dcss-kms.c
+++ b/drivers/gpu/drm/imx/dcss/dcss-kms.c
@@ -82,6 +82,7 @@ static int dcss_kms_bridge_connector_init(struct dcss_kms_dev *kms)
struct drm_crtc *crtc = (struct drm_crtc *)&kms->crtc;
struct drm_panel *panel;
struct drm_bridge *bridge;
+ struct drm_connector_list_iter iter;
int ret;
ret = drm_of_find_panel_or_bridge(ddev->dev->of_node, 0, 0,
@@ -104,19 +105,19 @@ static int dcss_kms_bridge_connector_init(struct dcss_kms_dev *kms)
return ret;
}
- ret = drm_bridge_attach(encoder, bridge, NULL,
- DRM_BRIDGE_ATTACH_NO_CONNECTOR);
+ ret = drm_bridge_attach(encoder, bridge, NULL, 0);
if (ret < 0) {
dev_err(ddev->dev, "Unable to attach bridge %pOF\n",
bridge->of_node);
return ret;
}
- kms->connector = drm_bridge_connector_init(ddev, encoder);
- if (IS_ERR(kms->connector)) {
- dev_err(ddev->dev, "Unable to create bridge connector.\n");
- return PTR_ERR(kms->connector);
- }
+ /*
+ * This hack to look up the connector is copied from mxsfb.
+ */
+ drm_connector_list_iter_begin(ddev, &iter);
+ kms->connector = drm_connector_list_iter_next(&iter);
+ drm_connector_list_iter_end(&iter);
drm_connector_attach_encoder(kms->connector, encoder);
--
2.28.0
Powered by blists - more mailing lists