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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux