public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Deepak Rawat <drawat@vmware.com>
To: igt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	linux-graphics-maintainer@vmware.com
Cc: Deepak Rawat <drawat@vmware.com>
Subject: [Intel-gfx] [PATCH i-g-t 2/5] lib/igt_fb: Check for cairo surface success
Date: Tue, 16 Oct 2018 15:23:38 -0700	[thread overview]
Message-ID: <20181016222341.1537-2-drawat@vmware.com> (raw)
In-Reply-To: <20181016222341.1537-1-drawat@vmware.com>

For vmwgfx cairo surface creation fails due to stride mismatch, add a
igt_require_f() for surface.

v2: Check for surface creation failure.

Signed-off-by: Deepak Rawat <drawat@vmware.com>
---
 lib/igt_fb.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 335ece69..1bb6d324 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1433,6 +1433,10 @@ static void create_cairo_surface__gtt(int fd, struct igt_fb *fb)
 		cairo_image_surface_create_for_data(ptr,
 						    drm_format_to_cairo(fb->drm_format),
 						    fb->width, fb->height, fb->strides[0]);
+	igt_require_f(cairo_surface_status(fb->cairo_surface) == CAIRO_STATUS_SUCCESS,
+		      "Unable to create a cairo surface: %s\n",
+		      cairo_status_to_string(cairo_surface_status(fb->cairo_surface)));
+
 	fb->domain = I915_GEM_DOMAIN_GTT;
 
 	cairo_surface_set_user_data(fb->cairo_surface,
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-16 22:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-16 22:23 [igt-dev] [PATCH i-g-t 1/5] lib/igt_fb: Call dumb_destroy ioctl in case of dumb buffers Deepak Rawat
2018-10-16 22:23 ` Deepak Rawat [this message]
2018-10-16 22:23 ` [igt-dev] [PATCH i-g-t 3/5] lib: Don't call igt_require_fb_modifiers() when no modifier Deepak Rawat
2018-10-16 22:23 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_atomic: Add a new test case for FB_DAMAGE_CLIPS plane property Deepak Rawat
2018-10-16 22:23 ` [igt-dev] [PATCH i-g-t 5/5] tests/kms_selftest: Integrate kernel selftest test-drm_modeset Deepak Rawat
2019-06-20 13:20   ` [igt-dev] [Intel-gfx] " Daniel Vetter
2019-06-25  6:01     ` Arkadiusz Hiler
2019-06-25 15:37       ` Daniel Vetter
2019-07-03 10:37         ` Daniel Vetter
2019-07-03 10:53           ` Arkadiusz Hiler
2018-10-17  0:09 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/5] lib/igt_fb: Call dumb_destroy ioctl in case of dumb buffers Patchwork
2018-10-17  2:26 ` [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=20181016222341.1537-2-drawat@vmware.com \
    --to=drawat@vmware.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-graphics-maintainer@vmware.com \
    /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