blob: a4c56d94e9b72c9a9a57fefb9f2fb476b69e36fe [file] [log] [blame]
Rajesh Yadav7f79cb52018-01-22 18:29:06 +05301/*
2 * Copyright 2018 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
7#ifdef DRV_MSM
8
Tanmay Shah067594b2018-11-26 10:05:18 -08009#include <assert.h>
Rob Clarke48e4d72020-08-07 08:08:30 -070010#include <dlfcn.h>
Tanmay Shah067594b2018-11-26 10:05:18 -080011#include <drm_fourcc.h>
Tanmay Shah617ee712018-07-11 16:41:05 -070012#include <errno.h>
Stephen Boyd5ff0cfd2019-04-09 11:03:00 -070013#include <inttypes.h>
Tanmay Shah617ee712018-07-11 16:41:05 -070014#include <msm_drm.h>
Tanmay Shah067594b2018-11-26 10:05:18 -080015#include <stdbool.h>
Tanmay Shah617ee712018-07-11 16:41:05 -070016#include <stdio.h>
17#include <string.h>
18#include <sys/mman.h>
19#include <xf86drm.h>
20
Rajesh Yadav7f79cb52018-01-22 18:29:06 +053021#include "drv_priv.h"
22#include "helpers.h"
23#include "util.h"
24
Tanmay Shah067594b2018-11-26 10:05:18 -080025/* Alignment values are based on SDM845 Gfx IP */
Tanmay Shah617ee712018-07-11 16:41:05 -070026#define DEFAULT_ALIGNMENT 64
Tanmay Shahc65bd8c2018-11-21 09:14:14 -080027#define BUFFER_SIZE_ALIGN 4096
28
29#define VENUS_STRIDE_ALIGN 128
30#define VENUS_SCANLINE_ALIGN 16
31#define NV12_LINEAR_PADDING (12 * 1024)
Tanmay Shah067594b2018-11-26 10:05:18 -080032#define NV12_UBWC_PADDING(y_stride) (MAX(16 * 1024, y_stride * 48))
33#define MACROTILE_WIDTH_ALIGN 64
34#define MACROTILE_HEIGHT_ALIGN 16
35#define PLANE_SIZE_ALIGN 4096
36
37#define MSM_UBWC_TILING 1
Stéphane Marchesin23e006a2018-02-28 16:37:46 -080038
Gurchetan Singhb131c9d2018-08-28 14:17:05 -070039static const uint32_t render_target_formats[] = { DRM_FORMAT_ABGR8888, DRM_FORMAT_ARGB8888,
Gurchetan Singh71bc6652018-09-17 17:42:05 -070040 DRM_FORMAT_RGB565, DRM_FORMAT_XBGR8888,
41 DRM_FORMAT_XRGB8888 };
Rajesh Yadav7f79cb52018-01-22 18:29:06 +053042
Tanmay Shah617ee712018-07-11 16:41:05 -070043static const uint32_t texture_source_formats[] = { DRM_FORMAT_NV12, DRM_FORMAT_R8,
44 DRM_FORMAT_YVU420, DRM_FORMAT_YVU420_ANDROID };
Alexandre Courbot1805a9b2018-05-21 19:05:10 +090045
Tanmay Shah067594b2018-11-26 10:05:18 -080046/*
47 * Each macrotile consists of m x n (mostly 4 x 4) tiles.
48 * Pixel data pitch/stride is aligned with macrotile width.
49 * Pixel data height is aligned with macrotile height.
50 * Entire pixel data buffer is aligned with 4k(bytes).
51 */
52static uint32_t get_ubwc_meta_size(uint32_t width, uint32_t height, uint32_t tile_width,
53 uint32_t tile_height)
54{
55 uint32_t macrotile_width, macrotile_height;
56
57 macrotile_width = DIV_ROUND_UP(width, tile_width);
58 macrotile_height = DIV_ROUND_UP(height, tile_height);
59
60 // Align meta buffer width to 64 blocks
61 macrotile_width = ALIGN(macrotile_width, MACROTILE_WIDTH_ALIGN);
62
63 // Align meta buffer height to 16 blocks
64 macrotile_height = ALIGN(macrotile_height, MACROTILE_HEIGHT_ALIGN);
65
66 return ALIGN(macrotile_width * macrotile_height, PLANE_SIZE_ALIGN);
67}
68
Rob Clark72787582020-12-01 12:13:13 -080069static unsigned get_pitch_alignment(struct bo *bo)
70{
71 switch (bo->meta.format) {
72 case DRM_FORMAT_NV12:
73 return VENUS_STRIDE_ALIGN;
74 case DRM_FORMAT_YVU420:
75 case DRM_FORMAT_YVU420_ANDROID:
76 /* TODO other YUV formats? */
77 /* Something (in the video stack?) assumes the U/V planes can use
78 * half the pitch as the Y plane.. to componsate, double the
79 * alignment:
80 */
81 return 2 * DEFAULT_ALIGNMENT;
82 default:
83 return DEFAULT_ALIGNMENT;
84 }
85}
86
Tanmay Shah067594b2018-11-26 10:05:18 -080087static void msm_calculate_layout(struct bo *bo)
Tanmay Shahc65bd8c2018-11-21 09:14:14 -080088{
89 uint32_t width, height;
90
Gurchetan Singh298b7572019-09-19 09:55:18 -070091 width = bo->meta.width;
92 height = bo->meta.height;
Tanmay Shahc65bd8c2018-11-21 09:14:14 -080093
94 /* NV12 format requires extra padding with platform
95 * specific alignments for venus driver
96 */
Gurchetan Singh298b7572019-09-19 09:55:18 -070097 if (bo->meta.format == DRM_FORMAT_NV12) {
Tanmay Shah067594b2018-11-26 10:05:18 -080098 uint32_t y_stride, uv_stride, y_scanline, uv_scanline, y_plane, uv_plane, size,
99 extra_padding;
100
Tanmay Shahc65bd8c2018-11-21 09:14:14 -0800101 y_stride = ALIGN(width, VENUS_STRIDE_ALIGN);
102 uv_stride = ALIGN(width, VENUS_STRIDE_ALIGN);
103 y_scanline = ALIGN(height, VENUS_SCANLINE_ALIGN * 2);
Fritz Koenigb03e9c82020-09-09 15:22:46 -0700104 uv_scanline = ALIGN(DIV_ROUND_UP(height, 2),
Gurchetan Singh99644382020-10-07 15:28:11 -0700105 VENUS_SCANLINE_ALIGN * (bo->meta.tiling ? 2 : 1));
Tanmay Shahc65bd8c2018-11-21 09:14:14 -0800106 y_plane = y_stride * y_scanline;
107 uv_plane = uv_stride * uv_scanline;
108
Gurchetan Singh298b7572019-09-19 09:55:18 -0700109 if (bo->meta.tiling == MSM_UBWC_TILING) {
Fritz Koenigb03e9c82020-09-09 15:22:46 -0700110 y_plane = ALIGN(y_plane, PLANE_SIZE_ALIGN);
111 uv_plane = ALIGN(uv_plane, PLANE_SIZE_ALIGN);
Tanmay Shah067594b2018-11-26 10:05:18 -0800112 y_plane += get_ubwc_meta_size(width, height, 32, 8);
113 uv_plane += get_ubwc_meta_size(width >> 1, height >> 1, 16, 8);
114 extra_padding = NV12_UBWC_PADDING(y_stride);
115 } else {
116 extra_padding = NV12_LINEAR_PADDING;
117 }
118
Gurchetan Singh298b7572019-09-19 09:55:18 -0700119 bo->meta.strides[0] = y_stride;
120 bo->meta.sizes[0] = y_plane;
121 bo->meta.offsets[1] = y_plane;
122 bo->meta.strides[1] = uv_stride;
Tanmay Shah067594b2018-11-26 10:05:18 -0800123 size = y_plane + uv_plane + extra_padding;
Gurchetan Singh298b7572019-09-19 09:55:18 -0700124 bo->meta.total_size = ALIGN(size, BUFFER_SIZE_ALIGN);
125 bo->meta.sizes[1] = bo->meta.total_size - bo->meta.sizes[0];
Tanmay Shahc65bd8c2018-11-21 09:14:14 -0800126 } else {
127 uint32_t stride, alignw, alignh;
128
Rob Clark72787582020-12-01 12:13:13 -0800129 alignw = ALIGN(width, get_pitch_alignment(bo));
Jeffrey Kardatzkea6a9efc2020-02-21 15:35:01 -0800130 /* HAL_PIXEL_FORMAT_YV12 requires that the buffer's height not be aligned.
131 DRM_FORMAT_R8 of height one is used for JPEG camera output, so don't
132 height align that. */
133 if (bo->meta.format == DRM_FORMAT_YVU420_ANDROID ||
Gurchetan Singh8d884742020-03-24 13:48:54 -0700134 (bo->meta.format == DRM_FORMAT_R8 && height == 1)) {
Tanmay Shahc65bd8c2018-11-21 09:14:14 -0800135 alignh = height;
136 } else {
137 alignh = ALIGN(height, DEFAULT_ALIGNMENT);
138 }
139
Gurchetan Singh298b7572019-09-19 09:55:18 -0700140 stride = drv_stride_from_format(bo->meta.format, alignw, 0);
Tanmay Shahc65bd8c2018-11-21 09:14:14 -0800141
142 /* Calculate size and assign stride, size, offset to each plane based on format */
Gurchetan Singh298b7572019-09-19 09:55:18 -0700143 drv_bo_from_format(bo, stride, alignh, bo->meta.format);
Tanmay Shah067594b2018-11-26 10:05:18 -0800144
145 /* For all RGB UBWC formats */
Gurchetan Singh298b7572019-09-19 09:55:18 -0700146 if (bo->meta.tiling == MSM_UBWC_TILING) {
147 bo->meta.sizes[0] += get_ubwc_meta_size(width, height, 16, 4);
148 bo->meta.total_size = bo->meta.sizes[0];
149 assert(IS_ALIGNED(bo->meta.total_size, BUFFER_SIZE_ALIGN));
Tanmay Shah067594b2018-11-26 10:05:18 -0800150 }
151 }
152}
153
154static bool is_ubwc_fmt(uint32_t format)
155{
156 switch (format) {
157 case DRM_FORMAT_XBGR8888:
158 case DRM_FORMAT_ABGR8888:
Fritz Koenige5c3fdf2019-12-10 16:30:34 -0800159 case DRM_FORMAT_XRGB8888:
160 case DRM_FORMAT_ARGB8888:
Tanmay Shah067594b2018-11-26 10:05:18 -0800161 case DRM_FORMAT_NV12:
162 return 1;
163 default:
164 return 0;
165 }
166}
167
168static void msm_add_ubwc_combinations(struct driver *drv, const uint32_t *formats,
169 uint32_t num_formats, struct format_metadata *metadata,
170 uint64_t use_flags)
171{
172 for (uint32_t i = 0; i < num_formats; i++) {
173 if (is_ubwc_fmt(formats[i])) {
174 struct combination combo = { .format = formats[i],
175 .metadata = *metadata,
176 .use_flags = use_flags };
177 drv_array_append(drv->combos, &combo);
178 }
Tanmay Shahc65bd8c2018-11-21 09:14:14 -0800179 }
180}
181
Rob Clarke48e4d72020-08-07 08:08:30 -0700182/**
183 * Check for buggy apps that are known to not support modifiers, to avoid surprising them
184 * with a UBWC buffer.
185 */
186static bool should_avoid_ubwc(void)
187{
188#ifndef __ANDROID__
189 /* waffle is buggy and, requests a renderable buffer (which on qcom platforms, we
190 * want to use UBWC), and then passes it to the kernel discarding the modifier.
191 * So mesa ends up correctly rendering to as tiled+compressed, but kernel tries
192 * to display as linear. Other platforms do not see this issue, simply because
193 * they only use compressed (ex, AFBC) with the BO_USE_SCANOUT flag.
194 *
195 * See b/163137550
196 */
197 if (dlsym(RTLD_DEFAULT, "waffle_display_connect")) {
198 drv_log("WARNING: waffle detected, disabling UBWC\n");
199 return true;
200 }
Fritz Koenig1d3637f2020-11-06 09:39:34 -0800201
202 /* The video_decode_accelerator_tests needs to read back the frames
203 * to verify they are correct. The frame verification relies on
204 * computing the MD5 of the video frame. UBWC results in a different
205 * MD5. This turns off UBWC for gtest until a proper frame
206 * comparison can be made
207 * Rely on the same mechanism that waffle is using, but this time check
208 * for a dynamic library function that is present in chrome, but missing
209 * in gtest. Cups is not loaded for video tests.
210 *
211 * See b/171260705
212 */
213 if (!dlsym(RTLD_DEFAULT, "cupsFilePrintf")) {
214 drv_log("WARNING: gtest detected, disabling UBWC\n");
215 return true;
216 }
Rob Clarke48e4d72020-08-07 08:08:30 -0700217#endif
218 return false;
219}
220
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530221static int msm_init(struct driver *drv)
222{
Tanmay Shah067594b2018-11-26 10:05:18 -0800223 struct format_metadata metadata;
Jeffrey Kardatzkeafb2c562020-03-02 12:25:55 -0800224 uint64_t render_use_flags = BO_USE_RENDER_MASK | BO_USE_SCANOUT;
Tanmay Shah067594b2018-11-26 10:05:18 -0800225 uint64_t texture_use_flags = BO_USE_TEXTURE_MASK | BO_USE_HW_VIDEO_DECODER;
Rob Clark6f83a442020-10-05 12:10:51 -0700226 /*
227 * NOTE: we actually could use tiled in the BO_USE_FRONT_RENDERING case,
228 * if we had a modifier for tiled-but-not-compressed. But we *cannot* use
229 * compressed in this case because the UBWC flags/meta data can be out of
230 * sync with pixel data while the GPU is writing a frame out to memory.
231 */
Gurchetan Singh146ee022021-04-02 16:34:05 -0700232 uint64_t sw_flags =
233 (BO_USE_RENDERSCRIPT | BO_USE_SW_MASK | BO_USE_LINEAR | BO_USE_FRONT_RENDERING);
Tanmay Shah067594b2018-11-26 10:05:18 -0800234
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530235 drv_add_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
Tanmay Shah067594b2018-11-26 10:05:18 -0800236 &LINEAR_METADATA, render_use_flags);
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530237
Tanmay Shah617ee712018-07-11 16:41:05 -0700238 drv_add_combinations(drv, texture_source_formats, ARRAY_SIZE(texture_source_formats),
Tanmay Shah067594b2018-11-26 10:05:18 -0800239 &LINEAR_METADATA, texture_use_flags);
Alexandre Courbot1805a9b2018-05-21 19:05:10 +0900240
Ricky Liangf11f1df2020-02-13 10:42:46 +0800241 /* The camera stack standardizes on NV12 for YUV buffers. */
Hirokazu Honda3bd681c2020-06-23 17:52:20 +0900242 /* YVU420 and NV12 formats for camera, display and encoding. */
Ricky Liangf11f1df2020-02-13 10:42:46 +0800243 drv_modify_combination(drv, DRM_FORMAT_NV12, &LINEAR_METADATA,
Hirokazu Honda3bd681c2020-06-23 17:52:20 +0900244 BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE | BO_USE_SCANOUT |
245 BO_USE_HW_VIDEO_ENCODER);
246
Ricky Liangf11f1df2020-02-13 10:42:46 +0800247 /*
248 * R8 format is used for Android's HAL_PIXEL_FORMAT_BLOB and is used for JPEG snapshots
David Stevens49518142020-06-15 13:48:48 +0900249 * from camera and input/output from hardware decoder/encoder.
Ricky Liangf11f1df2020-02-13 10:42:46 +0800250 */
Douglas Anderson0c03c9b2020-07-21 08:06:46 -0700251 drv_modify_combination(drv, DRM_FORMAT_R8, &LINEAR_METADATA,
David Stevens49518142020-06-15 13:48:48 +0900252 BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE | BO_USE_HW_VIDEO_DECODER |
253 BO_USE_HW_VIDEO_ENCODER);
Ricky Liangf11f1df2020-02-13 10:42:46 +0800254
John Stultzd9381b62021-07-28 06:23:03 +0000255 /*
256 * Android also frequently requests YV12 formats for some camera implementations
257 * (including the external provider implmenetation). So mark it as well as valid
258 * for camera display and encoding.
259 */
260 drv_modify_combination(drv, DRM_FORMAT_YVU420_ANDROID, &LINEAR_METADATA,
261 BO_USE_CAMERA_READ | BO_USE_CAMERA_WRITE | BO_USE_SCANOUT |
262 BO_USE_HW_VIDEO_ENCODER);
263
Gurchetan Singh71bc6652018-09-17 17:42:05 -0700264 /* Android CTS tests require this. */
265 drv_add_combination(drv, DRM_FORMAT_BGR888, &LINEAR_METADATA, BO_USE_SW_MASK);
266
Tanmay Shah067594b2018-11-26 10:05:18 -0800267 drv_modify_linear_combinations(drv);
268
Pilar Molina Lopez28cf2f12020-11-12 18:19:42 -0500269 if (should_avoid_ubwc() || !drv->compression)
Rob Clarke48e4d72020-08-07 08:08:30 -0700270 return 0;
271
Tanmay Shah067594b2018-11-26 10:05:18 -0800272 metadata.tiling = MSM_UBWC_TILING;
273 metadata.priority = 2;
274 metadata.modifier = DRM_FORMAT_MOD_QCOM_COMPRESSED;
275
276 render_use_flags &= ~sw_flags;
277 texture_use_flags &= ~sw_flags;
278
Kristian H. Kristensen8f782d82020-08-26 00:26:24 +0000279 msm_add_ubwc_combinations(drv, render_target_formats, ARRAY_SIZE(render_target_formats),
280 &metadata, render_use_flags);
Tanmay Shah067594b2018-11-26 10:05:18 -0800281
Kristian H. Kristensen8f782d82020-08-26 00:26:24 +0000282 msm_add_ubwc_combinations(drv, texture_source_formats, ARRAY_SIZE(texture_source_formats),
283 &metadata, texture_use_flags);
Tanmay Shah067594b2018-11-26 10:05:18 -0800284
Fritz Koenigb8226cb2020-08-07 14:56:18 -0700285 drv_modify_combination(drv, DRM_FORMAT_NV12, &metadata,
Gurchetan Singh45ca4492021-04-28 17:12:52 -0700286 BO_USE_SCANOUT | BO_USE_HW_VIDEO_ENCODER);
Fritz Koenigb8226cb2020-08-07 14:56:18 -0700287
Tanmay Shah067594b2018-11-26 10:05:18 -0800288 return 0;
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530289}
290
Tanmay Shah067594b2018-11-26 10:05:18 -0800291static int msm_bo_create_for_modifier(struct bo *bo, uint32_t width, uint32_t height,
292 uint32_t format, const uint64_t modifier)
Stéphane Marchesin23e006a2018-02-28 16:37:46 -0800293{
Gurchetan Singh99644382020-10-07 15:28:11 -0700294 struct drm_msm_gem_new req = { 0 };
Tanmay Shah617ee712018-07-11 16:41:05 -0700295 int ret;
296 size_t i;
297
Gurchetan Singh298b7572019-09-19 09:55:18 -0700298 bo->meta.tiling = (modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED) ? MSM_UBWC_TILING : 0;
Tanmay Shah067594b2018-11-26 10:05:18 -0800299 msm_calculate_layout(bo);
Tanmay Shah617ee712018-07-11 16:41:05 -0700300
Tanmay Shah617ee712018-07-11 16:41:05 -0700301 req.flags = MSM_BO_WC | MSM_BO_SCANOUT;
Gurchetan Singh298b7572019-09-19 09:55:18 -0700302 req.size = bo->meta.total_size;
Tanmay Shah617ee712018-07-11 16:41:05 -0700303
304 ret = drmIoctl(bo->drv->fd, DRM_IOCTL_MSM_GEM_NEW, &req);
305 if (ret) {
306 drv_log("DRM_IOCTL_MSM_GEM_NEW failed with %s\n", strerror(errno));
Stéphane Marchesin6ac299f2019-03-21 12:23:29 -0700307 return -errno;
Tanmay Shah617ee712018-07-11 16:41:05 -0700308 }
309
310 /*
311 * Though we use only one plane, we need to set handle for
312 * all planes to pass kernel checks
313 */
Gurchetan Singh52155b42021-01-27 17:55:17 -0800314 for (i = 0; i < bo->meta.num_planes; i++)
Tanmay Shah617ee712018-07-11 16:41:05 -0700315 bo->handles[i].u32 = req.handle;
Tanmay Shah617ee712018-07-11 16:41:05 -0700316
Gurchetan Singh52155b42021-01-27 17:55:17 -0800317 bo->meta.format_modifier = modifier;
Tanmay Shah617ee712018-07-11 16:41:05 -0700318 return 0;
319}
320
Tanmay Shah067594b2018-11-26 10:05:18 -0800321static int msm_bo_create_with_modifiers(struct bo *bo, uint32_t width, uint32_t height,
322 uint32_t format, const uint64_t *modifiers, uint32_t count)
323{
324 static const uint64_t modifier_order[] = {
325 DRM_FORMAT_MOD_QCOM_COMPRESSED,
326 DRM_FORMAT_MOD_LINEAR,
327 };
328
329 uint64_t modifier =
330 drv_pick_modifier(modifiers, count, modifier_order, ARRAY_SIZE(modifier_order));
331
Pilar Molina Lopez28cf2f12020-11-12 18:19:42 -0500332 if (!bo->drv->compression && modifier == DRM_FORMAT_MOD_QCOM_COMPRESSED)
333 modifier = DRM_FORMAT_MOD_LINEAR;
334
Tanmay Shah067594b2018-11-26 10:05:18 -0800335 return msm_bo_create_for_modifier(bo, width, height, format, modifier);
336}
337
338/* msm_bo_create will create linear buffers for now */
339static int msm_bo_create(struct bo *bo, uint32_t width, uint32_t height, uint32_t format,
340 uint64_t flags)
341{
342 struct combination *combo = drv_get_combination(bo->drv, format, flags);
343
344 if (!combo) {
Stephen Boyd5ff0cfd2019-04-09 11:03:00 -0700345 drv_log("invalid format = %d, flags = %" PRIx64 " combination\n", format, flags);
Tanmay Shah067594b2018-11-26 10:05:18 -0800346 return -EINVAL;
347 }
348
349 return msm_bo_create_for_modifier(bo, width, height, format, combo->metadata.modifier);
350}
351
Tanmay Shah617ee712018-07-11 16:41:05 -0700352static void *msm_bo_map(struct bo *bo, struct vma *vma, size_t plane, uint32_t map_flags)
353{
354 int ret;
Gurchetan Singh99644382020-10-07 15:28:11 -0700355 struct drm_msm_gem_info req = { 0 };
Tanmay Shah617ee712018-07-11 16:41:05 -0700356
Tanmay Shah617ee712018-07-11 16:41:05 -0700357 req.handle = bo->handles[0].u32;
Tanmay Shah617ee712018-07-11 16:41:05 -0700358 ret = drmIoctl(bo->drv->fd, DRM_IOCTL_MSM_GEM_INFO, &req);
359 if (ret) {
360 drv_log("DRM_IOCLT_MSM_GEM_INFO failed with %s\n", strerror(errno));
361 return MAP_FAILED;
362 }
Gurchetan Singh298b7572019-09-19 09:55:18 -0700363 vma->length = bo->meta.total_size;
Tanmay Shah617ee712018-07-11 16:41:05 -0700364
Gurchetan Singh298b7572019-09-19 09:55:18 -0700365 return mmap(0, bo->meta.total_size, drv_get_prot(map_flags), MAP_SHARED, bo->drv->fd,
Tanmay Shah617ee712018-07-11 16:41:05 -0700366 req.offset);
Stéphane Marchesin23e006a2018-02-28 16:37:46 -0800367}
368
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530369const struct backend backend_msm = {
370 .name = "msm",
371 .init = msm_init,
Stéphane Marchesin23e006a2018-02-28 16:37:46 -0800372 .bo_create = msm_bo_create,
Tanmay Shah067594b2018-11-26 10:05:18 -0800373 .bo_create_with_modifiers = msm_bo_create_with_modifiers,
Tanmay Shah617ee712018-07-11 16:41:05 -0700374 .bo_destroy = drv_gem_bo_destroy,
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530375 .bo_import = drv_prime_bo_import,
Tanmay Shah617ee712018-07-11 16:41:05 -0700376 .bo_map = msm_bo_map,
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530377 .bo_unmap = drv_bo_munmap,
Gurchetan Singh695125c2021-02-03 08:44:09 -0800378 .resolve_format = drv_resolve_format_helper,
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530379};
Rajesh Yadav7f79cb52018-01-22 18:29:06 +0530380#endif /* DRV_MSM */