summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@chromium.org>2020-01-05 18:51:19 +0300
committerHans de Goede <hdegoede@redhat.com>2020-01-11 13:57:58 +0300
commit69654c632d806ac6a37a1d4148de592aae809b40 (patch)
treebdeb90f18a2f100aa1c9aca3503f634b6fa17007 /include
parentb4c32073b8cfb7ad264bf65d40cc7419ff489ea0 (diff)
downloadlinux-69654c632d806ac6a37a1d4148de592aae809b40.tar.xz
drm/connector: Split out orientation quirk detection (v2)
Not every platform needs quirk detection for panel orientation, so split the drm_connector_init_panel_orientation_property into two functions. One for platforms without the need for quirks, and the other for platforms that need quirks. Hans de Goede (changes in v2): Rename the function from drm_connector_init_panel_orientation_property to drm_connector_set_panel_orientation[_with_quirk] and pass in the panel-orientation to set. Beside the rename, also make the function set the passed in value only once, if the value was set before (to a value other then DRM_MODE_PANEL_ORIENTATION_UNKNOWN) make any further set calls a no-op. This change is preparation for allowing the user to override the panel-orientation for any connector from the kernel commandline. When the panel-orientation is overridden this way, then we must ignore the panel-orientation detection done by the driver. Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: Derek Basehore <dbasehore@chromium.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200105155120.96466-1-hdegoede@redhat.com
Diffstat (limited to 'include')
-rw-r--r--include/drm/drm_connector.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 221910948b37..2113500b4075 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1552,8 +1552,13 @@ void drm_connector_set_link_status_property(struct drm_connector *connector,
uint64_t link_status);
void drm_connector_set_vrr_capable_property(
struct drm_connector *connector, bool capable);
-int drm_connector_init_panel_orientation_property(
- struct drm_connector *connector, int width, int height);
+int drm_connector_set_panel_orientation(
+ struct drm_connector *connector,
+ enum drm_panel_orientation panel_orientation);
+int drm_connector_set_panel_orientation_with_quirk(
+ struct drm_connector *connector,
+ enum drm_panel_orientation panel_orientation,
+ int width, int height);
int drm_connector_attach_max_bpc_property(struct drm_connector *connector,
int min, int max);