[Intel-gfx] [PATCH 1/6] drm/i915: Pass around gen to tile_height to special case gen2
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Fri Jan 20 12:29:38 UTC 2017
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 at linux.intel.com>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
<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;
Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list