Skip to content

Commit

Permalink
drm/ttm: use ttm put pages function to properly restore cache attribute
Browse files Browse the repository at this point in the history
On failure we need to make sure the page we free has wb cache
attribute. Do this pas call the proper ttm page helper function.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com>
  • Loading branch information
Jerome Glisse authored and Dave Airlie committed Dec 6, 2011
1 parent a14af87 commit 5e26568
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/ttm/ttm_tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ static struct page *__ttm_tt_get_page(struct ttm_tt *ttm, int index)
}
return p;
out_err:
put_page(p);
INIT_LIST_HEAD(&h);
list_add(&p->lru, &h);
ttm_put_pages(&h, 1, ttm->page_flags,
ttm->caching_state, &ttm->dma_address[index]);
return NULL;
}

Expand Down

0 comments on commit 5e26568

Please sign in to comment.