From 358c10de14d27b2611335a2b42ea4cd0d5d8a001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Thu, 20 Jul 2023 11:29:49 +0200 Subject: [PATCH] kms/cursor-manager: Only update cursor plane relevant device on mode set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we see a mode set, the cursor manager will update all the cursor planes so they are set correctly as part of the mode set. KMS updates are always per-device, and what was wrong was that it didn't filter out CRTCs on devices that wasn't part of the mode set. Reported-by: Michel Dänzer Tested-by: Michel Dänzer Part-of: --- src/backends/native/meta-kms-cursor-manager.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/backends/native/meta-kms-cursor-manager.c b/src/backends/native/meta-kms-cursor-manager.c index fe838431e..fbf9ccb90 100644 --- a/src/backends/native/meta-kms-cursor-manager.c +++ b/src/backends/native/meta-kms-cursor-manager.c @@ -458,6 +458,10 @@ update_filter_cb (MetaKmsImpl *impl, MetaKmsCrtc *crtc = crtc_state_impl->crtc; MetaDrmBuffer *old_buffer = NULL; + if (meta_kms_crtc_get_device (crtc) != + meta_kms_update_get_device (update)) + continue; + update = maybe_update_cursor_plane (cursor_manager_impl, crtc, update, &old_buffer); if (old_buffer)