[mutter/wip/rstrode/rhel-8.0.0: 13/30] renderer/native: use DRM formats for dumb buffers



commit 63d48dfa7d1c9508f5266206641578e0caf23f5e
Author: Pekka Paalanen <pekka paalanen collabora co uk>
Date:   Fri Nov 9 14:17:12 2018 +0200

    renderer/native: use DRM formats for dumb buffers
    
    Change the callers of init_dumb_fb () to use DRM format codes. DRM and
    GBM format codes are identical, but since this is about dumb buffers,
    DRM formats fit better.
    
    The header /usr/include/gbm.h installed by Mesa says:
    
     * The FourCC format codes are taken from the drm_fourcc.h definition, and
     * re-namespaced. New GBM formats must not be added, unless they are
     * identical ports from drm_fourcc.
    
    That refers to the GBM_FORMAT_* codes.

 src/backends/native/meta-renderer-native.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/backends/native/meta-renderer-native.c b/src/backends/native/meta-renderer-native.c
index b3fdaf647..34dfb77a6 100644
--- a/src/backends/native/meta-renderer-native.c
+++ b/src/backends/native/meta-renderer-native.c
@@ -672,7 +672,7 @@ init_secondary_gpu_state_cpu_copy_mode (MetaRendererNative         *renderer_nat
       if (!init_dumb_fb (dumb_fb,
                          gpu_kms,
                          width, height,
-                         GBM_FORMAT_XBGR8888,
+                         DRM_FORMAT_XBGR8888,
                          error))
         {
           secondary_gpu_state_free (secondary_gpu_state);
@@ -2426,7 +2426,7 @@ meta_onscreen_native_allocate (CoglOnscreen *onscreen,
       if (!init_dumb_fb (&onscreen_native->egl.dumb_fb,
                          onscreen_native->render_gpu,
                          width, height,
-                         GBM_FORMAT_XRGB8888,
+                         DRM_FORMAT_XRGB8888,
                          error))
         return FALSE;
 


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