[Intel-gfx] [PATCH 06/11] drm/i915: Pin fence for iomap
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Thu Sep 28 10:20:39 UTC 2017
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 <chris at 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.lahtinen at linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list