From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [RFT i-g-t] tests/prime_vgem/basic-fence-flip: Probe display resolution
Date: Wed, 10 Apr 2019 12:43:22 +0100 [thread overview]
Message-ID: <20190410114322.3379-1-tvrtko.ursulin@linux.intel.com> (raw)
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Some displays might not support hardcoded 1024x768.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109294
---
tests/prime_vgem.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/tests/prime_vgem.c b/tests/prime_vgem.c
index 60bb951c8cbe..458846add9ee 100644
--- a/tests/prime_vgem.c
+++ b/tests/prime_vgem.c
@@ -744,8 +744,22 @@ static void flip_to_vgem(int i915, int vgem,
static void test_flip(int i915, int vgem, unsigned hang)
{
- struct vgem_bo bo[2];
+ drmModeModeInfo *mode = NULL;
uint32_t fb_id[2], handle[2], crtc_id;
+ igt_display_t display;
+ igt_output_t *output;
+ struct vgem_bo bo[2];
+ enum pipe pipe;
+
+ igt_display_require(&display, i915);
+ igt_display_require_output(&display);
+
+ for_each_pipe_with_valid_output(&display, pipe, output) {
+ mode = igt_output_get_mode(output);
+ break;
+ }
+
+ igt_assert(mode);
signal(SIGHUP, sighandler);
@@ -754,8 +768,8 @@ static void test_flip(int i915, int vgem, unsigned hang)
uint32_t offsets[4] = {};
int fd;
- bo[i].width = 1024;
- bo[i].height = 768;
+ bo[i].width = mode->hdisplay;
+ bo[i].height = mode->vdisplay;
bo[i].bpp = 32;
vgem_create(vgem, &bo[i]);
--
2.19.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next reply other threads:[~2019-04-10 11:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-10 11:43 Tvrtko Ursulin [this message]
2019-04-10 11:48 ` [igt-dev] [Intel-gfx] [RFT i-g-t] tests/prime_vgem/basic-fence-flip: Probe display resolution Chris Wilson
2019-04-10 12:11 ` Tvrtko Ursulin
2019-05-07 8:14 ` Tvrtko Ursulin
2019-05-09 10:51 ` Kahola, Mika
2019-05-09 12:14 ` Tvrtko Ursulin
2019-04-10 12:31 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-04-10 12:36 ` Tvrtko Ursulin
2019-04-10 17:20 ` [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=20190410114322.3379-1-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--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