OSDN Git Service

minigbm: rockchip: add NV12 back in as supported format
[android-x86/external-minigbm.git] / marvell.c
index 73f7d9a..90f2cd8 100644 (file)
--- a/marvell.c
+++ b/marvell.c
 #include "helpers.h"
 #include "util.h"
 
-static struct supported_combination combos[4] = {
-       {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR},
-       {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, DRV_BO_USE_RENDERING},
-       {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR},
-       {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, DRV_BO_USE_RENDERING},
-}
+static const uint32_t supported_formats[] = {
+       DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888
+};
 
 static int marvell_init(struct driver *drv)
 {
-       drv_insert_combinations(drv, combos, ARRAY_SIZE(combos));
-       return drv_add_kms_flags(drv);
+       return drv_add_linear_combinations(drv, supported_formats,
+                                          ARRAY_SIZE(supported_formats));
 }
 
 struct backend backend_marvell =
@@ -29,6 +26,7 @@ struct backend backend_marvell =
        .init = marvell_init,
        .bo_create = drv_dumb_bo_create,
        .bo_destroy = drv_dumb_bo_destroy,
+       .bo_import = drv_prime_bo_import,
        .bo_map = drv_dumb_bo_map,
 };