Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
6d39b83f
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
6d39b83f
编写于
3月 11, 2016
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fifo/gk104: rename spoon to pbdma, and move detection to oneinit
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
1015d811
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
10 deletion
+14
-10
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+12
-9
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
+2
-1
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
6d39b83f
...
...
@@ -660,9 +660,15 @@ int
gk104_fifo_oneinit
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_subdev
*
subdev
=
&
fifo
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
int
ret
,
i
;
/* Determine number of PBDMAs by checking valid enable bits. */
nvkm_wr32
(
device
,
0x000204
,
0xffffffff
);
fifo
->
pbdma_nr
=
hweight32
(
nvkm_rd32
(
device
,
0x000204
));
nvkm_debug
(
subdev
,
"%d PBDMA(s)
\n
"
,
fifo
->
pbdma_nr
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
fifo
->
engine
);
i
++
)
{
ret
=
nvkm_memory_new
(
device
,
NVKM_MEM_TARGET_INST
,
0x8000
,
0x1000
,
false
,
...
...
@@ -699,24 +705,21 @@ void
gk104_fifo_init
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
struct
nvkm_subdev
*
subdev
=
&
fifo
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
int
i
;
/* enable all available PBDMA units */
nvkm_wr32
(
device
,
0x000204
,
0xffffffff
);
fifo
->
spoon_nr
=
hweight32
(
nvkm_rd32
(
device
,
0x000204
));
nvkm_debug
(
subdev
,
"%d PBDMA unit(s)
\n
"
,
fifo
->
spoon_nr
);
/* Enable PBDMAs. */
nvkm_wr32
(
device
,
0x000204
,
(
1
<<
fifo
->
pbdma_nr
)
-
1
);
/* PBDMA[n] */
for
(
i
=
0
;
i
<
fifo
->
spoon
_nr
;
i
++
)
{
for
(
i
=
0
;
i
<
fifo
->
pbdma
_nr
;
i
++
)
{
nvkm_mask
(
device
,
0x04013c
+
(
i
*
0x2000
),
0x10000100
,
0x00000000
);
nvkm_wr32
(
device
,
0x040108
+
(
i
*
0x2000
),
0xffffffff
);
/* INTR */
nvkm_wr32
(
device
,
0x04010c
+
(
i
*
0x2000
),
0xfffffeff
);
/* INTREN */
}
/* PBDMA[n].HCE */
for
(
i
=
0
;
i
<
fifo
->
spoon
_nr
;
i
++
)
{
for
(
i
=
0
;
i
<
fifo
->
pbdma
_nr
;
i
++
)
{
nvkm_wr32
(
device
,
0x040148
+
(
i
*
0x2000
),
0xffffffff
);
/* INTR */
nvkm_wr32
(
device
,
0x04014c
+
(
i
*
0x2000
),
0xffffffff
);
/* INTREN */
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
浏览文件 @
6d39b83f
...
...
@@ -19,12 +19,13 @@ struct gk104_fifo {
struct
work_struct
fault
;
u64
mask
;
int
pbdma_nr
;
struct
gk104_fifo_engn
engine
[
7
];
struct
{
struct
nvkm_memory
*
mem
;
struct
nvkm_vma
bar
;
}
user
;
int
spoon_nr
;
};
int
gk104_fifo_new_
(
const
struct
nvkm_fifo_func
*
,
struct
nvkm_device
*
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录