Lines Matching refs:dmabuf
230 drm_fb_get_from_dmabuf(struct linux_dmabuf_buffer *dmabuf, in drm_fb_get_from_dmabuf() argument
235 .width = dmabuf->attributes.width, in drm_fb_get_from_dmabuf()
236 .height = dmabuf->attributes.height, in drm_fb_get_from_dmabuf()
237 .format = dmabuf->attributes.format, in drm_fb_get_from_dmabuf()
238 .stride = dmabuf->attributes.stride[0], in drm_fb_get_from_dmabuf()
239 .fd = dmabuf->attributes.fd[0], in drm_fb_get_from_dmabuf()
243 .width = dmabuf->attributes.width, in drm_fb_get_from_dmabuf()
244 .height = dmabuf->attributes.height, in drm_fb_get_from_dmabuf()
245 .format = dmabuf->attributes.format, in drm_fb_get_from_dmabuf()
246 .num_fds = dmabuf->attributes.n_planes, in drm_fb_get_from_dmabuf()
247 .modifier = dmabuf->attributes.modifier[0], in drm_fb_get_from_dmabuf()
262 if (dmabuf->attributes.flags) in drm_fb_get_from_dmabuf()
274 ARRAY_LENGTH(dmabuf->attributes.fd), in drm_fb_get_from_dmabuf()
276 static_assert(sizeof(import_mod.fds) == sizeof(dmabuf->attributes.fd), in drm_fb_get_from_dmabuf()
278 memcpy(import_mod.fds, dmabuf->attributes.fd, sizeof(import_mod.fds)); in drm_fb_get_from_dmabuf()
281 ARRAY_LENGTH(dmabuf->attributes.stride), in drm_fb_get_from_dmabuf()
284 sizeof(dmabuf->attributes.stride), in drm_fb_get_from_dmabuf()
286 memcpy(import_mod.strides, dmabuf->attributes.stride, in drm_fb_get_from_dmabuf()
290 ARRAY_LENGTH(dmabuf->attributes.offset), in drm_fb_get_from_dmabuf()
293 sizeof(dmabuf->attributes.offset), in drm_fb_get_from_dmabuf()
295 memcpy(import_mod.offsets, dmabuf->attributes.offset, in drm_fb_get_from_dmabuf()
301 if (dmabuf->attributes.modifier[0] != DRM_FORMAT_MOD_INVALID || in drm_fb_get_from_dmabuf()
302 dmabuf->attributes.n_planes > 1 || in drm_fb_get_from_dmabuf()
303 dmabuf->attributes.offset[0] > 0) { in drm_fb_get_from_dmabuf()
321 fb->width = dmabuf->attributes.width; in drm_fb_get_from_dmabuf()
322 fb->height = dmabuf->attributes.height; in drm_fb_get_from_dmabuf()
323 fb->modifier = dmabuf->attributes.modifier[0]; in drm_fb_get_from_dmabuf()
328 ARRAY_LENGTH(dmabuf->attributes.stride), in drm_fb_get_from_dmabuf()
330 static_assert(sizeof(fb->strides) == sizeof(dmabuf->attributes.stride), in drm_fb_get_from_dmabuf()
332 memcpy(fb->strides, dmabuf->attributes.stride, sizeof(fb->strides)); in drm_fb_get_from_dmabuf()
334 ARRAY_LENGTH(dmabuf->attributes.offset), in drm_fb_get_from_dmabuf()
336 static_assert(sizeof(fb->offsets) == sizeof(dmabuf->attributes.offset), in drm_fb_get_from_dmabuf()
338 memcpy(fb->offsets, dmabuf->attributes.offset, sizeof(fb->offsets)); in drm_fb_get_from_dmabuf()
340 fb->format = pixel_format_get_info(dmabuf->attributes.format); in drm_fb_get_from_dmabuf()
343 (unsigned long) dmabuf->attributes.format); in drm_fb_get_from_dmabuf()
359 fb->num_planes = dmabuf->attributes.n_planes; in drm_fb_get_from_dmabuf()
360 for (i = 0; i < dmabuf->attributes.n_planes; i++) { in drm_fb_get_from_dmabuf()
518 struct linux_dmabuf_buffer *dmabuf) in drm_can_scanout_dmabuf() argument
524 fb = drm_fb_get_from_dmabuf(dmabuf, b, true); in drm_can_scanout_dmabuf()
529 drm_debug(b, "[dmabuf] dmabuf %p, import test %s\n", dmabuf, in drm_can_scanout_dmabuf()
541 struct linux_dmabuf_buffer *dmabuf; in drm_fb_get_from_view() local
564 dmabuf = linux_dmabuf_buffer_get(buffer->resource); in drm_fb_get_from_view()
565 if (dmabuf) { in drm_fb_get_from_view()
566 fb = drm_fb_get_from_dmabuf(dmabuf, b, is_opaque); in drm_fb_get_from_view()