···60606161/* Check pitch constriants for all chips & tiling formats */6262static bool6363-i915_tiling_ok(struct drm_device *dev, int stride, int size, int tiling_mode)6363+i915_tiling_ok(struct drm_i915_private *dev_priv,6464+ int stride, int size, int tiling_mode)6465{6565- struct drm_i915_private *dev_priv = to_i915(dev);6666 int tile_width;67676868 /* Linear is always fine */···8181 /* check maximum stride & object size */8282 /* i965+ stores the end address of the gtt mapping in the fence8383 * reg, so dont bother to check the size */8484- if (INTEL_INFO(dev)->gen >= 7) {8484+ if (INTEL_GEN(dev_priv) >= 7) {8585 if (stride / 128 > GEN7_FENCE_MAX_PITCH_VAL)8686 return false;8787- } else if (INTEL_INFO(dev)->gen >= 4) {8787+ } else if (INTEL_GEN(dev_priv) >= 4) {8888 if (stride / 128 > I965_FENCE_MAX_PITCH_VAL)8989 return false;9090 } else {···104104 return false;105105106106 /* 965+ just needs multiples of tile width */107107- if (INTEL_INFO(dev)->gen >= 4) {107107+ if (INTEL_GEN(dev_priv) >= 4) {108108 if (stride & (tile_width - 1))109109 return false;110110 return true;···199199 if (!obj)200200 return -ENOENT;201201202202- if (!i915_tiling_ok(dev,202202+ if (!i915_tiling_ok(dev_priv,203203 args->stride, obj->base.size, args->tiling_mode)) {204204 i915_gem_object_put(obj);205205 return -EINVAL;