On 15-02-17 15:59, Ville Syrjälä wrote:
On Wed, Feb 15, 2017 at 03:54:17PM +0100, Hans de Goede wrote:
As discussed here:
I've a mini-laptop which uses a phone-screen,
so the native orientation of the screen is portrait,
where as for a clam-shell device one wants it to
be landscape. Ideally there would be a flag somewhere
to tell the i915 driver that the panel is mounted
90° rotated in its bezel and have the i915 driver
apply that rotation on top of whatever rotation
So question is there already a place (variable) in
the i915 driver where one can set such a rotation
offset to apply on top of what userspace requests ?
If not do you have any idea how feasible adding one
would be and can you give me a few pointers / hints
where to start with such a thing ?
You could have a look at my branch (which I pointed out in the bug).
Ok, so the patch that actually is relevant to this
discussion (and not just a cleanup / bug-fix) seems to be:
AFAICT that will make fbcon inherit the rotation setting of
the primary plan on the primary crt. That may solve the
original bug as reported, but not the case / device I'm
talking about. What I would like to see is a "rotation offset"
field somewhere to be applied to all rotations in a way which
is hidden from userspace. Specifically the device I've has a
screen which is 720x1280 in resolution, but I want userspace
to see it as a 1280x720 screen because that is how it is used
in the hardware. So I want a 90° rotation to be applied which
is completely hidden from userspace. So when userspace
(e.g. the Xorg server + modesetting driver) asks for 0° degree
rotation under the hood they get 90 applied, when they aks for
the panel resolution they get 1280x720 instead of 720x1280.
Basically the idea is that the kernel as the HAL it is supposed
to be (amongst other things) hide the hardware weirdness / quirk
of using a portrait panel in a landscape bezel.
I hope this clarifies what I want to achieve and yes of course
fbcon should follow suite and also pick up the rotation offset.
But note that 90/270 degree rotation is a little busted currently.
You'll need at least
dri-devel mailing list