[Intel-gfx] [PATCH] drm/i915: Switch kunmap() to take the page not vaddr
Mika Kuoppala
mika.kuoppala at linux.intel.com
Mon Nov 25 09:21:39 UTC 2019
Chris Wilson <chris at chris-wilson.co.uk> writes:
> On converting from kunmap_atomic() to kunamp() one must remember the
> latter takes the struct page, the former the vaddr.
>
> Fixes: 48715f700174 ("drm/i915: Avoid atomic context for error capture")
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Would it have been otherway around, we would have been caught as,
BUILD_BUG_ON(__same_type((addr), struct page *)); \
Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_gpu_error.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index 7118ecb7f144..2b30a45fa25c 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -1045,7 +1045,7 @@ i915_error_object_create(struct drm_i915_private *i915,
>
> s = kmap(page);
> ret = compress_page(compress, s, dst);
> - kunmap(s);
> + kunmap(page);
>
> drm_clflush_pages(&page, 1);
>
> --
> 2.24.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list