Re: [PATCH 1/6] drm/i915: Pass around gen to tile_height to special case gen2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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ä <ville.syrjala@xxxxxxxxxxxxxxx>
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> 
> <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
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux