drm/bridge: panel: Set orientation on panel_bridge connector
authorJohn Keeping <john@metanate.com>
Fri, 20 Jan 2023 11:43:12 +0000 (11:43 +0000)
committerDouglas Anderson <dianders@chromium.org>
Tue, 7 Feb 2023 00:50:57 +0000 (16:50 -0800)
commite3ea1806e4ad097c9e67e108853a4ae0f3f100cc
tree39f1b2108ec9a25b6b18be70a26f9954da72485f
parentf87c1f0b7b79b7a4f165750d1884da1fd29ae93c
drm/bridge: panel: Set orientation on panel_bridge connector

Commit 15b9ca1641f0 ("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 <john@metanate.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20230120114313.2087015-1-john@metanate.com
drivers/gpu/drm/bridge/panel.c