提交 975efdb1 编写于 作者: P Pauli Nieminen 提交者: Dave Airlie

drm/ttm: Use set_pages_array_wc instead of set_memory_wc.

Using single call to set multiple pages to wc reduces number of expensive cache
flushes.
Signed-off-by: NPauli Nieminen <suokkos@gmail.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 4f646254
......@@ -113,17 +113,7 @@ static struct ttm_pool_manager _manager = {
.page_alloc_inited = ATOMIC_INIT(0)
};
#ifdef CONFIG_X86
/* TODO: add this to x86 like _uc, this version here is inefficient */
static int set_pages_array_wc(struct page **pages, int addrinarray)
{
int i;
for (i = 0; i < addrinarray; i++)
set_memory_wc((unsigned long)page_address(pages[i]), 1);
return 0;
}
#else
#ifndef CONFIG_X86
static int set_pages_array_wb(struct page **pages, int addrinarray)
{
#ifdef TTM_HAS_AGP
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册