drm: remove drm specific kmap_atomic code
kmap_atomic_prot() is now exported by all architectures. Use this function rather than open coding a driver specific kmap_atomic. [arnd@arndb.de: include linux/highmem.h] Link: http://lkml.kernel.org/r/20200508220150.649044-1-arnd@arndb.de Signed-off-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Andy Lutomirski <luto@kernel.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Chris Zankel <chris@zankel.net> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Helge Deller <deller@gmx.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Max Filippov <jcmvbkbc@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/20200507150004.1423069-12-ira.weiny@intel.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
20b271dfe9
commit
915ecc22d5
@@ -27,6 +27,7 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "vmwgfx_drv.h"
|
||||
#include <linux/highmem.h>
|
||||
|
||||
/*
|
||||
* Template that implements find_first_diff() for a generic
|
||||
@@ -374,12 +375,12 @@ static int vmw_bo_cpu_blit_line(struct vmw_bo_blit_line_data *d,
|
||||
copy_size = min_t(u32, copy_size, PAGE_SIZE - src_page_offset);
|
||||
|
||||
if (unmap_src) {
|
||||
ttm_kunmap_atomic_prot(d->src_addr, d->src_prot);
|
||||
kunmap_atomic(d->src_addr);
|
||||
d->src_addr = NULL;
|
||||
}
|
||||
|
||||
if (unmap_dst) {
|
||||
ttm_kunmap_atomic_prot(d->dst_addr, d->dst_prot);
|
||||
kunmap_atomic(d->dst_addr);
|
||||
d->dst_addr = NULL;
|
||||
}
|
||||
|
||||
@@ -388,8 +389,8 @@ static int vmw_bo_cpu_blit_line(struct vmw_bo_blit_line_data *d,
|
||||
return -EINVAL;
|
||||
|
||||
d->dst_addr =
|
||||
ttm_kmap_atomic_prot(d->dst_pages[dst_page],
|
||||
d->dst_prot);
|
||||
kmap_atomic_prot(d->dst_pages[dst_page],
|
||||
d->dst_prot);
|
||||
if (!d->dst_addr)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -401,8 +402,8 @@ static int vmw_bo_cpu_blit_line(struct vmw_bo_blit_line_data *d,
|
||||
return -EINVAL;
|
||||
|
||||
d->src_addr =
|
||||
ttm_kmap_atomic_prot(d->src_pages[src_page],
|
||||
d->src_prot);
|
||||
kmap_atomic_prot(d->src_pages[src_page],
|
||||
d->src_prot);
|
||||
if (!d->src_addr)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -499,9 +500,9 @@ int vmw_bo_cpu_blit(struct ttm_buffer_object *dst,
|
||||
}
|
||||
out:
|
||||
if (d.src_addr)
|
||||
ttm_kunmap_atomic_prot(d.src_addr, d.src_prot);
|
||||
kunmap_atomic(d.src_addr);
|
||||
if (d.dst_addr)
|
||||
ttm_kunmap_atomic_prot(d.dst_addr, d.dst_prot);
|
||||
kunmap_atomic(d.dst_addr);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user