OSDN Git Service

minigbm: mediatek: add support HAL_PIXEL_FORMAT_YV12
[android-x86/external-minigbm.git] / cirrus.c
1 /*
2  * Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
3  * Use of this source code is governed by a BSD-style license that can be
4  * found in the LICENSE file.
5  */
6
7 #include "drv_priv.h"
8 #include "helpers.h"
9 #include "util.h"
10
11 static struct supported_combination combos[5] = {
12         {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, BO_USE_CURSOR | BO_USE_LINEAR},
13         {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, BO_USE_RENDERING},
14         {DRM_FORMAT_RGB888,   DRM_FORMAT_MOD_NONE, BO_USE_RENDERING},
15         {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, BO_USE_CURSOR | BO_USE_LINEAR},
16         {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, BO_USE_RENDERING},
17 };
18
19 static int cirrus_init(struct driver *drv)
20 {
21         drv_insert_combinations(drv, combos, ARRAY_SIZE(combos));
22         return drv_add_kms_flags(drv);
23 }
24
25 struct backend backend_cirrus =
26 {
27         .name = "cirrus",
28         .init = cirrus_init,
29         .bo_create = drv_dumb_bo_create,
30         .bo_destroy = drv_dumb_bo_destroy,
31         .bo_map = drv_dumb_bo_map,
32 };