]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: Refuse to fault (prime-) imported pages
authorThomas Hellstrom <thellstrom@vmware.com>
Fri, 3 Jan 2014 10:17:18 +0000 (11:17 +0100)
committerThomas Hellstrom <thellstrom@vmware.com>
Wed, 8 Jan 2014 08:55:05 +0000 (09:55 +0100)
commite0b8c710da29cd2547527f0f71dba5d0d4d7e692
tree88aba940909300eba870e65ee9c694da8bca1b67
parent189f5da518c7f6a1c8a5874fc447163bde770211
drm/ttm: Refuse to fault (prime-) imported pages

This is illegal for at least two reasons:

1) While it may work on some platforms / iommus, obtaining page pointers from
mapped sg-lists is illegal, since the DMA API allows page pointer information
to be destroyed in the sg mapping process.

2) TTM has no way of determining the linear kernel map caching state of the
underlying pages. PTEs with conflicting caching state pointing to the same
pfn is not allowed.

TTM operations touching pages of imported sg-tables should be redirected through
the proper dma-buf operations.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
drivers/gpu/drm/ttm/ttm_bo_vm.c