disabling rotation for a particular display area

Marius Vlad marius.vlad at collabora.com
Tue Oct 1 08:50:56 UTC 2024


Hi Ivan,

On Fri, Sep 20, 2024 at 05:54:27PM +0300, Ivan Drobyshevskyi wrote:
> Hi all,
> 
> Is there any way to make weston not rotate a particular window? Any
> kind of ugly workaround will do.
> 
> Larger context around it -- high resolution video on an embedded board
> becomes super jerky when the display is rotated, and plays smoothly
> when it's not. So one idea is to pre-rotate the video.
> 
> Full details below:
> 
> There's an i.MX6DL embedded board, running community flavor of Yocto
> BSP (meta-freescale) with weston (8.0.0) and gstreamer 1.16. DRM
> backend is used, with etnaviv driver.
> 
> FullHD LVDS display is connected, natively in landscape mode, but must
> be used in portrait mode, so it's rotated in weston.ini
> (transform=270).
> 
> Now the problem: higher resolution video (about half of FullHD,
> occupying half of the screen) is very teared/jerky.
> FPS by itself is not an issue, reported around 30 by fpsdisplaysink.
> Now if display rotation is disabled (transform=0), video is smooth!
> Video is played via gst-launch-1.0 with waylandsink.
> 
> I've backported "rotate-method" waylandsink support, which effectively
> calls wl_surface_set_buffer_transform(), among other things.
> The idea was to match weston display rotation and video rotation so
> that they cancel out.
> The commit didn't apply cleanly, but I think I've figured it out and
> ported properly.
> Video is indeed rotated, but still teared/jerky, no improvement at all
> (tried both CW and CCW just in case).
Perhaps there's no offloading to a HW plane even with rotate-method
added?

Merely a speculation but between version 8 and 9 of Weston we redefined
the output roation transforms as they seem to be have been inversed, and
aligned them with the spec [1]. If there's not that much of a hassle,
suggest trying out Weston 9 (or newer obviously), or maybe try
to backport this yourself in case there's no way on updating.
You should change, in your ini file, transform=270 to
transform=90, and give it another go (with the same
rotate-method for waylandsink).

Alternatively, you can try to debug this on your own using drm-backend
log scope, which you can activate by adding `--debug` cmd line option when 
running Weston.  Then use weston-debug drm-backend and look for lines that
could hint why Weston wasn't able to lift the waylandsink view into a HW plane.
Probably not a lot would make sense but you can compare between a good
run (with no orietnation applied) and with one that doesn't work and
maybe work out the difference.

Note that Weston 8 is quite old and lot of things changed even with this debug
scope part.

[1] https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/383
> 
> Thanks,
> Ivan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20241001/40ba355c/attachment.sig>


More information about the wayland-devel mailing list