X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=cirrus.c;h=4f0e983538d6ad72e41b4b8424910a00170dba27;hb=4b5d0bf2ab4da0f475f01575fb369b7eb9415d7c;hp=3df193036710a1bd14f83b4a4f4c6f8494c0e186;hpb=6b41fb55deae7d8ae00c33f7ce849d6fd6525d77;p=android-x86%2Fexternal-minigbm.git diff --git a/cirrus.c b/cirrus.c index 3df1930..4f0e983 100644 --- a/cirrus.c +++ b/cirrus.c @@ -8,18 +8,21 @@ #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 = -{ +struct backend backend_cirrus = { .name = "cirrus", .init = cirrus_init, .bo_create = drv_dumb_bo_create,