diff options
Diffstat (limited to 'recipes-multimedia/mediasdk/files/0001-Fixed-tile-modifier-issue-for-NV12-format.patch')
-rw-r--r-- | recipes-multimedia/mediasdk/files/0001-Fixed-tile-modifier-issue-for-NV12-format.patch | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/recipes-multimedia/mediasdk/files/0001-Fixed-tile-modifier-issue-for-NV12-format.patch b/recipes-multimedia/mediasdk/files/0001-Fixed-tile-modifier-issue-for-NV12-format.patch deleted file mode 100644 index c249c176..00000000 --- a/recipes-multimedia/mediasdk/files/0001-Fixed-tile-modifier-issue-for-NV12-format.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 3fc9fe078c850643f8070cce1d2b0307a9014523 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Sodhi, Vunny" <vunny.sodhi@intel.com> | ||
3 | Date: Fri, 13 Aug 2021 12:09:26 +0800 | ||
4 | Subject: [meta-intel][PATCH] Fixed tile modifier issue for NV12 format | ||
5 | |||
6 | If we are using I915_FORMAT_MOD_Y_TILED which is needed for | ||
7 | NV12 format then modifiers need to be enabled which can be passed | ||
8 | as flags argument to ioctl. | ||
9 | |||
10 | Upstream-Status: Submitted | ||
11 | https://github.com/Intel-Media-SDK/MediaSDK/pull/2755 | ||
12 | |||
13 | Signed-off-by: Sodhi, Vunny <vunny.sodhi@intel.com> | ||
14 | --- | ||
15 | samples/sample_common/src/vaapi_utils_drm.cpp | 5 +++-- | ||
16 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
17 | |||
18 | diff --git a/samples/sample_common/src/vaapi_utils_drm.cpp b/samples/sample_common/src/vaapi_utils_drm.cpp | ||
19 | index 5ad73dd..73c8bd2 100644 | ||
20 | --- a/samples/sample_common/src/vaapi_utils_drm.cpp | ||
21 | +++ b/samples/sample_common/src/vaapi_utils_drm.cpp | ||
22 | @@ -422,7 +422,7 @@ void* drmRenderer::acquire(mfxMemId mid) | ||
23 | int ret = m_drmlib.drmIoctl(m_fd, DRM_IOCTL_GEM_OPEN, &flink_open); | ||
24 | if (ret) return NULL; | ||
25 | |||
26 | - uint32_t handles[4], pitches[4], offsets[4], pixel_format; | ||
27 | + uint32_t handles[4], pitches[4], offsets[4], pixel_format, flags = 0; | ||
28 | uint64_t modifiers[4]; | ||
29 | |||
30 | memset(&handles, 0, sizeof(handles)); | ||
31 | @@ -452,13 +452,14 @@ void* drmRenderer::acquire(mfxMemId mid) | ||
32 | pitches[1] = vmid->m_image.pitches[1]; | ||
33 | offsets[1] = vmid->m_image.offsets[1]; | ||
34 | modifiers[0] = modifiers[1] = I915_FORMAT_MOD_Y_TILED; | ||
35 | + flags = 2; // DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] | ||
36 | } | ||
37 | else { | ||
38 | pixel_format = DRM_FORMAT_XRGB8888; | ||
39 | } | ||
40 | |||
41 | ret = m_drmlib.drmModeAddFB2WithModifiers(m_fd, vmid->m_image.width, vmid->m_image.height, | ||
42 | - pixel_format, handles, pitches, offsets, modifiers, &fbhandle, 0); | ||
43 | + pixel_format, handles, pitches, offsets, modifiers, &fbhandle, flags); | ||
44 | if (ret) return NULL; | ||
45 | |||
46 | MSDK_ZERO_MEMORY(flink_close); | ||
47 | -- | ||
48 | 2.7.4 | ||
49 | |||