Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a07d0e76
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看板
提交
a07d0e76
编写于
2月 22, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nvc0/fifo: runlist intr
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
e99bf010
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
14 deletion
+32
-14
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
+32
-14
未找到文件。
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
浏览文件 @
a07d0e76
...
@@ -41,8 +41,11 @@
...
@@ -41,8 +41,11 @@
struct
nvc0_fifo_priv
{
struct
nvc0_fifo_priv
{
struct
nouveau_fifo
base
;
struct
nouveau_fifo
base
;
struct
nouveau_gpuobj
*
runlist
[
2
];
struct
{
int
cur_runlist
;
struct
nouveau_gpuobj
*
mem
[
2
];
int
active
;
wait_queue_head_t
wait
;
}
runlist
;
struct
{
struct
{
struct
nouveau_gpuobj
*
mem
;
struct
nouveau_gpuobj
*
mem
;
struct
nouveau_vma
bar
;
struct
nouveau_vma
bar
;
...
@@ -72,8 +75,8 @@ nvc0_fifo_runlist_update(struct nvc0_fifo_priv *priv)
...
@@ -72,8 +75,8 @@ nvc0_fifo_runlist_update(struct nvc0_fifo_priv *priv)
int
i
,
p
;
int
i
,
p
;
mutex_lock
(
&
nv_subdev
(
priv
)
->
mutex
);
mutex_lock
(
&
nv_subdev
(
priv
)
->
mutex
);
cur
=
priv
->
runlist
[
priv
->
cur_runlist
];
cur
=
priv
->
runlist
.
mem
[
priv
->
runlist
.
active
];
priv
->
cur_runlist
=
!
priv
->
cur_runlist
;
priv
->
runlist
.
active
=
!
priv
->
runlist
.
active
;
for
(
i
=
0
,
p
=
0
;
i
<
128
;
i
++
)
{
for
(
i
=
0
,
p
=
0
;
i
<
128
;
i
++
)
{
if
(
!
(
nv_rd32
(
priv
,
0x003004
+
(
i
*
8
))
&
1
))
if
(
!
(
nv_rd32
(
priv
,
0x003004
+
(
i
*
8
))
&
1
))
...
@@ -512,6 +515,23 @@ nvc0_fifo_isr_pbdma_intr(struct nvc0_fifo_priv *priv, int unit)
...
@@ -512,6 +515,23 @@ nvc0_fifo_isr_pbdma_intr(struct nvc0_fifo_priv *priv, int unit)
nv_wr32
(
priv
,
0x040108
+
(
unit
*
0x2000
),
stat
);
nv_wr32
(
priv
,
0x040108
+
(
unit
*
0x2000
),
stat
);
}
}
static
void
nvc0_fifo_intr_runlist
(
struct
nvc0_fifo_priv
*
priv
)
{
u32
intr
=
nv_rd32
(
priv
,
0x002a00
);
if
(
intr
&
0x10000000
)
{
wake_up
(
&
priv
->
runlist
.
wait
);
nv_wr32
(
priv
,
0x002a00
,
0x10000000
);
intr
&=
~
0x10000000
;
}
if
(
intr
)
{
nv_error
(
priv
,
"RUNLIST 0x%08x
\n
"
,
intr
);
nv_wr32
(
priv
,
0x002a00
,
intr
);
}
}
static
void
static
void
nvc0_fifo_intr_engine_unit
(
struct
nvc0_fifo_priv
*
priv
,
int
engn
)
nvc0_fifo_intr_engine_unit
(
struct
nvc0_fifo_priv
*
priv
,
int
engn
)
{
{
...
@@ -609,10 +629,7 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
...
@@ -609,10 +629,7 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
}
}
if
(
stat
&
0x40000000
)
{
if
(
stat
&
0x40000000
)
{
u32
intr0
=
nv_rd32
(
priv
,
0x0025a4
);
nvc0_fifo_intr_runlist
(
priv
);
u32
intr1
=
nv_mask
(
priv
,
0x002a00
,
0x00000000
,
0x00000
);
nv_debug
(
priv
,
"INTR 0x40000000: 0x%08x 0x%08x
\n
"
,
intr0
,
intr1
);
stat
&=
~
0x40000000
;
stat
&=
~
0x40000000
;
}
}
...
@@ -656,15 +673,17 @@ nvc0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
...
@@ -656,15 +673,17 @@ nvc0_fifo_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
return
ret
;
return
ret
;
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0x1000
,
0
,
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0x1000
,
0
,
&
priv
->
runlist
[
0
]);
&
priv
->
runlist
.
mem
[
0
]);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0x1000
,
0
,
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
0x1000
,
0x1000
,
0
,
&
priv
->
runlist
[
1
]);
&
priv
->
runlist
.
mem
[
1
]);
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
init_waitqueue_head
(
&
priv
->
runlist
.
wait
);
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
128
*
0x1000
,
0x1000
,
0
,
ret
=
nouveau_gpuobj_new
(
nv_object
(
priv
),
NULL
,
128
*
0x1000
,
0x1000
,
0
,
&
priv
->
user
.
mem
);
&
priv
->
user
.
mem
);
if
(
ret
)
if
(
ret
)
...
@@ -693,8 +712,8 @@ nvc0_fifo_dtor(struct nouveau_object *object)
...
@@ -693,8 +712,8 @@ nvc0_fifo_dtor(struct nouveau_object *object)
nouveau_gpuobj_unmap
(
&
priv
->
user
.
bar
);
nouveau_gpuobj_unmap
(
&
priv
->
user
.
bar
);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
user
.
mem
);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
user
.
mem
);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
runlist
[
1
]);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
runlist
.
mem
[
0
]);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
runlist
[
0
]);
nouveau_gpuobj_ref
(
NULL
,
&
priv
->
runlist
.
mem
[
1
]);
nouveau_fifo_destroy
(
&
priv
->
base
);
nouveau_fifo_destroy
(
&
priv
->
base
);
}
}
...
@@ -735,9 +754,8 @@ nvc0_fifo_init(struct nouveau_object *object)
...
@@ -735,9 +754,8 @@ nvc0_fifo_init(struct nouveau_object *object)
nv_mask
(
priv
,
0x002200
,
0x00000001
,
0x00000001
);
nv_mask
(
priv
,
0x002200
,
0x00000001
,
0x00000001
);
nv_wr32
(
priv
,
0x002254
,
0x10000000
|
priv
->
user
.
bar
.
offset
>>
12
);
nv_wr32
(
priv
,
0x002254
,
0x10000000
|
priv
->
user
.
bar
.
offset
>>
12
);
nv_wr32
(
priv
,
0x002a00
,
0xffffffff
);
/* clears PFIFO.INTR bit 30 */
nv_wr32
(
priv
,
0x002100
,
0xffffffff
);
nv_wr32
(
priv
,
0x002100
,
0xffffffff
);
nv_wr32
(
priv
,
0x002140
,
0x
3
fffffff
);
nv_wr32
(
priv
,
0x002140
,
0x
7
fffffff
);
nv_wr32
(
priv
,
0x002628
,
0x00000001
);
/* ENGINE_INTR_EN */
nv_wr32
(
priv
,
0x002628
,
0x00000001
);
/* ENGINE_INTR_EN */
return
0
;
return
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录