[PATCH weston v12 04/40] compositor-drm: Use drm_plane for cursor plane

Pekka Paalanen ppaalanen at gmail.com
Thu Sep 28 11:55:00 UTC 2017


On Tue, 26 Sep 2017 18:15:37 +0100
Daniel Stone <daniels at collabora.com> wrote:

> Change the type of cursor_plane from a weston_plane (base tracking
> structure) to a drm_plane (wrapper containing additional DRM-specific
> details), and make it a dynamically-allocated pointer.
> 
> Using the standard drm_plane allows us to reuse code which already deals
> with drm_planes, e.g. a common cleanup function.
> 
> This patch introduces a 'special plane' helper, creating a drm_plane
> either from a real KMS plane when using universal planes, or a fake plane
> otherwise. Without universal planes, the cursor and primary planes are
> hidden from us; this helper allows us to pretend otherwise.
> 
> Signed-off-by: Daniel Stone <daniels at collabora.com>
> ---
>  libweston/compositor-drm.c | 423 ++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 322 insertions(+), 101 deletions(-)
> 

Hi,

test scenario: start with two outputs plugged in. Unplug one output.
Re-plug the output.

With this patch, the re-plug eventually causes
compositor_accumulate_damage() to enter an endless loop. It looks like
weston_compositor::plane_list could be corrupted.

Using WESTON_DISABLE_UNIVERSAL_PLANES=1, the problem does not appear.


I was originally bisecting a different failure triggered by the re-plug:
weston: /home/pq/git/weston/libweston/compositor-drm.c:2357: drm_output_start_repaint_loop: 
Assertion `scanout_plane->state_cur->output == output' failed.

That happens at patch "compositor-drm: Atomic modesetting support".
Somewhere between that and this patch the behaviour changes from
endless loop to an assert fail.


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20170928/d1c01c91/attachment-0001.sig>


More information about the wayland-devel mailing list