Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 1 | /* |
Daniele Castagna | 7a755de | 2016-12-16 17:32:30 -0500 | [diff] [blame] | 2 | * Copyright 2014 The Chromium OS Authors. All rights reserved. |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 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_ROCKCHIP |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 8 | |
Zach Reizner | 58080df | 2016-04-27 11:14:41 -0700 | [diff] [blame] | 9 | #include <errno.h> |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 10 | #include <rockchip_drm.h> |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 11 | #include <stdbool.h> |
Ilja H. Friedel | f9d2ab7 | 2015-04-09 14:08:36 -0700 | [diff] [blame] | 12 | #include <stdio.h> |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 13 | #include <string.h> |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 14 | #include <sys/mman.h> |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 15 | #include <xf86drm.h> |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 16 | |
Gurchetan Singh | 46faf6b | 2016-08-05 14:40:07 -0700 | [diff] [blame] | 17 | #include "drv_priv.h" |
Dominik Behr | e13ac28 | 2015-01-13 00:59:21 -0800 | [diff] [blame] | 18 | #include "helpers.h" |
Zach Reizner | 58080df | 2016-04-27 11:14:41 -0700 | [diff] [blame] | 19 | #include "util.h" |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 20 | |
Gurchetan Singh | 8ac0c9a | 2017-05-15 09:34:22 -0700 | [diff] [blame^] | 21 | static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888, |
| 22 | DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888, |
| 23 | DRM_FORMAT_XRGB8888 }; |
| 24 | |
| 25 | static const uint32_t texture_source_formats[] = { DRM_FORMAT_R8, DRM_FORMAT_NV12, |
| 26 | DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID }; |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 27 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 28 | static int afbc_bo_from_format(struct bo *bo, uint32_t width, uint32_t height, uint32_t format) |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 29 | { |
| 30 | /* We've restricted ourselves to four bytes per pixel. */ |
| 31 | const uint32_t pixel_size = 4; |
| 32 | |
| 33 | const uint32_t clump_width = 4; |
| 34 | const uint32_t clump_height = 4; |
| 35 | |
| 36 | #define AFBC_NARROW 1 |
| 37 | #if AFBC_NARROW == 1 |
| 38 | const uint32_t block_width = 4 * clump_width; |
| 39 | const uint32_t block_height = 4 * clump_height; |
| 40 | #else |
| 41 | const uint32_t block_width = 8 * clump_width; |
| 42 | const uint32_t block_height = 2 * clump_height; |
| 43 | #endif |
| 44 | |
| 45 | const uint32_t header_block_size = 16; |
| 46 | const uint32_t body_block_size = block_width * block_height * pixel_size; |
| 47 | const uint32_t width_in_blocks = DIV_ROUND_UP(width, block_width); |
| 48 | const uint32_t height_in_blocks = DIV_ROUND_UP(height, block_height); |
| 49 | const uint32_t total_blocks = width_in_blocks * height_in_blocks; |
| 50 | |
| 51 | const uint32_t header_plane_size = total_blocks * header_block_size; |
| 52 | const uint32_t body_plane_size = total_blocks * body_block_size; |
| 53 | |
| 54 | /* GPU requires 64 bytes, but EGL import code expects 1024 byte |
| 55 | * alignement for the body plane. */ |
| 56 | const uint32_t body_plane_alignment = 1024; |
| 57 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 58 | const uint32_t body_plane_offset = ALIGN(header_plane_size, body_plane_alignment); |
| 59 | const uint32_t total_size = body_plane_offset + body_plane_size; |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 60 | |
| 61 | bo->strides[0] = width_in_blocks * block_width * pixel_size; |
| 62 | bo->sizes[0] = total_size; |
| 63 | bo->offsets[0] = 0; |
| 64 | |
| 65 | bo->total_size = total_size; |
| 66 | |
| 67 | bo->format_modifiers[0] = DRM_FORMAT_MOD_CHROMEOS_ROCKCHIP_AFBC; |
| 68 | |
| 69 | return 0; |
| 70 | } |
| 71 | |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 72 | static int rockchip_add_kms_item(struct driver *drv, const struct kms_item *item) |
| 73 | { |
| 74 | int ret; |
Gurchetan Singh | 8ac0c9a | 2017-05-15 09:34:22 -0700 | [diff] [blame^] | 75 | uint32_t i, j; |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 76 | uint64_t flags; |
| 77 | struct combination *combo; |
| 78 | struct format_metadata metadata; |
| 79 | |
| 80 | for (i = 0; i < drv->backend->combos.size; i++) { |
| 81 | combo = &drv->backend->combos.data[i]; |
| 82 | if (combo->format == item->format) { |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 83 | if (item->modifier == DRM_FORMAT_MOD_CHROMEOS_ROCKCHIP_AFBC) { |
| 84 | flags = BO_USE_RENDERING | BO_USE_SCANOUT | BO_USE_TEXTURE; |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 85 | metadata.modifier = item->modifier; |
| 86 | metadata.tiling = 0; |
| 87 | metadata.priority = 2; |
| 88 | |
Gurchetan Singh | 8ac0c9a | 2017-05-15 09:34:22 -0700 | [diff] [blame^] | 89 | for (j = 0; j < ARRAY_SIZE(texture_source_formats); j++) { |
| 90 | if (item->format == texture_source_formats[j]) |
| 91 | flags &= ~BO_USE_RENDERING; |
| 92 | } |
| 93 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 94 | ret = drv_add_combination(drv, item[i].format, &metadata, flags); |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 95 | if (ret) |
| 96 | return ret; |
| 97 | } else { |
| 98 | combo->usage |= item->usage; |
| 99 | } |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | return 0; |
| 104 | } |
| 105 | |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 106 | static int rockchip_init(struct driver *drv) |
| 107 | { |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 108 | int ret; |
| 109 | uint32_t i, num_items; |
| 110 | struct kms_item *items; |
| 111 | struct format_metadata metadata; |
| 112 | |
| 113 | metadata.tiling = 0; |
| 114 | metadata.priority = 1; |
| 115 | metadata.modifier = DRM_FORMAT_MOD_NONE; |
| 116 | |
Gurchetan Singh | 8ac0c9a | 2017-05-15 09:34:22 -0700 | [diff] [blame^] | 117 | ret = drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats), |
| 118 | &metadata, BO_USE_RENDER_MASK); |
| 119 | if (ret) |
| 120 | return ret; |
| 121 | |
| 122 | ret = drv_add_combinations(drv, texture_source_formats, ARRAY_SIZE(texture_source_formats), |
| 123 | &metadata, BO_USE_TEXTURE_MASK); |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 124 | if (ret) |
| 125 | return ret; |
| 126 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 127 | drv_modify_combination(drv, DRM_FORMAT_XRGB8888, &metadata, BO_USE_CURSOR | BO_USE_SCANOUT); |
| 128 | drv_modify_combination(drv, DRM_FORMAT_ARGB8888, &metadata, BO_USE_CURSOR | BO_USE_SCANOUT); |
Gurchetan Singh | 6b41fb5 | 2017-03-01 20:14:39 -0800 | [diff] [blame] | 129 | |
| 130 | items = drv_query_kms(drv, &num_items); |
| 131 | if (!items || !num_items) |
| 132 | return 0; |
| 133 | |
| 134 | for (i = 0; i < num_items; i++) { |
| 135 | ret = rockchip_add_kms_item(drv, &items[i]); |
| 136 | if (ret) { |
| 137 | free(items); |
| 138 | return ret; |
| 139 | } |
| 140 | } |
| 141 | |
| 142 | free(items); |
| 143 | return 0; |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 144 | } |
| 145 | |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 146 | static bool has_modifier(const uint64_t *list, uint32_t count, uint64_t modifier) |
| 147 | { |
| 148 | uint32_t i; |
| 149 | |
| 150 | for (i = 0; i < count; i++) |
| 151 | if (list[i] == modifier) |
| 152 | return true; |
| 153 | |
| 154 | return false; |
| 155 | } |
| 156 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 157 | static int rockchip_bo_create_with_modifiers(struct bo *bo, uint32_t width, uint32_t height, |
| 158 | uint32_t format, const uint64_t *modifiers, |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 159 | uint32_t count) |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 160 | { |
Zach Reizner | 58080df | 2016-04-27 11:14:41 -0700 | [diff] [blame] | 161 | int ret; |
Gurchetan Singh | 42cc6d6 | 2016-08-29 18:19:19 -0700 | [diff] [blame] | 162 | size_t plane; |
Gurchetan Singh | f64487b | 2016-07-14 19:54:44 -0700 | [diff] [blame] | 163 | struct drm_rockchip_gem_create gem_create; |
Zach Reizner | 58080df | 2016-04-27 11:14:41 -0700 | [diff] [blame] | 164 | |
Gurchetan Singh | f3b22da | 2016-11-21 10:46:38 -0800 | [diff] [blame] | 165 | if (format == DRM_FORMAT_NV12) { |
Gurchetan Singh | 10a1180 | 2016-09-23 15:27:07 -0700 | [diff] [blame] | 166 | uint32_t w_mbs = DIV_ROUND_UP(ALIGN(width, 16), 16); |
Gurchetan Singh | d3fbe5b | 2017-01-23 07:58:59 -0800 | [diff] [blame] | 167 | uint32_t h_mbs = DIV_ROUND_UP(ALIGN(height, 16), 16); |
Gurchetan Singh | 42cc6d6 | 2016-08-29 18:19:19 -0700 | [diff] [blame] | 168 | |
Gurchetan Singh | 10a1180 | 2016-09-23 15:27:07 -0700 | [diff] [blame] | 169 | uint32_t aligned_width = w_mbs * 16; |
| 170 | uint32_t aligned_height = DIV_ROUND_UP(h_mbs * 16 * 3, 2); |
| 171 | |
| 172 | drv_bo_from_format(bo, aligned_width, height, format); |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 173 | bo->total_size = bo->strides[0] * aligned_height + w_mbs * h_mbs * 128; |
Kristian H. Kristensen | d1ae0ff | 2017-02-06 22:16:55 -0800 | [diff] [blame] | 174 | } else if (width <= 2560 && |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 175 | has_modifier(modifiers, count, DRM_FORMAT_MOD_CHROMEOS_ROCKCHIP_AFBC)) { |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 176 | /* If the caller has decided they can use AFBC, always |
| 177 | * pick that */ |
| 178 | afbc_bo_from_format(bo, width, height, format); |
Gurchetan Singh | 10a1180 | 2016-09-23 15:27:07 -0700 | [diff] [blame] | 179 | } else { |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 180 | if (!has_modifier(modifiers, count, DRM_FORMAT_MOD_NONE)) { |
| 181 | errno = EINVAL; |
| 182 | fprintf(stderr, "no usable modifier found\n"); |
| 183 | return -1; |
| 184 | } |
Gurchetan Singh | 6ea14ba | 2017-02-08 15:09:13 -0800 | [diff] [blame] | 185 | |
Gurchetan Singh | 6423ecb | 2017-03-29 08:23:40 -0700 | [diff] [blame] | 186 | uint32_t stride; |
Gurchetan Singh | 6ea14ba | 2017-02-08 15:09:13 -0800 | [diff] [blame] | 187 | /* |
| 188 | * Since the ARM L1 cache line size is 64 bytes, align to that |
Gurchetan Singh | 4c3aa42 | 2017-03-23 18:47:06 -0700 | [diff] [blame] | 189 | * as a performance optimization. For YV12, the Mali cmem allocator |
| 190 | * requires that chroma planes are aligned to 64-bytes, so align the |
| 191 | * luma plane to 128 bytes. |
Gurchetan Singh | 6ea14ba | 2017-02-08 15:09:13 -0800 | [diff] [blame] | 192 | */ |
Gurchetan Singh | 6423ecb | 2017-03-29 08:23:40 -0700 | [diff] [blame] | 193 | stride = drv_stride_from_format(format, width, 0); |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 194 | if (format == DRM_FORMAT_YVU420 || format == DRM_FORMAT_YVU420_ANDROID) |
Gurchetan Singh | 4c3aa42 | 2017-03-23 18:47:06 -0700 | [diff] [blame] | 195 | stride = ALIGN(stride, 128); |
| 196 | else |
| 197 | stride = ALIGN(stride, 64); |
| 198 | |
Gurchetan Singh | 6423ecb | 2017-03-29 08:23:40 -0700 | [diff] [blame] | 199 | drv_bo_from_format(bo, stride, height, format); |
Gurchetan Singh | 10a1180 | 2016-09-23 15:27:07 -0700 | [diff] [blame] | 200 | } |
Gurchetan Singh | 42cc6d6 | 2016-08-29 18:19:19 -0700 | [diff] [blame] | 201 | |
Gurchetan Singh | f64487b | 2016-07-14 19:54:44 -0700 | [diff] [blame] | 202 | memset(&gem_create, 0, sizeof(gem_create)); |
Gurchetan Singh | a40ca9e | 2016-08-29 19:51:45 -0700 | [diff] [blame] | 203 | gem_create.size = bo->total_size; |
Gurchetan Singh | f64487b | 2016-07-14 19:54:44 -0700 | [diff] [blame] | 204 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 205 | ret = drmIoctl(bo->drv->fd, DRM_IOCTL_ROCKCHIP_GEM_CREATE, &gem_create); |
Gurchetan Singh | f64487b | 2016-07-14 19:54:44 -0700 | [diff] [blame] | 206 | |
| 207 | if (ret) { |
Gurchetan Singh | cb1471b | 2017-05-15 14:33:16 -0700 | [diff] [blame] | 208 | fprintf(stderr, "drv: DRM_IOCTL_ROCKCHIP_GEM_CREATE failed (size=%llu)\n", |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 209 | gem_create.size); |
Gurchetan Singh | 42cc6d6 | 2016-08-29 18:19:19 -0700 | [diff] [blame] | 210 | return ret; |
Zach Reizner | 58080df | 2016-04-27 11:14:41 -0700 | [diff] [blame] | 211 | } |
| 212 | |
Gurchetan Singh | 42cc6d6 | 2016-08-29 18:19:19 -0700 | [diff] [blame] | 213 | for (plane = 0; plane < bo->num_planes; plane++) |
| 214 | bo->handles[plane].u32 = gem_create.handle; |
| 215 | |
| 216 | return 0; |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 217 | } |
| 218 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 219 | static int rockchip_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32_t format, |
| 220 | uint32_t flags) |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 221 | { |
| 222 | uint64_t modifiers[] = { DRM_FORMAT_MOD_NONE }; |
| 223 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 224 | return rockchip_bo_create_with_modifiers(bo, width, height, format, modifiers, |
| 225 | ARRAY_SIZE(modifiers)); |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 226 | } |
| 227 | |
Gurchetan Singh | 1a31e60 | 2016-10-06 10:58:00 -0700 | [diff] [blame] | 228 | static void *rockchip_bo_map(struct bo *bo, struct map_info *data, size_t plane) |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 229 | { |
| 230 | int ret; |
| 231 | struct drm_rockchip_gem_map_off gem_map; |
| 232 | |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 233 | /* We can only map buffers created with SW access flags, which should |
| 234 | * have no modifiers (ie, not AFBC). */ |
| 235 | if (bo->format_modifiers[0] == DRM_FORMAT_MOD_CHROMEOS_ROCKCHIP_AFBC) |
| 236 | return MAP_FAILED; |
| 237 | |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 238 | memset(&gem_map, 0, sizeof(gem_map)); |
| 239 | gem_map.handle = bo->handles[0].u32; |
| 240 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 241 | ret = drmIoctl(bo->drv->fd, DRM_IOCTL_ROCKCHIP_GEM_MAP_OFFSET, &gem_map); |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 242 | if (ret) { |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 243 | fprintf(stderr, "drv: DRM_IOCTL_ROCKCHIP_GEM_MAP_OFFSET failed\n"); |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 244 | return MAP_FAILED; |
| 245 | } |
| 246 | |
Gurchetan Singh | 1a31e60 | 2016-10-06 10:58:00 -0700 | [diff] [blame] | 247 | data->length = bo->total_size; |
| 248 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 249 | return mmap(0, bo->total_size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->drv->fd, |
| 250 | gem_map.offset); |
Gurchetan Singh | ef92053 | 2016-08-12 16:38:25 -0700 | [diff] [blame] | 251 | } |
| 252 | |
Gurchetan Singh | f3b22da | 2016-11-21 10:46:38 -0800 | [diff] [blame] | 253 | static uint32_t rockchip_resolve_format(uint32_t format) |
Gurchetan Singh | bfba8c2 | 2016-08-16 17:57:10 -0700 | [diff] [blame] | 254 | { |
| 255 | switch (format) { |
Gurchetan Singh | f3b22da | 2016-11-21 10:46:38 -0800 | [diff] [blame] | 256 | case DRM_FORMAT_FLEX_IMPLEMENTATION_DEFINED: |
Gurchetan Singh | d6fb577 | 2016-08-29 19:13:51 -0700 | [diff] [blame] | 257 | /*HACK: See b/28671744 */ |
Gurchetan Singh | f3b22da | 2016-11-21 10:46:38 -0800 | [diff] [blame] | 258 | return DRM_FORMAT_XBGR8888; |
| 259 | case DRM_FORMAT_FLEX_YCbCr_420_888: |
| 260 | return DRM_FORMAT_NV12; |
Gurchetan Singh | d6fb577 | 2016-08-29 19:13:51 -0700 | [diff] [blame] | 261 | default: |
| 262 | return format; |
Gurchetan Singh | bfba8c2 | 2016-08-16 17:57:10 -0700 | [diff] [blame] | 263 | } |
| 264 | } |
| 265 | |
Gurchetan Singh | 1b1d56a | 2017-03-10 16:25:23 -0800 | [diff] [blame] | 266 | struct backend backend_rockchip = { |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 267 | .name = "rockchip", |
Gurchetan Singh | 179687e | 2016-10-28 10:07:35 -0700 | [diff] [blame] | 268 | .init = rockchip_init, |
Gurchetan Singh | d7c84fd | 2016-08-16 18:18:24 -0700 | [diff] [blame] | 269 | .bo_create = rockchip_bo_create, |
Kristian H. Kristensen | b1efbd8 | 2016-09-06 11:43:26 -0700 | [diff] [blame] | 270 | .bo_create_with_modifiers = rockchip_bo_create_with_modifiers, |
Gurchetan Singh | 46faf6b | 2016-08-05 14:40:07 -0700 | [diff] [blame] | 271 | .bo_destroy = drv_gem_bo_destroy, |
Gurchetan Singh | 71611d6 | 2017-01-03 16:49:56 -0800 | [diff] [blame] | 272 | .bo_import = drv_prime_bo_import, |
Gurchetan Singh | d7c84fd | 2016-08-16 18:18:24 -0700 | [diff] [blame] | 273 | .bo_map = rockchip_bo_map, |
Gurchetan Singh | bfba8c2 | 2016-08-16 17:57:10 -0700 | [diff] [blame] | 274 | .resolve_format = rockchip_resolve_format, |
Stéphane Marchesin | 25a2606 | 2014-09-12 16:18:59 -0700 | [diff] [blame] | 275 | }; |
| 276 | |
| 277 | #endif |