blob: 91466c96c4d41809832d300c8cea0099c4ecbd8f [file] [log] [blame]
Stéphane Marchesin25a26062014-09-12 16:18:59 -07001/*
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
Gurchetan Singh46faf6b2016-08-05 14:40:07 -07007#include "drv_priv.h"
Stéphane Marchesin25a26062014-09-12 16:18:59 -07008#include "helpers.h"
Gurchetan Singh179687e2016-10-28 10:07:35 -07009#include "util.h"
Stéphane Marchesin25a26062014-09-12 16:18:59 -070010
Gurchetan Singh179687e2016-10-28 10:07:35 -070011static struct supported_combination combos[5] = {
Gurchetan Singh458976f2016-11-23 17:32:33 -080012 {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},
Gurchetan Singh179687e2016-10-28 10:07:35 -070017};
18
19static 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
25struct backend backend_cirrus =
Stéphane Marchesin25a26062014-09-12 16:18:59 -070026{
27 .name = "cirrus",
Gurchetan Singh179687e2016-10-28 10:07:35 -070028 .init = cirrus_init,
Gurchetan Singh46faf6b2016-08-05 14:40:07 -070029 .bo_create = drv_dumb_bo_create,
30 .bo_destroy = drv_dumb_bo_destroy,
Gurchetan Singhef920532016-08-12 16:38:25 -070031 .bo_map = drv_dumb_bo_map,
Stéphane Marchesin25a26062014-09-12 16:18:59 -070032};