Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
63187215
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
63187215
编写于
7月 08, 2010
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50: move tlb flushing to a helper function
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
f56cb86f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
97 deletion
+23
-97
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+1
-0
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_mem.c
+8
-54
drivers/gpu/drm/nouveau/nouveau_sgdma.c
drivers/gpu/drm/nouveau/nouveau_sgdma.c
+4
-30
drivers/gpu/drm/nouveau/nv50_instmem.c
drivers/gpu/drm/nouveau/nv50_instmem.c
+10
-13
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
63187215
...
...
@@ -1039,6 +1039,7 @@ extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *);
extern
int
nv50_instmem_bind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
int
nv50_instmem_unbind
(
struct
drm_device
*
,
struct
nouveau_gpuobj
*
);
extern
void
nv50_instmem_flush
(
struct
drm_device
*
);
extern
void
nv50_vm_flush
(
struct
drm_device
*
,
int
engine
);
/* nv04_mc.c */
extern
int
nv04_mc_init
(
struct
drm_device
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_mem.c
浏览文件 @
63187215
...
...
@@ -176,34 +176,10 @@ nv50_mem_vm_bind_linear(struct drm_device *dev, uint64_t virt, uint32_t size,
}
dev_priv
->
engine
.
instmem
.
flush
(
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
-
EBUSY
;
}
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
));
return
-
EBUSY
;
}
nv_wr32
(
dev
,
0x100c80
,
0x00040001
);
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
-
EBUSY
;
}
nv_wr32
(
dev
,
0x100c80
,
0x00060001
);
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
-
EBUSY
;
}
nv50_vm_flush
(
dev
,
5
);
nv50_vm_flush
(
dev
,
0
);
nv50_vm_flush
(
dev
,
4
);
nv50_vm_flush
(
dev
,
6
);
return
0
;
}
...
...
@@ -232,32 +208,10 @@ nv50_mem_vm_unbind(struct drm_device *dev, uint64_t virt, uint32_t size)
}
dev_priv
->
engine
.
instmem
.
flush
(
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
));
return
;
}
nv_wr32
(
dev
,
0x100c80
,
0x00040001
);
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
,
0x00060001
);
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
));
}
nv50_vm_flush
(
dev
,
5
);
nv50_vm_flush
(
dev
,
0
);
nv50_vm_flush
(
dev
,
4
);
nv50_vm_flush
(
dev
,
6
);
}
/*
...
...
drivers/gpu/drm/nouveau/nouveau_sgdma.c
浏览文件 @
63187215
...
...
@@ -118,21 +118,8 @@ nouveau_sgdma_bind(struct ttm_backend *be, struct ttm_mem_reg *mem)
dev_priv
->
engine
.
instmem
.
flush
(
nvbe
->
dev
);
if
(
dev_priv
->
card_type
==
NV_50
)
{
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
-
EBUSY
;
}
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
));
return
-
EBUSY
;
}
nv50_vm_flush
(
dev
,
5
);
/* PGRAPH */
nv50_vm_flush
(
dev
,
0
);
/* PFIFO */
}
nvbe
->
bound
=
true
;
...
...
@@ -171,21 +158,8 @@ nouveau_sgdma_unbind(struct ttm_backend *be)
dev_priv
->
engine
.
instmem
.
flush
(
nvbe
->
dev
);
if
(
dev_priv
->
card_type
==
NV_50
)
{
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
-
EBUSY
;
}
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
));
return
-
EBUSY
;
}
nv50_vm_flush
(
dev
,
5
);
nv50_vm_flush
(
dev
,
0
);
}
nvbe
->
bound
=
false
;
...
...
drivers/gpu/drm/nouveau/nv50_instmem.c
浏览文件 @
63187215
...
...
@@ -453,19 +453,8 @@ nv50_instmem_bind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj)
}
dev_priv
->
engine
.
instmem
.
flush
(
dev
);
nv_wr32
(
dev
,
0x100c80
,
0x00040001
);
if
(
!
nv_wait
(
0x100c80
,
0x00000001
,
0x00000000
))
{
NV_ERROR
(
dev
,
"timeout: (0x100c80 & 1) == 0 (1)
\n
"
);
NV_ERROR
(
dev
,
"0x100c80 = 0x%08x
\n
"
,
nv_rd32
(
dev
,
0x100c80
));
return
-
EBUSY
;
}
nv_wr32
(
dev
,
0x100c80
,
0x00060001
);
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
-
EBUSY
;
}
nv50_vm_flush
(
dev
,
4
);
nv50_vm_flush
(
dev
,
6
);
gpuobj
->
im_bound
=
1
;
return
0
;
...
...
@@ -502,3 +491,11 @@ nv50_instmem_flush(struct drm_device *dev)
NV_ERROR
(
dev
,
"PRAMIN flush timeout
\n
"
);
}
void
nv50_vm_flush
(
struct
drm_device
*
dev
,
int
engine
)
{
nv_wr32
(
dev
,
0x100c80
,
(
engine
<<
16
)
|
1
);
if
(
!
nv_wait
(
0x100c80
,
0x00000001
,
0x00000000
))
NV_ERROR
(
dev
,
"vm flush timeout: engine %d
\n
"
,
engine
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录