public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [CI 4/4] tests/fb/tgl: Yf tiling does not exist on gen-12
Date: Mon, 22 Jul 2019 10:37:29 -0700	[thread overview]
Message-ID: <20190722173729.5153-4-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20190722173729.5153-1-lucas.demarchi@intel.com>

From: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>

Fix test to check for addfb failure instead.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_addfb_basic.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
index d5dc3eff..20dfd4f2 100644
--- a/tests/kms_addfb_basic.c
+++ b/tests/kms_addfb_basic.c
@@ -527,7 +527,7 @@ static void addfb25_tests(int fd)
 		gem_close(fd, gem_bo);
 }
 
-static int addfb_expected_ret(int fd)
+static int addfb_expected_ret(int fd, uint64_t modifier)
 {
 	int gen;
 
@@ -535,6 +535,9 @@ static int addfb_expected_ret(int fd)
 		return 0;
 
 	gen = intel_gen(intel_get_drm_devid(fd));
+
+	if (modifier == LOCAL_I915_FORMAT_MOD_Yf_TILED)
+		return gen >= 9 && gen < 12 ? 0 : -1;
 	return gen >= 9 ? 0 : -1;
 }
 
@@ -568,8 +571,8 @@ static void addfb25_ytile(int fd)
 
 		f.modifier[0] = LOCAL_I915_FORMAT_MOD_Y_TILED;
 		igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) ==
-			   addfb_expected_ret(fd));
-		if (!addfb_expected_ret(fd))
+			   addfb_expected_ret(fd, f.modifier[0]));
+		if (!addfb_expected_ret(fd, f.modifier[0]))
 			igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 		f.fb_id = 0;
 	}
@@ -579,8 +582,8 @@ static void addfb25_ytile(int fd)
 
 		f.modifier[0] = LOCAL_I915_FORMAT_MOD_Yf_TILED;
 		igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) ==
-			   addfb_expected_ret(fd));
-		if (!addfb_expected_ret(fd))
+			   addfb_expected_ret(fd, f.modifier[0]));
+		if (!addfb_expected_ret(fd, f.modifier[0]))
 			igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
 		f.fb_id = 0;
 	}
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  parent reply	other threads:[~2019-07-22 17:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-22 17:37 [igt-dev] [CI 1/4] lib: sync i915_pciids.h with kernel Lucas De Marchi
2019-07-22 17:37 ` [igt-dev] [CI 2/4] lib/tgl: Add Tigerlake platform definition Lucas De Marchi
2019-07-22 17:37 ` [igt-dev] [CI 3/4] lib/tgl: Add TGL PCI IDs to match table Lucas De Marchi
2019-07-22 17:37 ` Lucas De Marchi [this message]
2019-07-22 18:04 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [CI,1/4] lib: sync i915_pciids.h with kernel Patchwork
2019-07-22 19:07 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

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=20190722173729.5153-4-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.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