summaryrefslogtreecommitdiff
path: root/lib/igt_draw.c
diff options
context:
space:
mode:
authorBhanuprakash Modem <bhanuprakash.modem@intel.com>2023-11-15 19:09:23 +0530
committerBhanuprakash Modem <bhanuprakash.modem@intel.com>2023-11-20 10:23:37 +0530
commit291244fab21a096893a3d5b1dabcf84ec434207c (patch)
tree9257e6807c37f7e0674b20f439b908e7cbc85b7d /lib/igt_draw.c
parent26dfb2e4793713a58df06dc33a52749b602b2cd6 (diff)
lib/igt_draw: Check for Rendercopy support
igt_draw_supports_method() is initially designed to identify that the given driver (i915/xe) supports the selected draw method. Even though Rendercopy support in IGT is not present for few latest platforms, this api assumes that Rendercopy is present. Add a check if Rendercopy supports on given platform or not. Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Diffstat (limited to 'lib/igt_draw.c')
-rw-r--r--lib/igt_draw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/igt_draw.c b/lib/igt_draw.c
index 9a7664a37..498c69a56 100644
--- a/lib/igt_draw.c
+++ b/lib/igt_draw.c
@@ -950,5 +950,8 @@ bool igt_draw_supports_method(int fd, enum igt_draw_method method)
if (method == IGT_DRAW_MMAP_CPU || method == IGT_DRAW_PWRITE)
return is_i915_device(fd);
+ if (method == IGT_DRAW_RENDER)
+ return !!igt_get_render_copyfunc(intel_get_drm_devid(fd));
+
return true;
}