Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
083c2142
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
170
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看板
提交
083c2142
编写于
2月 22, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nvc0/fifo: ack pb intr individually after handling each unit
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
a07d0e76
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
40 addition
and
42 deletion
+40
-42
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
+40
-42
未找到文件。
drivers/gpu/drm/nouveau/core/engine/fifo/nvc0.c
浏览文件 @
083c2142
...
@@ -345,6 +345,32 @@ nvc0_fifo_cclass = {
...
@@ -345,6 +345,32 @@ nvc0_fifo_cclass = {
* PFIFO engine
* PFIFO engine
******************************************************************************/
******************************************************************************/
static
int
nvc0_fifo_swmthd
(
struct
nvc0_fifo_priv
*
priv
,
u32
chid
,
u32
mthd
,
u32
data
)
{
struct
nvc0_fifo_chan
*
chan
=
NULL
;
struct
nouveau_handle
*
bind
;
unsigned
long
flags
;
int
ret
=
-
EINVAL
;
spin_lock_irqsave
(
&
priv
->
base
.
lock
,
flags
);
if
(
likely
(
chid
>=
priv
->
base
.
min
&&
chid
<=
priv
->
base
.
max
))
chan
=
(
void
*
)
priv
->
base
.
channel
[
chid
];
if
(
unlikely
(
!
chan
))
goto
out
;
bind
=
nouveau_namedb_get_class
(
nv_namedb
(
chan
),
0x906e
);
if
(
likely
(
bind
))
{
if
(
!
mthd
||
!
nv_call
(
bind
->
object
,
mthd
,
data
))
ret
=
0
;
nouveau_namedb_put
(
bind
);
}
out:
spin_unlock_irqrestore
(
&
priv
->
base
.
lock
,
flags
);
return
ret
;
}
static
const
struct
nouveau_enum
nvc0_fifo_fault_unit
[]
=
{
static
const
struct
nouveau_enum
nvc0_fifo_fault_unit
[]
=
{
{
0x00
,
"PGRAPH"
,
NULL
,
NVDEV_ENGINE_GR
},
{
0x00
,
"PGRAPH"
,
NULL
,
NVDEV_ENGINE_GR
},
{
0x03
,
"PEEPHOLE"
},
{
0x03
,
"PEEPHOLE"
},
...
@@ -400,13 +426,6 @@ static const struct nouveau_enum nvc0_fifo_fault_gpcclient[] = {
...
@@ -400,13 +426,6 @@ static const struct nouveau_enum nvc0_fifo_fault_gpcclient[] = {
{}
{}
};
};
static
const
struct
nouveau_bitfield
nvc0_fifo_pbdma_intr
[]
=
{
/* { 0x00008000, "" } seen with null ib push */
{
0x00200000
,
"ILLEGAL_MTHD"
},
{
0x00800000
,
"EMPTY_SUBC"
},
{}
};
static
void
static
void
nvc0_fifo_isr_vm_fault
(
struct
nvc0_fifo_priv
*
priv
,
int
unit
)
nvc0_fifo_isr_vm_fault
(
struct
nvc0_fifo_priv
*
priv
,
int
unit
)
{
{
...
@@ -458,34 +477,16 @@ nvc0_fifo_isr_vm_fault(struct nvc0_fifo_priv *priv, int unit)
...
@@ -458,34 +477,16 @@ nvc0_fifo_isr_vm_fault(struct nvc0_fifo_priv *priv, int unit)
nouveau_engctx_put
(
engctx
);
nouveau_engctx_put
(
engctx
);
}
}
static
int
static
const
struct
nouveau_bitfield
nvc0_fifo_swmthd
(
struct
nvc0_fifo_priv
*
priv
,
u32
chid
,
u32
mthd
,
u32
data
)
nvc0_fifo_pbdma_intr
[]
=
{
{
/* { 0x00008000, "" } seen with null ib push */
struct
nvc0_fifo_chan
*
chan
=
NULL
;
{
0x00200000
,
"ILLEGAL_MTHD"
},
struct
nouveau_handle
*
bind
;
{
0x00800000
,
"EMPTY_SUBC"
},
unsigned
long
flags
;
{}
int
ret
=
-
EINVAL
;
};
spin_lock_irqsave
(
&
priv
->
base
.
lock
,
flags
);
if
(
likely
(
chid
>=
priv
->
base
.
min
&&
chid
<=
priv
->
base
.
max
))
chan
=
(
void
*
)
priv
->
base
.
channel
[
chid
];
if
(
unlikely
(
!
chan
))
goto
out
;
bind
=
nouveau_namedb_get_class
(
nv_namedb
(
chan
),
0x906e
);
if
(
likely
(
bind
))
{
if
(
!
mthd
||
!
nv_call
(
bind
->
object
,
mthd
,
data
))
ret
=
0
;
nouveau_namedb_put
(
bind
);
}
out:
spin_unlock_irqrestore
(
&
priv
->
base
.
lock
,
flags
);
return
ret
;
}
static
void
static
void
nvc0_fifo_i
sr_pbdma_intr
(
struct
nvc0_fifo_priv
*
priv
,
int
unit
)
nvc0_fifo_i
ntr_pbdma
(
struct
nvc0_fifo_priv
*
priv
,
int
unit
)
{
{
u32
stat
=
nv_rd32
(
priv
,
0x040108
+
(
unit
*
0x2000
));
u32
stat
=
nv_rd32
(
priv
,
0x040108
+
(
unit
*
0x2000
));
u32
addr
=
nv_rd32
(
priv
,
0x0400c0
+
(
unit
*
0x2000
));
u32
addr
=
nv_rd32
(
priv
,
0x0400c0
+
(
unit
*
0x2000
));
...
@@ -615,16 +616,13 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
...
@@ -615,16 +616,13 @@ nvc0_fifo_intr(struct nouveau_subdev *subdev)
}
}
if
(
stat
&
0x20000000
)
{
if
(
stat
&
0x20000000
)
{
u32
units
=
nv_rd32
(
priv
,
0x0025a0
);
u32
mask
=
nv_rd32
(
priv
,
0x0025a0
);
u32
u
=
units
;
while
(
mask
)
{
u32
unit
=
__ffs
(
mask
);
while
(
u
)
{
nvc0_fifo_intr_pbdma
(
priv
,
unit
);
int
i
=
__ffs
(
u
);
nv_wr32
(
priv
,
0x0025a0
,
(
1
<<
unit
));
nvc0_fifo_isr_pbdma_intr
(
priv
,
i
);
mask
&=
~
(
1
<<
unit
);
u
&=
~
(
1
<<
i
);
}
}
nv_wr32
(
priv
,
0x0025a0
,
units
);
stat
&=
~
0x20000000
;
stat
&=
~
0x20000000
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录