mirror of
git://git.yoctoproject.org/meta-raspberrypi.git
synced 2025-07-19 12:49:00 +02:00

Fixes ERROR: mesa-2_20.0.1-r0 do_patch: Fuzz detected: Applying patch 0001-dri2-query-dma-buf-modifiers.patch patching file src/gallium/state_trackers/dri/dri2.c Hunk #1 succeeded at 1366 with fuzz 1 (offset -2 lines). Signed-off-by: Khem Raj <raj.khem@gmail.com>
44 lines
1.7 KiB
Diff
44 lines
1.7 KiB
Diff
mesa: querying dma_buf_modifiers for specific formats
|
|
|
|
mesa wl_drm protocol is the backend for wayland server side which requires
|
|
the dmabuf modifiers for some DRM formats on specific devices like RPI.
|
|
Currently there is no support of giving any dmabuf modifiers on wl_drm protocol.
|
|
This dma_buf modifiers allows EGL implementations to add extra attributes
|
|
to drm_fourcc format.
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Balaji Velmurugan <balaji.velmurugan@ltts.com>
|
|
|
|
--- a/src/gallium/state_trackers/dri/dri2.c
|
|
+++ b/src/gallium/state_trackers/dri/dri2.c
|
|
@@ -1366,14 +1366,28 @@ dri2_from_planar(__DRIimage *image, int
|
|
return img;
|
|
}
|
|
|
|
+static boolean
|
|
+dri2_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max,
|
|
+ uint64_t *modifiers, unsigned int *external_only,
|
|
+ int *count);
|
|
static __DRIimage *
|
|
dri2_from_fds(__DRIscreen *screen, int width, int height, int fourcc,
|
|
int *fds, int num_fds, int *strides, int *offsets,
|
|
void *loaderPrivate)
|
|
{
|
|
+ uint64_t modifier= DRM_FORMAT_MOD_INVALID;
|
|
+ unsigned int external_only= 0;
|
|
+ int count= 0;
|
|
+ boolean result;
|
|
+ result= dri2_query_dma_buf_modifiers( screen, fourcc, 1, &modifier, &external_only, &count);
|
|
+ return dri2_create_image_from_fd(screen, width, height, fourcc,
|
|
+ modifier, fds, num_fds,
|
|
+ strides, offsets, NULL, loaderPrivate);
|
|
+ #if 0
|
|
return dri2_create_image_from_fd(screen, width, height, fourcc,
|
|
DRM_FORMAT_MOD_INVALID, fds, num_fds,
|
|
strides, offsets, NULL, loaderPrivate);
|
|
+ #endif
|
|
}
|
|
|
|
static boolean
|