From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org,
Vivek Kasireddy <vivek.kasireddy@intel.com>
Subject: Re: [PATCH i-g-t 1/3] lib/igt_fb: Allow specifiying object tiling when creating frame buffers
Date: Fri, 16 Oct 2015 15:03:16 +0300 [thread overview]
Message-ID: <20151016120316.GN26517@intel.com> (raw)
In-Reply-To: <1444993189-18645-1-git-send-email-tvrtko.ursulin@linux.intel.com>
On Fri, Oct 16, 2015 at 11:59:47AM +0100, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>
> Currently object tiling is inferred from the frame buffer modifier
> and only for legacy X scanout.
>
> It is useful to support overriding this selection for certain tests
> so add the capability.
So you want to set up the object tiling differently from the fb
tiling? Why is that? And don't we reject it in the kernel? If we don't
need a fence for scanout (ie. FBC or gen2/3) we could allow it I
suppose, but not sure it it really helps with anything.
BTW I was thinking of allowing the test to pass in an already created
bo to igt_create_fb to use in some fb->offsets[] tests.
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> ---
> lib/igt_fb.c | 21 ++++++++++++++-------
> lib/igt_fb.h | 3 ++-
> tests/kms_flip.c | 3 ++-
> 3 files changed, 18 insertions(+), 9 deletions(-)
>
> diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> index d04f02c0d035..73be93cb6e63 100644
> --- a/lib/igt_fb.c
> +++ b/lib/igt_fb.c
> @@ -75,7 +75,8 @@ static struct format_desc_struct {
>
> /* helpers to create nice-looking framebuffers */
> static int create_bo_for_fb(int fd, int width, int height, int bpp,
> - uint64_t tiling, unsigned bo_size,
> + uint64_t tiling, unsigned int obj_tiling,
> + unsigned bo_size,
> uint32_t *gem_handle_ret,
> unsigned *size_ret,
> unsigned *stride_ret)
> @@ -113,7 +114,9 @@ static int create_bo_for_fb(int fd, int width, int height, int bpp,
> gem_handle = gem_create(fd, bo_size);
>
> if (tiling == LOCAL_I915_FORMAT_MOD_X_TILED)
> - ret = __gem_set_tiling(fd, gem_handle, I915_TILING_X, stride);
> + obj_tiling = I915_TILING_X;
> + if (obj_tiling != I915_TILING_NONE)
> + ret = __gem_set_tiling(fd, gem_handle, obj_tiling, stride);
>
> *stride_ret = stride;
> *size_ret = size;
> @@ -414,7 +417,8 @@ void igt_paint_image(cairo_t *cr, const char *filename,
> */
> unsigned int
> igt_create_fb_with_bo_size(int fd, int width, int height,
> - uint32_t format, uint64_t tiling,
> + uint32_t format,
> + uint64_t tiling, unsigned int obj_tiling,
> struct igt_fb *fb, unsigned bo_size)
> {
> uint32_t fb_id;
> @@ -426,8 +430,9 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
>
> igt_debug("%s(width=%d, height=%d, format=0x%x [bpp=%d], tiling=0x%"PRIx64", size=%d)\n",
> __func__, width, height, format, bpp, tiling, bo_size);
> - do_or_die(create_bo_for_fb(fd, width, height, bpp, tiling, bo_size,
> - &fb->gem_handle, &fb->size, &fb->stride));
> + do_or_die(create_bo_for_fb(fd, width, height, bpp, tiling, obj_tiling,
> + bo_size, &fb->gem_handle, &fb->size,
> + &fb->stride));
>
> igt_debug("%s(handle=%d, pitch=%d)\n",
> __func__, fb->gem_handle, fb->stride);
> @@ -485,7 +490,8 @@ igt_create_fb_with_bo_size(int fd, int width, int height,
> unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
> uint64_t tiling, struct igt_fb *fb)
> {
> - return igt_create_fb_with_bo_size(fd, width, height, format, tiling, fb, 0);
> + return igt_create_fb_with_bo_size(fd, width, height, format,
> + tiling, I915_TILING_NONE, fb, 0);
> }
>
> /**
> @@ -714,7 +720,8 @@ static void create_cairo_surface__blit(int fd, struct igt_fb *fb)
> */
> bpp = igt_drm_format_to_bpp(fb->drm_format);
> ret = create_bo_for_fb(fd, fb->width, fb->height, bpp,
> - LOCAL_DRM_FORMAT_MOD_NONE, 0,
> + LOCAL_DRM_FORMAT_MOD_NONE, I915_TILING_NONE,
> + 0,
> &blit->linear.handle,
> &blit->linear.size,
> &blit->linear.stride);
> diff --git a/lib/igt_fb.h b/lib/igt_fb.h
> index a07acd2444b8..fa92fd4efd5b 100644
> --- a/lib/igt_fb.h
> +++ b/lib/igt_fb.h
> @@ -71,7 +71,8 @@ enum igt_text_align {
>
> unsigned int
> igt_create_fb_with_bo_size(int fd, int width, int height,
> - uint32_t format, uint64_t tiling,
> + uint32_t format,
> + uint64_t tiling, unsigned int obj_tiling,
> struct igt_fb *fb, unsigned bo_size);
> unsigned int igt_create_fb(int fd, int width, int height, uint32_t format,
> uint64_t tiling, struct igt_fb *fb);
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index a139d402608e..60577d23b9a4 100644
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -1366,7 +1366,8 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
> tiling, &o->fb_info[0]);
> o->fb_ids[1] = igt_create_fb_with_bo_size(drm_fd, o->fb_width, o->fb_height,
> igt_bpp_depth_to_drm_format(o->bpp, o->depth),
> - tiling, &o->fb_info[1], bo_size);
> + tiling, I915_TILING_NONE,
> + &o->fb_info[1], bo_size);
> o->fb_ids[2] = igt_create_fb(drm_fd, o->fb_width, o->fb_height,
> igt_bpp_depth_to_drm_format(o->bpp, o->depth),
> LOCAL_I915_FORMAT_MOD_X_TILED, &o->fb_info[2]);
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-10-16 12:03 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 10:59 [PATCH i-g-t 1/3] lib/igt_fb: Allow specifiying object tiling when creating frame buffers Tvrtko Ursulin
2015-10-16 10:59 ` [PATCH i-g-t 2/3] lib/igt_kms: Set new rotation property before displaying Tvrtko Ursulin
2015-10-16 10:59 ` [PATCH i-g-t 3/3] kms_rotation_crc: Test case for rotated VMA first with legacy tiling Tvrtko Ursulin
2015-10-16 12:03 ` Ville Syrjälä [this message]
2015-10-16 12:19 ` [PATCH i-g-t 1/3] lib/igt_fb: Allow specifiying object tiling when creating frame buffers Tvrtko Ursulin
2015-10-16 12:29 ` Ville Syrjälä
2015-10-16 12:54 ` Tvrtko Ursulin
2015-10-16 13:01 ` Ville Syrjälä
2015-10-16 13:06 ` Tvrtko Ursulin
2015-10-17 2:47 ` [PATCH] igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier Vivek Kasireddy
2015-10-19 10:20 ` Tvrtko Ursulin
2015-10-20 1:14 ` Vivek Kasireddy
2015-10-20 9:10 ` Tvrtko Ursulin
2015-10-21 1:41 ` Vivek Kasireddy
2015-10-22 1:24 ` [PATCH] igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v2) Vivek Kasireddy
2015-10-22 9:56 ` Tvrtko Ursulin
2015-10-23 1:34 ` [PATCH] igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v3) Vivek Kasireddy
2015-10-23 8:51 ` Tvrtko Ursulin
2015-10-23 11:35 ` Daniel Vetter
2015-10-24 1:03 ` Vivek Kasireddy
2015-10-27 10:37 ` Tvrtko Ursulin
2015-10-29 1:48 ` [PATCH] igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v4) Vivek Kasireddy
2015-10-29 10:33 ` Tvrtko Ursulin
2015-10-30 1:44 ` [PATCH] igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v5) Vivek Kasireddy
2015-10-30 10:22 ` Tvrtko Ursulin
2015-10-31 1:45 ` Vivek Kasireddy
2015-11-02 9:41 ` Tvrtko Ursulin
2015-11-02 13:36 ` [PATCH] igt/kms_rotation_crc: Add a subtest to validate Y-tiled obj + Y fb modifier (v3) Thomas Wood
2015-11-03 1:25 ` [PATCH] igt/kms_rotation_crc: Add a new subtest to exhaustively test for fence leaks Vivek Kasireddy
2015-11-03 10:02 ` Tvrtko Ursulin
2015-11-04 2:25 ` [PATCH] igt/kms_rotation_crc: Add a new subtest to exhaustively test for fence leaks (v2) Vivek Kasireddy
2015-11-04 10:07 ` Tvrtko Ursulin
2015-11-05 0:10 ` [PATCH] igt/kms_rotation_crc: Add a new subtest to exhaustively test for fence leaks (v3) Vivek Kasireddy
2015-11-05 9:46 ` Tvrtko Ursulin
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=20151016120316.GN26517@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=vivek.kasireddy@intel.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