public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] tests/kms_plane: check before calling i915 libraries
@ 2022-11-29 22:03 Alex Hung
  2022-11-29 23:30 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alex Hung @ 2022-11-29 22:03 UTC (permalink / raw)
  To: igt-dev

for_each_memory_region calls functions in lib/i915/ and let's
check is_i915_device first.

Fixes: db2bdd3a (tests/kms_plane: skip memory demanding modes in test_plane_panning)
Signed-off-by: Alex Hung <alex.hung@amd.com>
---
 tests/kms_plane.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index fc530d2c..164dacf4 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -391,9 +391,12 @@ test_plane_panning(data_t *data, enum pipe pipe)
 
 	test_init(data, pipe);
 
-	for_each_memory_region(r, data->drm_fd)
-		if (r->ci.memory_class == I915_MEMORY_CLASS_DEVICE)
-			mem_size = r->cpu_size;
+	if (is_i915_device(data->drm_fd)) {
+		for_each_memory_region(r, data->drm_fd)
+			if (r->ci.memory_class == I915_MEMORY_CLASS_DEVICE)
+				mem_size = r->cpu_size;
+
+	}
 
 	for_each_connector_mode(output) {
 		drmModeModeInfo *m = &output->config.connector->modes[j__];
-- 
2.34.1

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

end of thread, other threads:[~2022-12-02  7:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-29 22:03 [igt-dev] [PATCH] tests/kms_plane: check before calling i915 libraries Alex Hung
2022-11-29 23:30 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-11-30  6:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-12-02  7:53 ` [igt-dev] [PATCH] " Andrzej Hajda

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