提交 5e265680 编写于 作者: J Jerome Glisse 提交者: Dave Airlie

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: NJerome Glisse <jglisse@redhat.com>
Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: NThomas Hellstrom <thellstrom@vmware.com>
上级 a14af87b
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册