On Fri, Jan 20, 2017 at 02:29:38PM +0200, Joonas Lahtinen wrote:
> On to, 2017-01-19 at 19:26 +0000, Chris Wilson wrote:
> > gen2 has a different tiling pattern, and a fixed tile_height. Pass
> > along the gen so that we the computed tile_row is large enough to align
> > with gen2 fences.
> > 
> > Reported-by: Ville Syrjälä <[email protected]>
> > Signed-off-by: Chris Wilson <[email protected]>
> 
> <SNIP>
> 
> >  static inline unsigned int
> > -i915_gem_object_get_tile_height(struct drm_i915_gem_object *obj)
> > +i915_gem_object_get_tile_height(struct drm_i915_gem_object *obj, int gen)
> >  {
> > -   return i915_gem_tile_height(i915_gem_object_get_tiling(obj));
> > +   return i915_gem_tile_height(gen, i915_gem_object_get_tiling(obj));
> >  }
> >  
> >  static inline unsigned int
> > -i915_gem_object_get_tile_row_size(struct drm_i915_gem_object *obj)
> > +i915_gem_object_get_tile_row_size(struct drm_i915_gem_object *obj, int gen)
> >  {
> >     return (i915_gem_object_get_stride(obj) *
> > -           i915_gem_object_get_tile_height(obj));
> > +           i915_gem_object_get_tile_height(obj, gen));
> >  }
> 
> Compiler not smart enough to optimize these two if you grab it from obj
> with INTEL_GEN? Anyway;

It's the curse of the headers. :(
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to