]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Permit video-buffers writecombine mapping for MIPS
authorSerge Semin <fancer.lancer@gmail.com>
Tue, 23 Apr 2019 12:31:22 +0000 (15:31 +0300)
committerSean Paul <seanpaul@chromium.org>
Tue, 18 Jun 2019 19:41:33 +0000 (15:41 -0400)
commit525f2f4b1291ba2050fd0ad6f7c7872fb10e488a
treec6ac6b7a0eecde1d74a1bf9c6c4581320f4be5eb
parent96de8f9694991eba1a17914ff99d4bbb674485cf
drm: Permit video-buffers writecombine mapping for MIPS

Since commit 06fccaa16a25 ("MIPS: pgtable.h: Implement the
pgprot_writecombine function for MIPS") and commit 27d60aa60606 ("MIPS: Fix
definition of pgprot_writecombine()") write-combine vma mapping is
available to be used by kernel subsystems for MIPS. In particular the
uncached accelerated attribute is requested to be set by ioremap_wc()
method and by generic PCI memory pages/ranges mapping methods. The same
is done by the drm_io_prot()/ttm_io_prot() functions in case if
write-combine flag is set for vma's passed for mapping. But for some
reason the pgprot_writecombine() method calling is ifdefed to be a
platform-specific with MIPS system being marked as lacking of one. At the
very least it doesn't reflect the current MIPS platform implementation.
So in order to improve the DRM subsystem performance on MIPS with UCA
mapping enabled, we need to have pgprot_writecombine() called for buffers,
which need store operations being combined. In case if particular MIPS
chip doesn't support the UCA attribute, the mapping will fall back to
noncached.

Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@mips.com>
Cc: James Hogan <jhogan@kernel.org>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: Vadim V. Vlasov <vadim.vlasov@t-platforms.ru>
Signed-off-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190423123122.32573-1-fancer.lancer@gmail.com
drivers/gpu/drm/drm_vm.c
drivers/gpu/drm/ttm/ttm_bo_util.c