[Intel-gfx] [PATCH 09/10] drm/i915: Store required fence size/alignment for GGTT vma

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Mon Jan 9 14:05:01 UTC 2017


On pe, 2017-01-06 at 15:25 +0000, Chris Wilson wrote:

Commit message missing.

> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

<SNIP>

> @@ -3360,11 +3360,10 @@ int i915_gem_object_attach_phys(struct drm_i915_gem_object *obj,
>  int i915_gem_open(struct drm_device *dev, struct drm_file *file);
>  void i915_gem_release(struct drm_device *dev, struct drm_file *file);
>  
> -u64 i915_gem_get_ggtt_size(struct drm_i915_private *dev_priv, u64 size,
> +u32 i915_gem_get_ggtt_size(struct drm_i915_private *dev_priv, u32 size,

We still seem to have some type bouncing going on.

> @@ -3577,7 +3573,7 @@ i915_gem_object_unpin_from_display_plane(struct i915_vma *vma)
>  		return;
>  
>  	if (--vma->obj->pin_display == 0)
> -		vma->display_alignment = 0;
> +		vma->display_alignment = 4096;

Is there a case when the max() become zero? Do we have Bugzilla or is
this just preventive action.

> @@ -277,10 +273,18 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
>  			mutex_unlock(&obj->mm.lock);
>  
>  			list_for_each_entry(vma, &obj->vma_list, obj_link) {
> -				if (!vma->fence)
> -					continue;
> -
> -				vma->fence->dirty = true;
> +				if (!i915_vma_is_ggtt(vma))
> +					break;
> +
> +				vma->fence_size = i915_gem_get_ggtt_size(dev_priv, vma->size,
> +									 args->tiling_mode,
> +									 args->stride);

It was called fence_size previously in the context which helped to
understand the variable name. I think without the context, it should
either be vma->ggtt_size or rename i915_gem_get_ggtt_size to fence_size
too.

> @@ -91,6 +91,7 @@ __i915_vma_create(struct drm_i915_gem_object *obj,
>  	vma->vm = vm;
>  	vma->obj = obj;
>  	vma->size = obj->base.size;
> +	vma->display_alignment = 4096;

Same question as above. But regardless;

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