]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vmwgfx: Introduce a huge page aligning TTM range manager
authorThomas Hellstrom (VMware) <thomas_os@shipmail.org>
Tue, 24 Mar 2020 17:50:12 +0000 (18:50 +0100)
committerThomas Hellstrom (VMware) <thomas_os@shipmail.org>
Tue, 24 Mar 2020 17:50:12 +0000 (18:50 +0100)
commitc2664385d9a7afc8fa3bdb456e310dabdd347a3b
tree475d19fcd58c214545131e782596c5c6d7ff4bb3
parent3d3e4098211c77a63047717a4d19b1972f7e1655
drm/vmwgfx: Introduce a huge page aligning TTM range manager

Using huge page-table entries requires that the physical address of the
start of a buffer object is huge page size aligned.
Make a special version of the TTM range manager that accomplishes this,
but falls back to a smaller page size alignment (PUD->PMD, PMD->NORMAL)
to avoid eviction.
If other drivers want to use it in the future, it can be made a
TTM generic helper. Note that drivers can force eviction for a certain
alignment by assigning the TTM GPU alignment correspondingly.

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Michal Hocko <mhocko@suse.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Ralph Campbell <rcampbell@nvidia.com>
Cc: "Jérôme Glisse" <jglisse@redhat.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Thomas Hellstrom (VMware) <thomas_os@shipmail.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Acked-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/vmwgfx/Makefile
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h
drivers/gpu/drm/vmwgfx/vmwgfx_thp.c [new file with mode: 0644]