aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/display/icl_dsi.c
diff options
context:
space:
mode:
authorDerek Basehore <dbasehore@chromium.org>2020-01-05 16:51:19 +0100
committerHans de Goede <hdegoede@redhat.com>2020-01-11 11:57:58 +0100
commit69654c632d806ac6a37a1d4148de592aae809b40 (patch)
treebdeb90f18a2f100aa1c9aca3503f634b6fa17007 /drivers/gpu/drm/i915/display/icl_dsi.c
parentdrm: always determine branch device with drm_dp_is_branch() (diff)
downloadlinux-dev-69654c632d806ac6a37a1d4148de592aae809b40.tar.xz
linux-dev-69654c632d806ac6a37a1d4148de592aae809b40.zip
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 'drivers/gpu/drm/i915/display/icl_dsi.c')
-rw-r--r--drivers/gpu/drm/i915/display/icl_dsi.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/icl_dsi.c b/drivers/gpu/drm/i915/display/icl_dsi.c
index 006b1a297e6f..4450d98c98a1 100644
--- a/drivers/gpu/drm/i915/display/icl_dsi.c
+++ b/drivers/gpu/drm/i915/display/icl_dsi.c
@@ -1667,9 +1667,8 @@ static void icl_dsi_add_properties(struct intel_connector *connector)
connector->base.state->scaling_mode = DRM_MODE_SCALE_ASPECT;
- connector->base.display_info.panel_orientation =
- intel_dsi_get_panel_orientation(connector);
- drm_connector_init_panel_orientation_property(&connector->base,
+ drm_connector_set_panel_orientation_with_quirk(&connector->base,
+ intel_dsi_get_panel_orientation(connector),
connector->panel.fixed_mode->hdisplay,
connector->panel.fixed_mode->vdisplay);
}