Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
4c27bd33
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4c27bd33
编写于
2月 11, 2010
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50: more efficient clearing of gpu page table entries
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
66b6ebac
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
44 addition
and
24 deletion
+44
-24
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_mem.c
+44
-24
未找到文件。
drivers/gpu/drm/nouveau/nouveau_mem.c
浏览文件 @
4c27bd33
...
@@ -291,21 +291,8 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
...
@@ -291,21 +291,8 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
pages
=
size
>>
16
;
pages
=
size
>>
16
;
dev_priv
->
engine
.
instmem
.
prepare_access
(
dev
,
true
);
dev_priv
->
engine
.
instmem
.
prepare_access
(
dev
,
true
);
if
(
flags
&
0x80000000
)
{
while
(
pages
--
)
{
while
(
pages
--
)
{
struct
nouveau_gpuobj
*
pt
=
struct
nouveau_gpuobj
*
pt
=
dev_priv
->
vm_vram_pt
[
virt
>>
29
];
dev_priv
->
vm_vram_pt
[
virt
>>
29
];
unsigned
pte
=
((
virt
&
0x1fffffffULL
)
>>
16
)
<<
1
;
nv_wo32
(
dev
,
pt
,
pte
++
,
0x00000000
);
nv_wo32
(
dev
,
pt
,
pte
++
,
0x00000000
);
virt
+=
(
1
<<
16
);
}
}
else
{
while
(
pages
--
)
{
struct
nouveau_gpuobj
*
pt
=
dev_priv
->
vm_vram_pt
[
virt
>>
29
];
unsigned
pte
=
((
virt
&
0x1fffffffULL
)
>>
16
)
<<
1
;
unsigned
pte
=
((
virt
&
0x1fffffffULL
)
>>
16
)
<<
1
;
unsigned
offset_h
=
upper_32_bits
(
phys
)
&
0xff
;
unsigned
offset_h
=
upper_32_bits
(
phys
)
&
0xff
;
unsigned
offset_l
=
lower_32_bits
(
phys
);
unsigned
offset_l
=
lower_32_bits
(
phys
);
...
@@ -316,7 +303,6 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
...
@@ -316,7 +303,6 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
phys
+=
(
1
<<
16
);
phys
+=
(
1
<<
16
);
virt
+=
(
1
<<
16
);
virt
+=
(
1
<<
16
);
}
}
}
dev_priv
->
engine
.
instmem
.
finish_access
(
dev
);
dev_priv
->
engine
.
instmem
.
finish_access
(
dev
);
nv_wr32
(
dev
,
0x100c80
,
0x00050001
);
nv_wr32
(
dev
,
0x100c80
,
0x00050001
);
...
@@ -339,7 +325,41 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
...
@@ -339,7 +325,41 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
void
void
nv50_mem_vm_unbind
(
struct
drm_device
*
dev
,
uint64_t
virt
,
uint32_t
size
)
nv50_mem_vm_unbind
(
struct
drm_device
*
dev
,
uint64_t
virt
,
uint32_t
size
)
{
{
nv50_mem_vm_bind_linear
(
dev
,
virt
,
size
,
0x80000000
,
0
);
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_gpuobj
*
pgt
;
unsigned
pages
,
pte
,
end
;
virt
-=
dev_priv
->
vm_vram_base
;
pages
=
(
size
>>
16
)
<<
1
;
dev_priv
->
engine
.
instmem
.
prepare_access
(
dev
,
true
);
while
(
pages
)
{
pgt
=
dev_priv
->
vm_vram_pt
[
virt
>>
29
];
pte
=
(
virt
&
0x1ffe0000ULL
)
>>
15
;
end
=
pte
+
pages
;
if
(
end
>
16384
)
end
=
16384
;
pages
-=
(
end
-
pte
);
virt
+=
(
end
-
pte
)
<<
15
;
while
(
pte
<
end
)
nv_wo32
(
dev
,
pgt
,
pte
++
,
0
);
}
dev_priv
->
engine
.
instmem
.
finish_access
(
dev
);
nv_wr32
(
dev
,
0x100c80
,
0x00050001
);
if
(
!
nv_wait
(
0x100c80
,
0x00000001
,
0x00000000
))
{
NV_ERROR
(
dev
,
"timeout: (0x100c80 & 1) == 0 (2)
\n
"
);
NV_ERROR
(
dev
,
"0x100c80 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
0x100c80
));
return
;
}
nv_wr32
(
dev
,
0x100c80
,
0x00000001
);
if
(
!
nv_wait
(
0x100c80
,
0x00000001
,
0x00000000
))
{
NV_ERROR
(
dev
,
"timeout: (0x100c80 & 1) == 0 (2)
\n
"
);
NV_ERROR
(
dev
,
"0x100c80 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
0x100c80
));
}
}
}
/*
/*
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录