public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: panel: Set orientation on panel_bridge connector
@ 2023-01-20 11:43 John Keeping
  2023-01-20 21:44 ` Doug Anderson
  0 siblings, 1 reply; 10+ messages in thread
From: John Keeping @ 2023-01-20 11:43 UTC (permalink / raw)
  To: dri-devel
  Cc: John Keeping, Andrzej Hajda, Neil Armstrong, Robert Foss,
	Laurent Pinchart, Jonas Karlman, Jernej Skrabec, David Airlie,
	Daniel Vetter, Douglas Anderson, Stephen Boyd, Hsin-Yi Wang,
	linux-kernel

Commit 15b9ca1641f0 ("drm: Config orientation property if panel provides
it") added a helper to set the panel panel orientation early but only
connected this for drm_bridge_connector, which constructs a panel bridge
with DRM_BRIDGE_ATTACH_NO_CONNECTOR and creates the connector itself.

When the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag is not specified and the
panel_bridge creates its own connector the orientation is not set unless
the panel does it in .get_modes which is too late and leads to a warning
splat from __drm_mode_object_add() because the device is already
registered.

Call the necessary function to set add the orientation property when the
connector is created so that it is available before the device is
registered.

Fixes: 15b9ca1641f0 ("drm: Config orientation property if panel provides it")
Signed-off-by: John Keeping <john@metanate.com>
---
 drivers/gpu/drm/bridge/panel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/bridge/panel.c b/drivers/gpu/drm/bridge/panel.c
index e8aae3cdc73d..d4b112911a99 100644
--- a/drivers/gpu/drm/bridge/panel.c
+++ b/drivers/gpu/drm/bridge/panel.c
@@ -81,6 +81,8 @@ static int panel_bridge_attach(struct drm_bridge *bridge,
 		return ret;
 	}
 
+	drm_panel_bridge_set_orientation(connector, bridge);
+
 	drm_connector_attach_encoder(&panel_bridge->connector,
 					  bridge->encoder);
 
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-02-07  0:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-20 11:43 [PATCH] drm/bridge: panel: Set orientation on panel_bridge connector John Keeping
2023-01-20 21:44 ` Doug Anderson
2023-01-21  8:57   ` Sam Ravnborg
2023-01-21 17:58     ` John Keeping
2023-01-22 15:01       ` Laurent Pinchart
2023-01-23 12:16         ` John Keeping
2023-01-23 16:05           ` Laurent Pinchart
2023-02-03  0:45             ` Doug Anderson
2023-02-03  8:08               ` Neil Armstrong
2023-02-07  0:53               ` Doug Anderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox