[mutter] backends/native: Change uint32_t modifiers to uint64_t



commit 690b8806dd3001c0cba0efaba8c0031f67f66d67
Author: Ivan Molodetskikh <yalterz gmail com>
Date:   Sun Mar 6 16:56:27 2022 +0300

    backends/native: Change uint32_t modifiers to uint64_t
    
    They were erroneously cast to uint32_t. In particular this prevented the
    invalid modifier from working as it is equal to a 64-bit -1.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2322>

 src/backends/native/meta-drm-buffer-dumb.c    | 2 +-
 src/backends/native/meta-drm-buffer-gbm.c     | 2 +-
 src/backends/native/meta-drm-buffer-import.c  | 2 +-
 src/backends/native/meta-drm-buffer-private.h | 2 +-
 src/backends/native/meta-drm-buffer.c         | 2 +-
 src/backends/native/meta-drm-buffer.h         | 2 +-
 src/backends/native/meta-renderer-native.c    | 2 +-
 7 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/src/backends/native/meta-drm-buffer-dumb.c b/src/backends/native/meta-drm-buffer-dumb.c
index 87ed4c9cee..dcf9949478 100644
--- a/src/backends/native/meta-drm-buffer-dumb.c
+++ b/src/backends/native/meta-drm-buffer-dumb.c
@@ -163,7 +163,7 @@ meta_drm_buffer_dumb_get_offset (MetaDrmBuffer *buffer,
   return buffer_dumb->offset;
 }
 
-static uint32_t
+static uint64_t
 meta_drm_buffer_dumb_get_modifier (MetaDrmBuffer *buffer)
 {
   return DRM_FORMAT_MOD_LINEAR;
diff --git a/src/backends/native/meta-drm-buffer-gbm.c b/src/backends/native/meta-drm-buffer-gbm.c
index 2b00b1ebfc..5a77915829 100644
--- a/src/backends/native/meta-drm-buffer-gbm.c
+++ b/src/backends/native/meta-drm-buffer-gbm.c
@@ -124,7 +124,7 @@ meta_drm_buffer_gbm_get_offset (MetaDrmBuffer *buffer,
   return gbm_bo_get_offset (buffer_gbm->bo, plane);
 }
 
-static uint32_t
+static uint64_t
 meta_drm_buffer_gbm_get_modifier (MetaDrmBuffer *buffer)
 {
   MetaDrmBufferGbm *buffer_gbm = META_DRM_BUFFER_GBM (buffer);
diff --git a/src/backends/native/meta-drm-buffer-import.c b/src/backends/native/meta-drm-buffer-import.c
index 698bbda088..d858b18e66 100644
--- a/src/backends/native/meta-drm-buffer-import.c
+++ b/src/backends/native/meta-drm-buffer-import.c
@@ -104,7 +104,7 @@ meta_drm_buffer_import_get_offset (MetaDrmBuffer *buffer,
   return meta_drm_buffer_get_offset (importee, offset);
 }
 
-static uint32_t
+static uint64_t
 meta_drm_buffer_import_get_modifier (MetaDrmBuffer *buffer)
 {
   MetaDrmBufferImport *buffer_import = META_DRM_BUFFER_IMPORT (buffer);
diff --git a/src/backends/native/meta-drm-buffer-private.h b/src/backends/native/meta-drm-buffer-private.h
index 9b41379f14..8592691141 100644
--- a/src/backends/native/meta-drm-buffer-private.h
+++ b/src/backends/native/meta-drm-buffer-private.h
@@ -52,7 +52,7 @@ struct _MetaDrmBufferClass
   uint32_t (* get_format) (MetaDrmBuffer *buffer);
   int (* get_offset) (MetaDrmBuffer *buffer,
                       int            plane);
-  uint32_t (* get_modifier) (MetaDrmBuffer *buffer);
+  uint64_t (* get_modifier) (MetaDrmBuffer *buffer);
 
   gboolean (* fill_timings) (MetaDrmBuffer  *buffer,
                              CoglFrameInfo  *info,
diff --git a/src/backends/native/meta-drm-buffer.c b/src/backends/native/meta-drm-buffer.c
index c526263f7c..b7d4d8d30e 100644
--- a/src/backends/native/meta-drm-buffer.c
+++ b/src/backends/native/meta-drm-buffer.c
@@ -222,7 +222,7 @@ meta_drm_buffer_get_offset (MetaDrmBuffer *buffer,
   return META_DRM_BUFFER_GET_CLASS (buffer)->get_offset (buffer, plane);
 }
 
-uint32_t
+uint64_t
 meta_drm_buffer_get_modifier (MetaDrmBuffer *buffer)
 {
   return META_DRM_BUFFER_GET_CLASS (buffer)->get_modifier (buffer);
diff --git a/src/backends/native/meta-drm-buffer.h b/src/backends/native/meta-drm-buffer.h
index 801156cecf..c393d4fee7 100644
--- a/src/backends/native/meta-drm-buffer.h
+++ b/src/backends/native/meta-drm-buffer.h
@@ -63,7 +63,7 @@ uint32_t meta_drm_buffer_get_format (MetaDrmBuffer *buffer);
 int meta_drm_buffer_get_offset (MetaDrmBuffer *buffer,
                                 int            plane);
 
-uint32_t meta_drm_buffer_get_modifier (MetaDrmBuffer *buffer);
+uint64_t meta_drm_buffer_get_modifier (MetaDrmBuffer *buffer);
 
 gboolean meta_drm_buffer_supports_fill_timings (MetaDrmBuffer *buffer);
 
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index 28ea94e9df..41bf04d665 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -906,7 +906,7 @@ meta_renderer_native_create_dma_buf (CoglRenderer  *cogl_renderer,
         uint32_t stride;
         uint32_t offset;
         uint32_t bpp;
-        uint32_t modifier;
+        uint64_t modifier;
         uint32_t format;
         CoglFramebuffer *dmabuf_fb;
         CoglDmaBufHandle *dmabuf_handle;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]