All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Hans de Goede <hdegoede@redhat.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel@lists.freedesktop.org,
	Bastien Nocera <hadess@hadess.net>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 2/2] drm/i915: Deal with upside-down mounted LCD panels
Date: Mon, 8 May 2017 13:27:29 +0100	[thread overview]
Message-ID: <20170508122729.GB7978@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <20170507091056.3406-2-hdegoede@redhat.com>

On Sun, May 07, 2017 at 11:10:56AM +0200, Hans de Goede wrote:
> On some (Bay Trail) devices the LCD panel is mounted upside-down.
> 
> This commit uses the code to read back the initial rotation of the
> primary plane in get_initial_plane_config from Ville Syrjala's
> "drm/fb-helper: Inherit rotation wip" patch and when re-using the
> initial fb it stores that in intel_crtc.initial_rotation.
> 
> It adds an intel_plane_get_rotation helper which combines this
> initial_rotation with any rotation requested by userspace and
> uses this in all places which look at a planes rotation, thus
> transparently dealing with upside-down LCD panels without requiring
> any user-space or fbcon changes.
> 
> This fixes the kernel boot messages switching from being shown the right
> way up in efifb to being shown upside down as soon as a native kms driver
> loads, as well as any graphics displayed by userspace being upside-down.
> 
> Note this only deals with upside-down LCD panels / 180 degrees
> rotation as the hardware in question only supports 180 degrees
> rotation in hardware. The one model known which has a panel mounted
> with 90/270 degrees rotation will need to be fully dealt with in
> userspace, even the firmware boot screen / menus are rotated 90 degrees
> on this one and there simply is nothing the kernel can do about this.

I shall just mention a concern with hiding the transformation on the
connection, we do expose the subpixel layout to userspace and that
should be adjusted based on this lie. There are probably other places
where the orientation of the output leaks through the current interface.

The commit message fails to explain how userspace, which should already
have the tools available to it, is unable to reapply the existing
rotation - i.e. why this is a kernel problem, and whether by hiding this
from userspace we are not trapping ourselves with warts in the ABI.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-05-08 12:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-07  9:10 [PATCH 1/2] drm/i915: intel_crtc_page_flip: Add intel_state local variable Hans de Goede
2017-05-07  9:10 ` [PATCH 2/2] drm/i915: Deal with upside-down mounted LCD panels Hans de Goede
2017-05-08  8:25   ` Jani Nikula
2017-05-08  8:57     ` Hans de Goede
2017-05-08 10:44   ` Ville Syrjälä
2017-05-08 11:12     ` Hans de Goede
2017-05-08 12:27   ` Chris Wilson [this message]
2017-05-08 12:33     ` Hans de Goede
2017-05-08 16:25       ` Eric Anholt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170508122729.GB7978@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hadess@hadess.net \
    --cc=hdegoede@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.