OSDN Git Service

minigbm: nouveau: add RGB565 to supported render target formats
authorMauro Rossi <issor.oruam@gmail.com>
Sun, 6 Jan 2019 05:27:12 +0000 (06:27 +0100)
committerMauro Rossi <issor.oruam@gmail.com>
Sat, 25 Jan 2020 20:35:42 +0000 (21:35 +0100)
Necessary to avoid following errors in Android:

E [minigbm:gralloc0.cc(123)]: Unsupported combination -- HAL format: 4, HAL usage: 256, drv_format: RG16, use_flags: 131072
E GraphicBufferAllocator: Failed to allocate (1 x 1) layerCount 1 format 4 usage 100: 3

nouveau.c

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