Bartosz Bielecki | e24f2ca | 2016-01-07 16:57:10 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2016 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 | #include "drv_priv.h" |
Bartosz Bielecki | e24f2ca | 2016-01-07 16:57:10 +0100 | [diff] [blame] | 8 | #include "helpers.h" |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 9 | #include "util.h" |
Bartosz Bielecki | e24f2ca | 2016-01-07 16:57:10 +0100 | [diff] [blame] | 10 | |
Gurchetan Singh | 8ac0c9a | 2017-05-15 09:34:22 -0700 | [diff] [blame] | 11 | static const uint32_t render_target_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XRGB8888 }; |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 12 | |
| 13 | static int evdi_init(struct driver *drv) |
| 14 | { |
Gurchetan Singh | d300145 | 2017-11-03 17:18:36 -0700 | [diff] [blame] | 15 | drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats), |
| 16 | &LINEAR_METADATA, BO_USE_RENDER_MASK); |
Gurchetan Singh | 8ac0c9a | 2017-05-15 09:34:22 -0700 | [diff] [blame] | 17 | |
| 18 | return drv_modify_linear_combinations(drv); |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 19 | } |
| 20 | |
Gurchetan Singh | 3e9d383 | 2017-10-31 10:36:25 -0700 | [diff] [blame] | 21 | const struct backend backend_evdi = { |
Bartosz Bielecki | e24f2ca | 2016-01-07 16:57:10 +0100 | [diff] [blame] | 22 | .name = "evdi", |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 23 | .init = evdi_init, |
Gurchetan Singh | 46faf6b | 2016-08-05 14:40:07 -0700 | [diff] [blame] | 24 | .bo_create = drv_dumb_bo_create, |
| 25 | .bo_destroy = drv_dumb_bo_destroy, |
Gurchetan Singh | 71611d6 | 2017-01-03 16:49:56 -0800 | [diff] [blame] | 26 | .bo_import = drv_prime_bo_import, |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 27 | .bo_map = drv_dumb_bo_map, |
Gurchetan Singh | ba6bd50 | 2017-09-18 15:29:47 -0700 | [diff] [blame] | 28 | .bo_unmap = drv_bo_munmap, |
Bartosz Bielecki | e24f2ca | 2016-01-07 16:57:10 +0100 | [diff] [blame] | 29 | }; |