X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=marvell.c;h=455b03304be472872da2a3ee9e1a7d219570e062;hb=9dea0f87c5526e2bd649afbb7abd3e54572e76f0;hp=90f2cd8329ce42f07e37bb92984c958f19c1a810;hpb=6b41fb55deae7d8ae00c33f7ce849d6fd6525d77;p=android-x86%2Fexternal-minigbm.git diff --git a/marvell.c b/marvell.c index 90f2cd8..455b033 100644 --- a/marvell.c +++ b/marvell.c @@ -10,24 +10,28 @@ #include "helpers.h" #include "util.h" -static const uint32_t supported_formats[] = { - DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888 -}; +static const uint32_t render_target_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888 }; static int marvell_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_add_linear_combinations(drv, render_target_formats, + ARRAY_SIZE(render_target_formats)); } -struct backend backend_marvell = -{ +struct backend backend_marvell = { .name = "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, + .bo_unmap = drv_bo_munmap, }; #endif