Skip to content

Commit

Permalink
drm/bridge: panel: Set orientation on panel_bridge connector
Browse files Browse the repository at this point in the history
Commit 15b9ca1 ("drm: Config orientation property if panel provides
it") added a helper to set the 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.

Signed-off-by: John Keeping <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Signed-off-by: Douglas Anderson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
johnkeeping authored and dianders committed Feb 7, 2023
1 parent f87c1f0 commit e3ea180
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/bridge/panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit e3ea180

Please sign in to comment.