From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Deepak Rawat <drawat@vmware.com>
Cc: thellstrom@vmware.com, petri.latvala@intel.com, syeh@vmware.com,
intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org,
linux-graphics-maintainer@vmware.com
Subject: Re: [igt-dev] [PATCH i-g-t 3/6] lib/igt_fb: Check for cairo surface success
Date: Thu, 11 Oct 2018 18:06:45 +0300 [thread overview]
Message-ID: <20181011150645.GK9144@intel.com> (raw)
In-Reply-To: <20181011002104.1845-3-drawat@vmware.com>
On Wed, Oct 10, 2018 at 05:21:01PM -0700, Deepak Rawat wrote:
> For vmwgfx cairo surface creation fails due to stride mismatch, add a
> igt_require_f() for surface.
Hmm. What kind of pixel format are you using?
It seems to me cairo should be happy with just a 4 byte aligned
stride. How bad would it be to change vmw_dumb_create() to give
you that? Having working cairo stuff should make igt_fb much more
useful for you in general.
Alternative would to not use dumb buffers I suppose, but then
we'd need to make sure the igt_fb size calculations are OK for
vmwgfx. Currently igt_fb assumes Intel hw in the sense that
linear buffers will get a 64byte aligned stride.
>
> 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
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
WARNING: multiple messages have this Message-ID (diff)
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Deepak Rawat <drawat@vmware.com>
Cc: thellstrom@vmware.com, syeh@vmware.com,
intel-gfx@lists.freedesktop.org, igt-dev@lists.freedesktop.org,
linux-graphics-maintainer@vmware.com
Subject: Re: [igt-dev] [PATCH i-g-t 3/6] lib/igt_fb: Check for cairo surface success
Date: Thu, 11 Oct 2018 18:06:45 +0300 [thread overview]
Message-ID: <20181011150645.GK9144@intel.com> (raw)
In-Reply-To: <20181011002104.1845-3-drawat@vmware.com>
On Wed, Oct 10, 2018 at 05:21:01PM -0700, Deepak Rawat wrote:
> For vmwgfx cairo surface creation fails due to stride mismatch, add a
> igt_require_f() for surface.
Hmm. What kind of pixel format are you using?
It seems to me cairo should be happy with just a 4 byte aligned
stride. How bad would it be to change vmw_dumb_create() to give
you that? Having working cairo stuff should make igt_fb much more
useful for you in general.
Alternative would to not use dumb buffers I suppose, but then
we'd need to make sure the igt_fb size calculations are OK for
vmwgfx. Currently igt_fb assumes Intel hw in the sense that
linear buffers will get a 64byte aligned stride.
>
> 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
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-11 15:06 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-11 0:20 [igt-dev] [PATCH i-g-t 1/6] lib/igt_vmwgfx: Add vmwgfx device Deepak Rawat
2018-10-11 0:20 ` Deepak Rawat
2018-10-11 0:21 ` [Intel-gfx] [PATCH i-g-t 2/6] lib/igt_fb: Call dumb_destroy ioctl in case of dumb buffers Deepak Rawat
2018-10-11 0:21 ` Deepak Rawat
2018-10-11 0:21 ` [Intel-gfx] [PATCH i-g-t 3/6] lib/igt_fb: Check for cairo surface success Deepak Rawat
2018-10-11 0:21 ` Deepak Rawat
2018-10-11 15:06 ` Ville Syrjälä [this message]
2018-10-11 15:06 ` [igt-dev] " Ville Syrjälä
2018-10-11 15:48 ` Deepak Singh Rawat
2018-10-11 15:48 ` Deepak Singh Rawat
2018-10-11 0:21 ` [igt-dev] [PATCH i-g-t 4/6] lib: Don't call igt_require_fb_modifiers() when no modifier Deepak Rawat
2018-10-11 0:21 ` Deepak Rawat
2018-10-11 14:51 ` [igt-dev] " Ville Syrjälä
2018-10-11 14:51 ` Ville Syrjälä
2018-10-11 15:38 ` Deepak Singh Rawat
2018-10-11 15:38 ` Deepak Singh Rawat
2018-10-11 15:48 ` Daniel Vetter
2018-10-11 15:48 ` Daniel Vetter
2018-10-11 0:21 ` [Intel-gfx] [PATCH i-g-t 5/6] tests/kms_atomic: Add a new test case for FB_DAMAGE_CLIPS plane property Deepak Rawat
2018-10-11 0:21 ` Deepak Rawat
2018-10-11 0:21 ` [Intel-gfx] [PATCH i-g-t 6/6] tests/plane_damage: Integrate kernel selftest test-drm_damage_helper Deepak Rawat
2018-10-11 0:21 ` Deepak Rawat
2018-10-11 9:05 ` [Intel-gfx] " Daniel Vetter
2018-10-11 9:05 ` Daniel Vetter
2018-10-11 15:23 ` [Intel-gfx] " Deepak Singh Rawat
2018-10-11 15:23 ` Deepak Singh Rawat
2018-10-11 15:25 ` [Intel-gfx] " Daniel Vetter
2018-10-11 15:25 ` Daniel Vetter
2018-10-11 9:01 ` [igt-dev] [PATCH i-g-t 1/6] lib/igt_vmwgfx: Add vmwgfx device Daniel Vetter
2018-10-11 9:01 ` Daniel Vetter
2018-10-11 9:11 ` Petri Latvala
2018-10-11 9:11 ` Petri Latvala
2018-10-11 9:46 ` Daniel Vetter
2018-10-11 9:46 ` Daniel Vetter
2018-10-11 15:17 ` Deepak Singh Rawat
2018-10-11 15:17 ` Deepak Singh Rawat
2018-10-11 15:27 ` Daniel Vetter
2018-10-11 15:27 ` Daniel Vetter
2018-10-11 15:32 ` Deepak Singh Rawat
2018-10-11 15:32 ` Deepak Singh Rawat
2018-10-11 9:21 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/6] " Patchwork
2018-10-11 14:22 ` [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=20181011150645.GK9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=drawat@vmware.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-graphics-maintainer@vmware.com \
--cc=petri.latvala@intel.com \
--cc=syeh@vmware.com \
--cc=thellstrom@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.