On Mon, 2017-09-11 at 09:41 +0100, Chris Wilson wrote:
> Acquire the fence register for the iomap in i915_vma_pin_iomap() on
> behalf of the caller.
> 
> We probably want for the caller to specify whether the fence should be
> pinned for their usage, but at the moment all callers do want the
> associated fence, or none, so take it on their behalf.
> 
> Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>

<SNIP>

> @@ -278,6 +278,7 @@ int i915_vma_bind(struct i915_vma *vma, enum 
> i915_cache_level cache_level,
>  void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
>  {
>       void __iomem *ptr;
> +     int ret;
>  
>       /* Access through the GTT requires the device to be awake. */
>       assert_rpm_wakelock_held(vma->vm->i915);
> @@ -301,9 +302,27 @@ void __iomem *i915_vma_pin_iomap(struct i915_vma *vma)
>       }
>  
>       __i915_vma_pin(vma);
> +
> +     ret = i915_vma_get_fence(vma);
> +     if (ret) {
> +             __i915_vma_unpin(vma);
> +             return IO_ERR_PTR(ret);

Please consolidate the IO_ERR_PTR's into goto labels. Then this is;

Reviewed-by: Joonas Lahtinen <joonas.lahti...@linux.intel.com>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to