diff options
author | Jerome Glisse <jglisse@redhat.com> | 2011-11-09 15:22:21 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2011-11-09 15:51:43 -0500 |
commit | dad5ef942118605516071ceb417db659a1b11146 (patch) | |
tree | f2e07ed582446314ad0336bfd98637eac73d5f94 | |
parent | d27ea3277aef601223a2cbd71b1662be8fab2764 (diff) | |
download | xen-dad5ef942118605516071ceb417db659a1b11146.tar.gz |
drm/ttm: use ttm put pages function to properly restore cache attribute
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>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_tt.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm/ttm_tt.c index f0c5ffd446d9b2..90527a2ce04cd4 100644 --- a/drivers/gpu/drm/ttm/ttm_tt.c +++ b/drivers/gpu/drm/ttm/ttm_tt.c @@ -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; } |