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.
13 #include <sys/types.h>
24 union bo_handle handles[DRV_MAX_PLANES];
25 uint32_t offsets[DRV_MAX_PLANES];
26 uint32_t sizes[DRV_MAX_PLANES];
27 uint32_t strides[DRV_MAX_PLANES];
28 uint64_t format_modifiers[DRV_MAX_PLANES];
35 struct backend *backend;
39 pthread_mutex_t driver_lock;
48 struct format_metadata {
56 struct format_metadata metadata;
61 struct combination *data;
68 int (*init)(struct driver *drv);
69 void (*close)(struct driver *drv);
70 int (*bo_create)(struct bo *bo, uint32_t width, uint32_t height, uint32_t format,
72 int (*bo_create_with_modifiers)(struct bo *bo, uint32_t width, uint32_t height,
73 uint32_t format, const uint64_t *modifiers, uint32_t count);
74 int (*bo_destroy)(struct bo *bo);
75 int (*bo_import)(struct bo *bo, struct drv_import_fd_data *data);
76 void *(*bo_map)(struct bo *bo, struct map_info *data, size_t plane);
77 int (*bo_unmap)(struct bo *bo, struct map_info *data);
78 uint32_t (*resolve_format)(uint32_t format);
79 struct combinations combos;