drm/panel: Add and initialise an orientation field to drm_panel
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Tue, 1 Feb 2022 12:20:20 +0000 (12:20 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Wed, 2 Feb 2022 13:24:58 +0000 (13:24 +0000)
commit194052920b4ab593941ca9b0f65d13920aad24d0
treeb0fd57f0ba75bec85cb4d22664f4a5d15f930119
parent4fa195dbe189394540820a823d79bfb70ebcf821
drm/panel: Add and initialise an orientation field to drm_panel

Current usage of drm_connector_set_panel_orientation is from a panel's
get_modes call. However if the panel orientation property doesn't
exist on the connector at this point, then drm_mode_object triggers
WARNs as the connector is already registered.

Add an orientation variable to struct drm_panel and initialise it from
drm_panel_init.
panel_bridge_attach can then create the property before the connector
is registered.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/bridge/panel.c
drivers/gpu/drm/drm_panel.c
include/drm/drm_panel.h