X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=gma500.c;h=5b08bc32b09646ee37f9d35143631f5c41f28394;hb=27a7e6a24709564e18c3382d0aeda0b40c7ae03b;hp=bbe20917d51eedd0db29fe254897e4e33f83b684;hpb=179687e4ebc9ce7c5a3199247c116852d9d418ce;p=android-x86%2Fexternal-minigbm.git diff --git a/gma500.c b/gma500.c index bbe2091..5b08bc3 100644 --- a/gma500.c +++ b/gma500.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014 The Chromium OS Authors. All rights reserved. + * Copyright 2014 The Chromium OS Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ @@ -8,22 +8,24 @@ #include "helpers.h" #include "util.h" -static struct supported_combination combos[2] = { - {DRM_FORMAT_RGBX8888, DRM_FORMAT_MOD_NONE, DRV_BO_USE_CURSOR | DRV_BO_USE_LINEAR}, - {DRM_FORMAT_RGBX8888, DRM_FORMAT_MOD_NONE, DRV_BO_USE_RENDERING}, -}; +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, .bo_destroy = drv_dumb_bo_destroy, + .bo_import = drv_prime_bo_import, .bo_map = drv_dumb_bo_map, };