Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support
@ 2023-11-15 13:39 Bhanuprakash Modem
  2023-11-15 14:00 ` Juha-Pekka Heikkila
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Bhanuprakash Modem @ 2023-11-15 13:39 UTC (permalink / raw)
  To: igt-dev

igt_draw_supports_method() is initially designed to identify
that the given driver (i915/xe) supports the slected draw
method.

Even though Rendercopy support in IGT is not present for few
latest platforms, this api assums 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>
---
 lib/igt_draw.c | 3 +++
 1 file changed, 3 insertions(+)

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;
 }
-- 
2.40.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-11-17  3:24 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 13:39 [igt-dev] [i-g-t] lib/igt_draw: Check for Rendercopy support Bhanuprakash Modem
2023-11-15 14:00 ` Juha-Pekka Heikkila
2023-11-15 16:20 ` Kamil Konieczny
2023-11-16  3:35   ` Modem, Bhanuprakash
2023-11-15 16:44 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-11-15 17:28 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-11-17  3:24 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox