diff mbox series

[1/2] drm/i915: Check for panel orientation quirks on eDP panels

Message ID 20180909133457.10636-2-hdegoede@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm: Make i915 check for panel orient quirks on eDP and add one such quirk | expand

Commit Message

Hans de Goede Sept. 9, 2018, 1:34 p.m. UTC
So far we have only been calling
drm_connector_init_panel_orientation_property(), which checks for
panel orientation quirks in the drm_panel_orientation_quirks.c file,
for DSI panels as so far only devices with DSI panels have had panels
which are not mounted up right.

The new GPD win2 device uses a portrait screen in a landscape case,
so now we've a device with an eDP panel which needs the panel-orientation
property to let the fbcon code and userspace know that the image needs to
be fixed-up.

This commit makes intel_edp_init_connector() call
drm_connector_init_panel_orientation_property() so that the property
gets added.

Reported-and-tested-by: russianneuromancer@ya.ru
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Jani Nikula Sept. 25, 2018, 8:30 a.m. UTC | #1
On Sun, 09 Sep 2018, Hans de Goede <j.w.r.degoede@gmail.com> wrote:
> So far we have only been calling
> drm_connector_init_panel_orientation_property(), which checks for
> panel orientation quirks in the drm_panel_orientation_quirks.c file,
> for DSI panels as so far only devices with DSI panels have had panels
> which are not mounted up right.
>
> The new GPD win2 device uses a portrait screen in a landscape case,
> so now we've a device with an eDP panel which needs the panel-orientation
> property to let the fbcon code and userspace know that the image needs to
> be fixed-up.
>
> This commit makes intel_edp_init_connector() call
> drm_connector_init_panel_orientation_property() so that the property
> gets added.
>
> Reported-and-tested-by: russianneuromancer@ya.ru
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Always saddened by every quirk...

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> ---
>  drivers/gpu/drm/i915/intel_dp.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 436c22de33b6..4f0b3c8f3f8c 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -6490,6 +6490,10 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
>  	intel_connector->panel.backlight.power = intel_edp_backlight_power;
>  	intel_panel_setup_backlight(connector, pipe);
>  
> +	if (fixed_mode)
> +		drm_connector_init_panel_orientation_property(
> +			connector, fixed_mode->hdisplay, fixed_mode->vdisplay);
> +
>  	return true;
>  
>  out_vdd_off:
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 436c22de33b6..4f0b3c8f3f8c 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -6490,6 +6490,10 @@  static bool intel_edp_init_connector(struct intel_dp *intel_dp,
 	intel_connector->panel.backlight.power = intel_edp_backlight_power;
 	intel_panel_setup_backlight(connector, pipe);
 
+	if (fixed_mode)
+		drm_connector_init_panel_orientation_property(
+			connector, fixed_mode->hdisplay, fixed_mode->vdisplay);
+
 	return true;
 
 out_vdd_off: