[Intel-gfx] [PATCH] drm/i915: Tighten obj->map_and_fenceable

Daniel Vetter daniel at ffwll.ch
Fri Feb 27 07:32:26 PST 2015


On Fri, Feb 27, 2015 at 01:58:43PM +0000, Chris Wilson wrote:
> For an object right on the boundary of mappable space, as the fenceable
> size is stricly greater than the actual size, its fence region may extend
> out of mappable space.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

Do you have a scenario where this could blow up? Given the pot alignment
and fence_size constraints these two should still be equivalent.

Ack if I do an s/tighten/clarify/ and amend your commit message?
-Daniel

> ---
>  drivers/gpu/drm/i915/i915_gem.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index df27234b5942..aa0d9e2c91f5 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4231,7 +4231,7 @@ i915_gem_object_pin_view(struct drm_i915_gem_object *obj,
>  		fenceable = (vma->node.size >= fence_size &&
>  			     (vma->node.start & (fence_alignment - 1)) == 0);
>  
> -		mappable = (vma->node.start + obj->base.size <=
> +		mappable = (vma->node.start + fence_size <=
>  			    dev_priv->gtt.mappable_end);
>  
>  		obj->map_and_fenceable = mappable && fenceable;
> -- 
> 2.1.4
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the Intel-gfx mailing list