[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211229184420.793234-1-markyacoub@chromium.org>
Date: Wed, 29 Dec 2021 13:44:18 -0500
From: Mark Yacoub <markyacoub@...omium.org>
To: linux-mediatek@...ts.infradead.org
Cc: seanpaul@...omium.org, chunkuang.hu@...nel.org,
p.zabel@...gutronix.de, matthias.bgg@...il.com,
jason-jh.lin@...iatek.com, tzungbi@...gle.com,
Mark Yacoub <markyacoub@...omium.org>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2] drm/mediatek: Set default value for Panel Orientation connector prop.
[Why]
Creating the prop uses UNKNOWN as the initial value, which is not a
supported value if the prop is to be supported.
[How]
Set the panel orientation default value to NORMAL right after creating
the prop if no DSI panel exists.
Panels have their own orientations, and panel orientation can't be
overriden once initialized to a value.
v1:
Set panel orientation only if DSI panel does not exist.
Tested on Jacuzzi(MTK)
Fixes IGT@..._properties@..._properties-sanity-{atomic,non-atomic}
Signed-off-by: Mark Yacoub <markyacoub@...omium.org>
---
drivers/gpu/drm/mediatek/mtk_dsi.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
index 0ad7157660afa..9d33dd93118e0 100644
--- a/drivers/gpu/drm/mediatek/mtk_dsi.c
+++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
@@ -1040,6 +1040,13 @@ static int mtk_dsi_encoder_init(struct drm_device *drm, struct mtk_dsi *dsi)
goto err_cleanup_encoder;
}
+ /* A drm_panel can have its own orientation. If there is no panel, set the
+ * orientation to NORMAL. */
+ if (!dsi->panel) {
+ drm_connector_set_panel_orientation(
+ dsi->connector, DRM_MODE_PANEL_ORIENTATION_NORMAL);
+ }
+
drm_connector_attach_encoder(dsi->connector, &dsi->encoder);
return 0;
--
2.34.1.448.ga2b2bfdf31-goog
Powered by blists - more mailing lists