From 8944d5326ecd38547ae2170c11321fd01ae622a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Mon, 11 Dec 2023 15:26:11 +0100 Subject: [PATCH] vaallocator: only i965 can switch derived/non-derived at mapping Since newer drivers change the strides and offset, and they have to be defined at allocation time because those parameters are stored in the GstVideoMeta in the buffer pool. Thinks patch is based on commit 6b1fba14 and commit 809a984b Part-of: --- .../gst-libs/gst/va/gstvaallocator.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c index e418e6be07..b9a38684c6 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c @@ -1372,13 +1372,6 @@ _va_map_unlocked (GstVaMemory * mem, GstMapFlags flags) use_derived = FALSE; } else { switch (gst_va_display_get_implementation (display)) { - case GST_VA_IMPLEMENTATION_INTEL_IHD: - /* On Gen7+ Intel graphics the memory is mappable but not - * cached, so normal memcpy() access is very slow to read, but - * it's ok for writing. So let's assume that users won't prefer - * direct-mapped memory if they request read access. */ - use_derived = va_allocator->use_derived && !(flags & GST_MAP_READ); - break; case GST_VA_IMPLEMENTATION_INTEL_I965: /* YUV derived images are tiled, so writing them is also * problematic */ @@ -1386,12 +1379,6 @@ _va_map_unlocked (GstVaMemory * mem, GstMapFlags flags) || ((flags & GST_MAP_WRITE) && GST_VIDEO_INFO_IS_YUV (&va_allocator->info))); break; - case GST_VA_IMPLEMENTATION_MESA_GALLIUM: - /* Reading RGB derived images, with non-standard resolutions, - * looks like tiled too. TODO(victor): fill a bug in Mesa. */ - use_derived = va_allocator->use_derived && !((flags & GST_MAP_READ) - && GST_VIDEO_INFO_IS_RGB (&va_allocator->info)); - break; default: use_derived = va_allocator->use_derived; break;