On Mon, Feb 01, 2016 at 05:16:25PM +0000, Zanoni, Paulo R wrote: > 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. Some Y tiling/rotation ones, can't recall the specific details. There was some discussion on this recently when I suggested that we could just use a fence on Y tiled buffers as well. Also if you look further, the cairo glue will actually use a linear temp buffer for rendering and then blit between the linear temp buffer and the Y tiled fb. Though it's only implemented for SKL+ fast blit so far. I have a patch locally adding support for the regular blit as well since I wanted to play around with that stuff on gen7/X tiled too. > > 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@xxxxxxxxx> > > > --- > > > 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@xxxxxxxxxxxxxxxxxxxxx > > > http://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx