From: Hans de Goede <hdegoede@redhat.com>
To: "Bastien Nocera" <hadess@hadess.net>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
intel-gfx <intel-gfx@lists.freedesktop.org>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/2] drm: Make fbdev inherit the crtc's initial rotation
Date: Sun, 7 May 2017 11:05:13 +0200 [thread overview]
Message-ID: <b39c96f7-e8f2-cf4a-bbfb-24105e62faa4@redhat.com> (raw)
In-Reply-To: <9764eefa-0229-264a-0036-e676366f0629@redhat.com>
Hi,
On 30-04-17 21:34, Hans de Goede wrote:
> Hi,
>
> On 27-04-17 18:39, Bastien Nocera wrote:
>> On Thu, 2017-04-27 at 19:24 +0300, Ville Syrjälä wrote:
<snip>
>>> Well, there are really two cases to consider:
>>>
>>> 1. BIOS/whatever configures display hardware rotation in a way
>>> that matches the orientation of the physical display
>>> 2. BIOS didn't do that. Either the hardware can't do what
>>> would be required, or the BIOS just chose not to do it.
>>>
>>> Case 1 should work with these patches as long as the DDX will set up
>>> the
>>> initial randr rotation to match what it read out from the kms
>>> rotation
>>> property of the primary plane. >
So I've been running some tests with the 2 original patches focussing
only on the normal screen is upside down, BIOS has configured hardware
rotation case which is what all devices except on special device
seem to have.
As expected with these 2 patches fbcon and the plymouth splashscreen
work fine. If I then start:
a) Xorg with modesetting driver: I get the screen the right way
up, but the cursor plane is upside down both in coordinates (where
the cursor gets shown) as well as the cursor glyph being upside down
b) Xorg with intel driver, the intel driver re-sets the primary plane's
drm "rotation" property, so everthing is upside down. At least the
primary and cursor planes are consistent with each other now
(the touchscreen coordinates how ever are not).
c) Gnome as Wayland compositor, same as Xorg with intel driver
So think more about this I think that Ville's 2 original cases
really are:
1. All planes support the necessary rotation in hardware, so we
can fix things up fully in hardware, aka the upside down case
which I believe is the majority of all troublesome hardware
out there.
2. The necessary rotation is not supported in hardware. This
is the case with the GPD-win where we've a 90 / 270 degrees
rotation. Here even the EFI configuration menu, grub, efifb,
etc. all are rotated.
My conclusion of all this is that:
1. For 1. we can and should fix this entirely and transparently
in the kernel, we need kernel fixes for fbcon/fbdev anyways, so
we might just as well go all the way, otherwise all of Xorg + modesetting,
Xorg + intel and Gnome as Wayland compositor will need separate
fixes. So this is best dealt with in the kernel, esp. since there
are more Wayland compositors out there.
2. There is nothing the kernel can do here, so this one we really
need to fix in userspace. I've some ideas for this, but those
fall outside the scope of this discussion.
I've already implemented the all kernel fix for 1. It is a single
patch only touching the i915 driver, since if we transparently deal
with the extra rotation in the i915 code we no longer need the
drm_fb_helper changes as things will just work for the fbcon too,
which is really nice to see and to me shows this is the right way
to solve this. The patch adds just 80 lines of code and completely
fixes this issue :)
I'll send out the patch right after this mail.
Regards,
Hans
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-05-07 9:05 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-23 16:11 [PATCH 1/2] drm: Make fbdev inherit the crtc's initial rotation Hans de Goede
2017-04-23 16:11 ` [PATCH 1/2] drm/fb-helper: Make fbdev inherit the crtc's rotation Hans de Goede
2017-04-26 12:13 ` Bastien Nocera
2017-04-30 19:22 ` Hans de Goede
2017-05-06 9:20 ` Bastien Nocera
2017-04-23 16:11 ` [PATCH 2/2] drm/i915: Make get_initial_plane_config also get the initial rotation config Hans de Goede
2017-04-26 12:14 ` Bastien Nocera
2017-04-24 12:48 ` [PATCH 1/2] drm: Make fbdev inherit the crtc's initial rotation Ville Syrjälä
2017-04-26 12:28 ` Bastien Nocera
2017-04-27 16:24 ` Ville Syrjälä
2017-04-27 16:39 ` Bastien Nocera
2017-04-30 19:34 ` Hans de Goede
2017-05-06 9:22 ` Bastien Nocera
2017-05-07 9:05 ` Hans de Goede [this message]
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=b39c96f7-e8f2-cf4a-bbfb-24105e62faa4@redhat.com \
--to=hdegoede@redhat.com \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hadess@hadess.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox