Skip to content

Commit

Permalink
drm/ttm: Don't clear page metadata of imported sg pages
Browse files Browse the repository at this point in the history
These page pointers shouldn't be visible to TTM in the first place, but
until we fix that up, don't clear the page metadata because that
will upset the exporter.

Reported-and-tested-by: Cristoph Haag <haagch.christoph@googleemail.com>
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
  • Loading branch information
Thomas Hellstrom committed Feb 5, 2014
1 parent c66f854 commit 1b76af5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/ttm/ttm_tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ static void ttm_tt_clear_mapping(struct ttm_tt *ttm)
pgoff_t i;
struct page **page = ttm->pages;

if (ttm->page_flags & TTM_PAGE_FLAG_SG)
return;

for (i = 0; i < ttm->num_pages; ++i) {
(*page)->mapping = NULL;
(*page++)->index = 0;
Expand Down

0 comments on commit 1b76af5

Please sign in to comment.