The panel is used directly, without the panel bridge, so nothing sets
its orientation on the connector apart from the workaround in the
get_modes() of some panel drivers, which runs too late.

Assisted-by: LLM
Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 drivers/gpu/drm/bridge/analogix/analogix-anx6345.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c 
b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
index 407834a03b63..91ce1a877bf8 100644
--- a/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
+++ b/drivers/gpu/drm/bridge/analogix/analogix-anx6345.c
@@ -525,6 +525,11 @@ static int anx6345_bridge_attach(struct drm_bridge *bridge,
 
        anx6345->connector.polled = DRM_CONNECTOR_POLL_HPD;
 
+       err = drm_connector_set_orientation_from_panel(&anx6345->connector,
+                                                      anx6345->panel);
+       if (err)
+               goto connector_cleanup;
+
        err = drm_connector_attach_encoder(&anx6345->connector,
                                           encoder);
        if (err) {

-- 
2.47.3

Reply via email to