summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Ã…dahl <jadahl@gmail.com>2022-02-08 16:00:17 +0100
committerMarge Bot <marge-bot@gnome.org>2022-04-29 19:35:35 +0000
commitea39142da2c7e3dc7dbe17f7f2e0d7ef66fab1f8 (patch)
treece703ad179b70c95d5ddc03644f4fcfbff560a31
parent22d11eb9cbc8cad5b1d24b071143945ca0661408 (diff)
downloadmutter-ea39142da2c7e3dc7dbe17f7f2e0d7ef66fab1f8.tar.gz
kms/impl-device/simple: Get the buffer handle from MetaDrmBuffer
This avoids buffer implementation specific code where it shouldn't matter. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2275>
-rw-r--r--src/backends/native/meta-kms-impl-device-simple.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/backends/native/meta-kms-impl-device-simple.c b/src/backends/native/meta-kms-impl-device-simple.c
index 882cd97cc..fa6bca348 100644
--- a/src/backends/native/meta-kms-impl-device-simple.c
+++ b/src/backends/native/meta-kms-impl-device-simple.c
@@ -1209,20 +1209,9 @@ process_cursor_plane_assignment (MetaKmsImplDevice *impl_device,
height = plane_assignment->dst_rect.height;
if (plane_assignment->buffer)
- {
- MetaDrmBufferGbm *buffer_gbm =
- META_DRM_BUFFER_GBM (plane_assignment->buffer);
- struct gbm_bo *bo;
- union gbm_bo_handle handle;
-
- bo = meta_drm_buffer_gbm_get_bo (buffer_gbm);
- handle = gbm_bo_get_handle (bo);
- handle_u32 = handle.u32;
- }
+ handle_u32 = meta_drm_buffer_get_handle (plane_assignment->buffer);
else
- {
- handle_u32 = 0;
- }
+ handle_u32 = 0;
meta_topic (META_DEBUG_KMS,
"[simple] Setting HW cursor of CRTC %u (%s) to %u "