[igt-dev] [PATCH v2 7/7] lib/igt_fb: Speed up format conversion for local memory
Imre Deak
imre.deak at intel.com
Thu Jan 30 18:31:01 UTC 2020
To speed up the conversion that needs to read from a dGFX local memory
use the same trick as what's used for GTT apertures and make a copy
first into system memory.
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
lib/igt_fb.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 2be03380..af3291a2 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -3430,6 +3430,10 @@ static void create_cairo_surface__convert(int fd, struct igt_fb *fb)
if (use_enginecopy(fb) || use_blitter(fb) ||
igt_vc4_is_tiled(fb->modifier)) {
setup_linear_mapping(&blit->base);
+
+ /* speed things up by working from a copy in system memory */
+ cvt.src.slow_reads =
+ is_i915_device(fd) && !gem_has_mappable_ggtt(fd);
} else {
blit->base.linear.fb = *fb;
blit->base.linear.fb.gem_handle = 0;
--
2.23.1
More information about the igt-dev
mailing list