intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
To: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH igt 1/3] lib/igt_fb: also call __gem_set_tiling for Y tiling
Date: Mon, 1 Feb 2016 17:16:25 +0000	[thread overview]
Message-ID: <1454346984.2538.14.camel@intel.com> (raw)
In-Reply-To: <20160129190605.GO23290@intel.com>

Em Sex, 2016-01-29 às 21:06 +0200, Ville Syrjälä escreveu:
> On Fri, Jan 29, 2016 at 04:46:30PM -0200, Paulo Zanoni wrote:
> > The interesting thing is that if we don't do this, we still get a
> > Y tiled framebuffer, but there won't be a fence around it, which
> > makes
> > the GTT mmaps less interesting. Is this a Kernel bug?
> 
> I think some tests currently depend on not having a fence for Y tiled
> fbs. So this could break stuff.

Do you have any additional information that could help me discover
which ones? A quick look on the IGT tests mentioning tiling didn't
point anything obvious.

Besides, I think it's probably not a good idea to have such a high
level helper function behaving differently depending on the tiling
type, I'd vote to either call set_tiling on both or on none.

> 
> > 
> > Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > ---
> >  lib/igt_fb.c | 39 ++++++++++++++++++++-------------------
> >  1 file changed, 20 insertions(+), 19 deletions(-)
> > 
> > diff --git a/lib/igt_fb.c b/lib/igt_fb.c
> > index 5f23136..efdd793 100644
> > --- a/lib/igt_fb.c
> > +++ b/lib/igt_fb.c
> > @@ -73,6 +73,22 @@ static struct format_desc_struct {
> >  #define for_each_format(f)	\
> >  	for (f = format_desc; f - format_desc <
> > ARRAY_SIZE(format_desc); f++)
> >  
> > +static unsigned int fb_mod_to_obj_tiling(uint64_t fb_mod)
> > +{
> > +	switch (fb_mod) {
> > +	case LOCAL_DRM_FORMAT_MOD_NONE:
> > +		return I915_TILING_NONE;
> > +	case LOCAL_I915_FORMAT_MOD_X_TILED:
> > +		return I915_TILING_X;
> > +	case LOCAL_I915_FORMAT_MOD_Y_TILED:
> > +		return I915_TILING_Y;
> > +	case LOCAL_I915_FORMAT_MOD_Yf_TILED:
> > +		return I915_TILING_Yf;
> > +	default:
> > +		igt_assert(0);
> > +	}
> > +}
> > +
> >  static void igt_get_fb_tile_size(int fd, uint64_t tiling, int
> > fb_bpp,
> >  				 unsigned *width_ret, unsigned
> > *height_ret)
> >  {
> > @@ -191,9 +207,10 @@ 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,
> > -				       bo_stride);
> > +	if (tiling == LOCAL_I915_FORMAT_MOD_X_TILED ||
> > +	    tiling == LOCAL_I915_FORMAT_MOD_Y_TILED)
> > +		ret = __gem_set_tiling(fd, gem_handle,
> > +				      fb_mod_to_obj_tiling(tiling)
> > , bo_stride);
> >  
> >  	*stride_ret = bo_stride;
> >  	*size_ret = bo_size;
> > @@ -862,22 +879,6 @@ struct fb_blit_upload {
> >  	} linear;
> >  };
> >  
> > -static unsigned int fb_mod_to_obj_tiling(uint64_t fb_mod)
> > -{
> > -	switch (fb_mod) {
> > -	case LOCAL_DRM_FORMAT_MOD_NONE:
> > -		return I915_TILING_NONE;
> > -	case LOCAL_I915_FORMAT_MOD_X_TILED:
> > -		return I915_TILING_X;
> > -	case LOCAL_I915_FORMAT_MOD_Y_TILED:
> > -		return I915_TILING_Y;
> > -	case LOCAL_I915_FORMAT_MOD_Yf_TILED:
> > -		return I915_TILING_Yf;
> > -	default:
> > -		igt_assert(0);
> > -	}
> > -}
> > -
> >  static void destroy_cairo_surface__blit(void *arg)
> >  {
> >  	struct fb_blit_upload *blit = arg;
> > -- 
> > 2.7.0.rc3
> > 
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-02-01 17:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 18:46 [PATCH igt 1/3] lib/igt_fb: also call __gem_set_tiling for Y tiling Paulo Zanoni
2016-01-29 18:46 ` [PATCH igt 2/3] lib/igt_draw: add support " Paulo Zanoni
2016-02-10  8:22   ` Daniel Vetter
2016-01-29 18:46 ` [PATCH igt 3/3] tests/kms_draw_crc: " Paulo Zanoni
2016-01-29 19:06 ` [PATCH igt 1/3] lib/igt_fb: also call __gem_set_tiling " Ville Syrjälä
2016-02-01 17:16   ` Zanoni, Paulo R [this message]
2016-02-01 17:23     ` Ville Syrjälä
2016-02-01 17:44     ` Tvrtko Ursulin
2016-02-01 17:57       ` Ville Syrjälä
2016-02-02  9:34         ` Tvrtko Ursulin
2016-02-10  8:20           ` Daniel Vetter

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=1454346984.2538.14.camel@intel.com \
    --to=paulo.r.zanoni@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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;
as well as URLs for NNTP newsgroup(s).