public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Subject: [igt-dev] [PATCH] tests/kms_plane: check before calling i915 libraries
Date: Tue, 29 Nov 2022 15:03:09 -0700	[thread overview]
Message-ID: <20221129220309.1472045-1-alex.hung@amd.com> (raw)

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

             reply	other threads:[~2022-11-29 22:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29 22:03 Alex Hung [this message]
2022-11-29 23:30 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_plane: check before calling i915 libraries Patchwork
2022-11-30  6:40 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2022-12-02  7:53 ` [igt-dev] [PATCH] " Andrzej Hajda

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221129220309.1472045-1-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox