If we are using I915_FORMAT_MOD_Y_TILED which is needed for NV12 format then modifiers need to be enabled which can be passed as flags argument to ioctl.
Upstream-Status: Submitted https://github.com/Intel-Media-SDK/MediaSDK/pull/2755 Signed-off-by: Sodhi, Vunny <[email protected]> --- samples/sample_common/src/vaapi_utils_drm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/samples/sample_common/src/vaapi_utils_drm.cpp b/samples/sample_common/src/vaapi_utils_drm.cpp index 5ad73dd..73c8bd2 100644 --- a/samples/sample_common/src/vaapi_utils_drm.cpp +++ b/samples/sample_common/src/vaapi_utils_drm.cpp @@ -422,7 +422,7 @@ void* drmRenderer::acquire(mfxMemId mid) int ret = m_drmlib.drmIoctl(m_fd, DRM_IOCTL_GEM_OPEN, &flink_open); if (ret) return NULL; - uint32_t handles[4], pitches[4], offsets[4], pixel_format; + uint32_t handles[4], pitches[4], offsets[4], pixel_format, flags = 0; uint64_t modifiers[4]; memset(&handles, 0, sizeof(handles)); @@ -452,13 +452,14 @@ void* drmRenderer::acquire(mfxMemId mid) pitches[1] = vmid->m_image.pitches[1]; offsets[1] = vmid->m_image.offsets[1]; modifiers[0] = modifiers[1] = I915_FORMAT_MOD_Y_TILED; + flags = 2; // DRM_MODE_FB_MODIFIERS (1<<1) /* enables ->modifer[] } else { pixel_format = DRM_FORMAT_XRGB8888; } ret = m_drmlib.drmModeAddFB2WithModifiers(m_fd, vmid->m_image.width, vmid->m_image.height, - pixel_format, handles, pitches, offsets, modifiers, &fbhandle, 0); + pixel_format, handles, pitches, offsets, modifiers, &fbhandle, flags); if (ret) return NULL; MSDK_ZERO_MEMORY(flink_close); -- 2.7.4
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#7190): https://lists.yoctoproject.org/g/meta-intel/message/7190 Mute This Topic: https://lists.yoctoproject.org/mt/84859331/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
