[Intel-gfx] [PATCH i-g-t] lib/igt_kms: Handle changing rotation property correctly

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Wed Nov 22 11:47:34 UTC 2017


Op 22-11-17 om 11:06 schreef Daniel Vetter:
> On Wed, Nov 22, 2017 at 10:50:57AM +0100, Maarten Lankhorst wrote:
>> The rotation property sucks because it may affect whether
>> drmModeSetPlane succeeds or not. Add some code to handle
>> this.
>>
>> First try to set rotation directly, if that succeeds we
>> return immediately. If it fails we disable the plane, set
>> the rotation property and run the rest of the code.
>>
>> This will hopefully make legacy rotation work in more cases when
>> scaling is not supported.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> It's kinda why we have atomic. And strictly speaking, almost anything
> could be affected by this with the legacy plane api, requiring a disable
> plane, upate props, enable plane sequence.
>
> I guess we should just aim for more atomic in igts :-)
>
> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

In general only when you have to update 2 incompatible properties at the
same time, rotation is just a very special case we care about because
there are patches that may allow fbcon to be rotated.

A lot of code in IGT has the following setup pattern:

igt_output_set_pipe(output, pipe);
igt_plane_set_fb(primary, fb);
igt_display_commit();

I want this to continue to work in case of rotated FBCON, without having to
special case each test. I would also not mind if we make the first commit
always atomic, if possible. But that wouldn't work with legacy rotated fbcon,
so this workaround would still be needed. :)

Pushed, thanks for review.

~Maarten



More information about the Intel-gfx mailing list