OSDN Git Service

minigbm: cros_gralloc: support GRALLOC_MODULE_API_VERSION_0_3
[android-x86/external-minigbm.git] / cirrus.c
index bcd308b..4f0e983 100644 (file)
--- a/cirrus.c
+++ b/cirrus.c
@@ -8,12 +8,18 @@
 #include "helpers.h"
 #include "util.h"
 
-const static uint32_t supported_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_RGB888,
-                                             DRM_FORMAT_XRGB8888 };
+const static uint32_t render_target_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_RGB888,
+                                                 DRM_FORMAT_XRGB8888 };
 
 static int cirrus_init(struct driver *drv)
 {
-       return drv_add_linear_combinations(drv, supported_formats, ARRAY_SIZE(supported_formats));
+       int ret;
+       ret = drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
+                                  &LINEAR_METADATA, BO_USE_RENDER_MASK);
+       if (ret)
+               return ret;
+
+       return drv_modify_linear_combinations(drv);
 }
 
 struct backend backend_cirrus = {