OSDN Git Service

minigbm: nouveau: add RGB{A,X}8888 to supported render target formats
authorMauro Rossi <issor.oruam@gmail.com>
Fri, 4 Jan 2019 12:51:58 +0000 (13:51 +0100)
committerMauro Rossi <issor.oruam@gmail.com>
Sat, 25 Jan 2020 20:35:41 +0000 (21:35 +0100)
Necessary to avoid following errors in Android:

E [minigbm:gralloc0.cc(123)]: Unsupported combination -- HAL format: 1, HAL usage: 2304, drv_format: AB24, use_flags: 131072
E GraphicBufferAllocator: Failed to allocate (1024 x 24) layerCount 1 format 1 usage 900: 3

nouveau.c

index d0f25d4..6237dbd 100644 (file)
--- a/nouveau.c
+++ b/nouveau.c
@@ -8,7 +8,8 @@
 #include "helpers.h"
 #include "util.h"
 
-static const uint32_t render_target_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888 };
+static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_XBGR8888,
+                                                 DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888 };
 
 static int nouveau_init(struct driver *drv)
 {