]> git.baikalelectronics.ru Git - kernel.git/commit
drm/ttm: stop setting page->index for the ttm_tt
authorMatthew Auld <matthew.auld@intel.com>
Mon, 27 Sep 2021 11:41:03 +0000 (12:41 +0100)
committerChristian König <christian.koenig@amd.com>
Wed, 29 Sep 2021 11:54:36 +0000 (13:54 +0200)
commit3f923d3572d414b29449009f1249eca6eb7dda5c
tree2a94989f062f188ca01103096a89f93d11a93024
parent358d8465e73b3ce7cebcb3a1427457e09f447ecc
drm/ttm: stop setting page->index for the ttm_tt

In commit:

commit 96161f7a8646dd42a4b6373d39bcd4e7389df529
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Fri Jan 3 11:47:23 2014 +0100

    drm/ttm: Correctly set page mapping and -index members

we started setting the page->mapping and page->index to point to the
virtual address space, if the pages were faulted with TTM. Apparently
this was needed for core-mm to able to reverse lookup the virtual
address given the struct page, and potentially unmap it from the page
tables. However as pointed out by Thomas, since we are now using
PFN_MAP, instead of say PFN_MIXED, this should no longer be the case.

There was also apparently some usecase in vmwgfx which needed this for
dirty tracking, but that also doesn't appear to be the case anymore, as
pointed out by Thomas.

We still need keep the page->mapping for now, since that is still needed
for different reasons, but we try to address that in the next patch.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210927114114.152310-2-matthew.auld@intel.com
Signed-off-by: Christian König <christian.koenig@amd.com>
drivers/gpu/drm/ttm/ttm_bo_vm.c
drivers/gpu/drm/ttm/ttm_tt.c