Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: dev_priv cleanup in i915_gem_tiling.c

And a little bit of cascaded function prototype changes.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

+6 -6
+6 -6
drivers/gpu/drm/i915/i915_gem_tiling.c
··· 60 60 61 61 /* Check pitch constriants for all chips & tiling formats */ 62 62 static bool 63 - i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode) 63 + i915_tiling_ok(struct drm_i915_private *dev_priv, 64 + int stride, int size, int tiling_mode) 64 65 { 65 - struct drm_i915_private *dev_priv = to_i915(dev); 66 66 int tile_width; 67 67 68 68 /* Linear is always fine */ ··· 81 81 /* check maximum stride & object size */ 82 82 /* i965+ stores the end address of the gtt mapping in the fence 83 83 * reg, so dont bother to check the size */ 84 - if (INTEL_INFO(dev)->gen >= 7) { 84 + if (INTEL_GEN(dev_priv) >= 7) { 85 85 if (stride / 128 > GEN7_FENCE_MAX_PITCH_VAL) 86 86 return false; 87 - } else if (INTEL_INFO(dev)->gen >= 4) { 87 + } else if (INTEL_GEN(dev_priv) >= 4) { 88 88 if (stride / 128 > I965_FENCE_MAX_PITCH_VAL) 89 89 return false; 90 90 } else { ··· 104 104 return false; 105 105 106 106 /* 965+ just needs multiples of tile width */ 107 - if (INTEL_INFO(dev)->gen >= 4) { 107 + if (INTEL_GEN(dev_priv) >= 4) { 108 108 if (stride & (tile_width - 1)) 109 109 return false; 110 110 return true; ··· 199 199 if (!obj) 200 200 return -ENOENT; 201 201 202 - if (!i915_tiling_ok(dev, 202 + if (!i915_tiling_ok(dev_priv, 203 203 args->stride, obj->base.size, args->tiling_mode)) { 204 204 i915_gem_object_put(obj); 205 205 return -EINVAL;