drm/panel: Add an API to allow drm to set orientation from panel
authorHsin-Yi Wang <hsinyi@chromium.org>
Thu, 9 Jun 2022 07:27:15 +0000 (15:27 +0800)
committerDouglas Anderson <dianders@chromium.org>
Tue, 21 Jun 2022 15:40:30 +0000 (08:40 -0700)
commit5e41b01a780893507a0508f16b9c4fa7f7a48557
tree295c9855fb7660f4babdc76de95217b361515a95
parentfb84efa28a48e30b87fa1122e8aab8016c7347cd
drm/panel: Add an API to allow drm to set orientation from panel

Panels usually call drm_connector_set_panel_orientation(), which is
later than drm/kms driver calling drm_dev_register(). This leads to a
WARN().

The orientation property is known earlier. For example, some panels
parse the property through device tree during probe.

Add an API to return the property from panel to drm/kms driver, so the
drivers are able to call drm_connector_set_orientation_from_panel() before
drm_dev_register().

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
[dianders: removed space before tab]
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220609072722.3488207-2-hsinyi@chromium.org
drivers/gpu/drm/drm_connector.c
include/drm/drm_connector.h
include/drm/drm_panel.h