Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
87032e11
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
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看板
提交
87032e11
编写于
2月 23, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nve0/fifo: allow channels to be marked as unrunnable
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
0a7760e0
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
24 addition
and
13 deletion
+24
-13
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
+24
-13
未找到文件。
drivers/gpu/drm/nouveau/core/engine/fifo/nve0.c
浏览文件 @
87032e11
...
...
@@ -82,6 +82,11 @@ struct nve0_fifo_base {
struct
nve0_fifo_chan
{
struct
nouveau_fifo_chan
base
;
u32
engine
;
enum
{
STOPPED
,
RUNNING
,
KILLED
}
state
;
};
/*******************************************************************************
...
...
@@ -94,7 +99,6 @@ nve0_fifo_runlist_update(struct nve0_fifo_priv *priv, u32 engine)
struct
nouveau_bar
*
bar
=
nouveau_bar
(
priv
);
struct
nve0_fifo_engn
*
engn
=
&
priv
->
engine
[
engine
];
struct
nouveau_gpuobj
*
cur
;
u32
match
=
(
engine
<<
16
)
|
0x00000001
;
int
i
,
p
;
mutex_lock
(
&
nv_subdev
(
priv
)
->
mutex
);
...
...
@@ -102,17 +106,18 @@ nve0_fifo_runlist_update(struct nve0_fifo_priv *priv, u32 engine)
engn
->
cur_runlist
=
!
engn
->
cur_runlist
;
for
(
i
=
0
,
p
=
0
;
i
<
priv
->
base
.
max
;
i
++
)
{
u32
ctrl
=
nv_rd32
(
priv
,
0x800004
+
(
i
*
8
))
&
0x001f0001
;
if
(
c
trl
!=
match
)
continue
;
nv_wo32
(
cur
,
p
+
0
,
i
);
nv_wo32
(
cur
,
p
+
4
,
0x00000000
)
;
p
+=
8
;
struct
nve0_fifo_chan
*
chan
=
(
void
*
)
priv
->
base
.
channel
[
i
]
;
if
(
c
han
&&
chan
->
state
==
RUNNING
&&
chan
->
engine
==
engine
)
{
nv_wo32
(
cur
,
p
+
0
,
i
)
;
nv_wo32
(
cur
,
p
+
4
,
0x00000000
);
p
+=
8
;
}
}
bar
->
flush
(
bar
);
nv_wr32
(
priv
,
0x002270
,
cur
->
addr
>>
12
);
nv_wr32
(
priv
,
0x002274
,
(
engine
<<
20
)
|
(
p
>>
3
));
if
(
!
nv_wait
(
priv
,
0x002284
+
(
engine
*
8
),
0x00100000
,
0x00000000
))
nv_error
(
priv
,
"runlist %d update timeout
\n
"
,
engine
);
mutex_unlock
(
&
nv_subdev
(
priv
)
->
mutex
);
...
...
@@ -280,9 +285,13 @@ nve0_fifo_chan_init(struct nouveau_object *object)
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x000f0000
,
chan
->
engine
<<
16
);
nv_wr32
(
priv
,
0x800000
+
(
chid
*
8
),
0x80000000
|
base
->
addr
>>
12
);
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000400
,
0x00000400
);
nve0_fifo_runlist_update
(
priv
,
chan
->
engine
);
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000400
,
0x00000400
);
if
(
chan
->
state
==
STOPPED
&&
(
chan
->
state
=
RUNNING
)
==
RUNNING
)
{
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000400
,
0x00000400
);
nve0_fifo_runlist_update
(
priv
,
chan
->
engine
);
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000400
,
0x00000400
);
}
return
0
;
}
...
...
@@ -293,10 +302,12 @@ nve0_fifo_chan_fini(struct nouveau_object *object, bool suspend)
struct
nve0_fifo_chan
*
chan
=
(
void
*
)
object
;
u32
chid
=
chan
->
base
.
chid
;
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000800
,
0x00000800
);
nve0_fifo_runlist_update
(
priv
,
chan
->
engine
);
nv_wr32
(
priv
,
0x800000
+
(
chid
*
8
),
0x00000000
);
if
(
chan
->
state
==
RUNNING
&&
(
chan
->
state
=
STOPPED
)
==
STOPPED
)
{
nv_mask
(
priv
,
0x800004
+
(
chid
*
8
),
0x00000800
,
0x00000800
);
nve0_fifo_runlist_update
(
priv
,
chan
->
engine
);
}
nv_wr32
(
priv
,
0x800000
+
(
chid
*
8
),
0x00000000
);
return
nouveau_fifo_channel_fini
(
&
chan
->
base
,
suspend
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录