blob: e088db6e496a56de54f00a970ec995807ffdd889 [file] [log] [blame]
Daniel Blum080405c2015-12-01 22:46:09 -08001/*
2 * Copyright 2015 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#ifdef DRV_MARVELL
Daniel Blum080405c2015-12-01 22:46:09 -08008
Gurchetan Singh46faf6b2016-08-05 14:40:07 -07009#include "drv_priv.h"
Daniel Blum080405c2015-12-01 22:46:09 -080010#include "helpers.h"
Gurchetan Singh179687e2016-10-28 10:07:35 -070011#include "util.h"
Daniel Blum080405c2015-12-01 22:46:09 -080012
Gurchetan Singh179687e2016-10-28 10:07:35 -070013static struct supported_combination combos[4] = {
Gurchetan Singh458976f2016-11-23 17:32:33 -080014 {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, BO_USE_CURSOR | BO_USE_LINEAR},
15 {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, BO_USE_RENDERING},
16 {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, BO_USE_CURSOR | BO_USE_LINEAR},
17 {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, BO_USE_RENDERING},
Gurchetan Singh179687e2016-10-28 10:07:35 -070018}
19
20static int marvell_init(struct driver *drv)
21{
22 drv_insert_combinations(drv, combos, ARRAY_SIZE(combos));
23 return drv_add_kms_flags(drv);
24}
25
26struct backend backend_marvell =
Daniel Blum080405c2015-12-01 22:46:09 -080027{
28 .name = "marvell",
Gurchetan Singh179687e2016-10-28 10:07:35 -070029 .init = marvell_init,
Gurchetan Singh46faf6b2016-08-05 14:40:07 -070030 .bo_create = drv_dumb_bo_create,
31 .bo_destroy = drv_dumb_bo_destroy,
Gurchetan Singhef920532016-08-12 16:38:25 -070032 .bo_map = drv_dumb_bo_map,
Daniel Blum080405c2015-12-01 22:46:09 -080033};
34
35#endif