diff options
author | Hsin-Yi Wang <hsinyi@chromium.org> | 2022-06-09 15:27:15 +0800 |
---|---|---|
committer | Douglas Anderson <dianders@chromium.org> | 2022-06-21 08:40:30 -0700 |
commit | 5e41b01a780893507a0508f16b9c4fa7f7a48557 (patch) | |
tree | 295c9855fb7660f4babdc76de95217b361515a95 /include/drm/drm_panel.h | |
parent | fb84efa28a48e30b87fa1122e8aab8016c7347cd (diff) |
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
Diffstat (limited to 'include/drm/drm_panel.h')
-rw-r--r-- | include/drm/drm_panel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index d279ee455f01..3a271128c078 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -117,6 +117,15 @@ struct drm_panel_funcs { struct drm_connector *connector); /** + * @get_orientation: + * + * Return the panel orientation set by device tree or EDID. + * + * This function is optional. + */ + enum drm_panel_orientation (*get_orientation)(struct drm_panel *panel); + + /** * @get_timings: * * Copy display timings into the provided array and return |