blob: 988797b2f8ce55f9d8601e2e6c64015ccada216c [file] [log] [blame]
Bartosz Bieleckie24f2ca2016-01-07 16:57:10 +01001/*
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 Singh46faf6b2016-08-05 14:40:07 -07007#include "drv_priv.h"
Bartosz Bieleckie24f2ca2016-01-07 16:57:10 +01008#include "helpers.h"
Gurchetan Singh179687e2016-10-28 10:07:35 -07009#include "util.h"
Bartosz Bieleckie24f2ca2016-01-07 16:57:10 +010010
Gurchetan Singh6f6e18a2016-12-19 15:14:18 -080011static struct supported_combination combos[2] = {
12 {DRM_FORMAT_ARGB8888, DRM_FORMAT_MOD_NONE,
13 BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_RENDERING | BO_USE_SW_READ_OFTEN |
14 BO_USE_SW_WRITE_OFTEN | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY},
15 {DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_NONE,
16 BO_USE_CURSOR | BO_USE_LINEAR | BO_USE_RENDERING | BO_USE_SW_READ_OFTEN |
17 BO_USE_SW_WRITE_OFTEN | BO_USE_SW_READ_RARELY | BO_USE_SW_WRITE_RARELY},
Gurchetan Singh179687e2016-10-28 10:07:35 -070018};
19
20static int evdi_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_evdi =
Bartosz Bieleckie24f2ca2016-01-07 16:57:10 +010027{
28 .name = "evdi",
Gurchetan Singh179687e2016-10-28 10:07:35 -070029 .init = evdi_init,
Gurchetan Singh46faf6b2016-08-05 14:40:07 -070030 .bo_create = drv_dumb_bo_create,
31 .bo_destroy = drv_dumb_bo_destroy,
Gurchetan Singh71611d62017-01-03 16:49:56 -080032 .bo_import = drv_prime_bo_import,
Gurchetan Singhef920532016-08-12 16:38:25 -070033 .bo_map = drv_dumb_bo_map,
Bartosz Bieleckie24f2ca2016-01-07 16:57:10 +010034};
35