OSDN Git Service

drm/vmwgfx: Map the fifo as cached
authorThomas Hellstrom <thellstrom@vmware.com>
Mon, 14 Sep 2015 08:17:43 +0000 (01:17 -0700)
committerThomas Hellstrom <thellstrom@vmware.com>
Mon, 14 Sep 2015 08:17:43 +0000 (01:17 -0700)
commit2e586a7e017a502410ba1c1a7411179e1d3fbb2b
tree44f01f5ccf6fe03bc2c081583e49b1eb5519612c
parent54c12bc374408faddbff75dbf1a6167c19af39c4
drm/vmwgfx: Map the fifo as cached

On the guest kernel side, previously the FIFO has been mapped write-
combined. This has worked since VMs up to now has not honored the mapping
type and mapped the FIFO cached anyway. Since the FIFO is accessed cached
by the CPU on the virtual device side, this leads to inconsistent
mappings once the guest starts to honor the mapping types.

So ask for cached mappings when we map the FIFO. We do this by
using ioremap_cache() instead of ioremap_wc(), and remove the MTRR setup.
On the TTM side, MOBs, GMRs and VRAM buffers are already requesting
cached mappings for kernel- and user-space.

Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h