X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=gma500.c;h=5b08bc32b09646ee37f9d35143631f5c41f28394;hb=27a7e6a24709564e18c3382d0aeda0b40c7ae03b;hp=d8932fb40dacc1e058ad9f726b7d8781787bb88c;hpb=71611d63feec6d7921a1acf7ea52c6b2c2465e4a;p=android-x86%2Fexternal-minigbm.git diff --git a/gma500.c b/gma500.c index d8932fb..5b08bc3 100644 --- a/gma500.c +++ b/gma500.c @@ -8,20 +8,20 @@ #include "helpers.h" #include "util.h" -static struct supported_combination combos[1] = { - {DRM_FORMAT_RGBX8888, DRM_FORMAT_MOD_NONE, - BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_RENDERING | BO_USE_SW_READ_OFTEN | - BO_USE_SW_WRITE_OFTEN | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY}, -}; +static const uint32_t render_target_formats[] = { DRM_FORMAT_RGBX8888 }; static int gma500_init(struct driver *drv) { - drv_insert_combinations(drv, combos, ARRAY_SIZE(combos)); - return drv_add_kms_flags(drv); + 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_gma500 = -{ +struct backend backend_gma500 = { .name = "gma500", .init = gma500_init, .bo_create = drv_dumb_bo_create,