Daniel Blum | 080405c | 2015-12-01 22:46:09 -0800 | [diff] [blame] | 1 | /* |
| 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 Singh | 46faf6b | 2016-08-05 14:40:07 -0700 | [diff] [blame] | 7 | #ifdef DRV_MARVELL |
Daniel Blum | 080405c | 2015-12-01 22:46:09 -0800 | [diff] [blame] | 8 | |
Gurchetan Singh | 46faf6b | 2016-08-05 14:40:07 -0700 | [diff] [blame] | 9 | #include "drv_priv.h" |
Daniel Blum | 080405c | 2015-12-01 22:46:09 -0800 | [diff] [blame] | 10 | #include "helpers.h" |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 11 | #include "util.h" |
Daniel Blum | 080405c | 2015-12-01 22:46:09 -0800 | [diff] [blame] | 12 | |
Gurchetan Singh | 6f6e18a | 2016-12-19 15:14:18 -0800 | [diff] [blame] | 13 | static struct supported_combination combos[2] = { |
| 14 | {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE, |
| 15 | BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_RENDERING | BO_USE_SW_READ_OFTEN | |
| 16 | BO_USE_SW_WRITE_OFTEN | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY}, |
| 17 | {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE, |
| 18 | BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_RENDERING | BO_USE_SW_READ_OFTEN | |
| 19 | BO_USE_SW_WRITE_OFTEN | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY}, |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 20 | } |
| 21 | |
| 22 | static int marvell_init(struct driver *drv) |
| 23 | { |
| 24 | drv_insert_combinations(drv, combos, ARRAY_SIZE(combos)); |
| 25 | return drv_add_kms_flags(drv); |
| 26 | } |
| 27 | |
| 28 | struct backend backend_marvell = |
Daniel Blum | 080405c | 2015-12-01 22:46:09 -0800 | [diff] [blame] | 29 | { |
| 30 | .name = "marvell", |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 31 | .init = marvell_init, |
Gurchetan Singh | 46faf6b | 2016-08-05 14:40:07 -0700 | [diff] [blame] | 32 | .bo_create = drv_dumb_bo_create, |
| 33 | .bo_destroy = drv_dumb_bo_destroy, |
Gurchetan Singh | 71611d6 | 2017-01-03 16:49:56 -0800 | [diff] [blame] | 34 | .bo_import = drv_prime_bo_import, |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 35 | .bo_map = drv_dumb_bo_map, |
Daniel Blum | 080405c | 2015-12-01 22:46:09 -0800 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | #endif |