summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-03-31 11:04:17 +0200
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-04-28 11:39:24 +0200
commit9365073d50064c90e4ea6def051e49bb7576175b (patch)
tree3b0865b8624dfe965f11ac1761f98d6eb4061919 /sys
parentb4535093f6980e2f4f1909866528d6ff4b111c5b (diff)
downloadgstreamer-plugins-bad-9365073d50064c90e4ea6def051e49bb7576175b.tar.gz
va: postproc: Set usage hint generic if DMABuf.
iHD driver sets a tiled DRM modifier if surface's usage hint is set to VPP_WRITE. This result in a garbled rendering when using glimagesink. This patch changes the usage hint to generic if the caps feature is DMABuf. Either way only iHD driver, so far, uses the usage hint flag. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2127>
Diffstat (limited to 'sys')
-rw-r--r--sys/va/gstvavpp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/va/gstvavpp.c b/sys/va/gstvavpp.c
index 6ba0b5c25..9944ef0fa 100644
--- a/sys/va/gstvavpp.c
+++ b/sys/va/gstvavpp.c
@@ -691,6 +691,9 @@ gst_va_vpp_decide_allocation (GstBaseTransform * trans, GstQuery * query)
}
if (!allocator) {
+ /* XXX(victor): VPP_WRITE uses a tiled drm modifier by iHD */
+ if (gst_caps_is_dmabuf (outcaps) && GST_VIDEO_INFO_IS_RGB (&vinfo))
+ usage_hint = VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC;
if (!(allocator = _create_allocator (self, outcaps, usage_hint)))
return FALSE;
}