Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
3534821d
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看板
提交
3534821d
编写于
1月 18, 2017
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fifo/gk104-: directly use new recovery code for mmu faults
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
eaa5ed65
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
8 deletion
+37
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
+14
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+20
-4
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
+3
-0
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
浏览文件 @
3534821d
...
...
@@ -66,19 +66,29 @@ nvkm_fifo_chan_put(struct nvkm_fifo *fifo, unsigned long flags,
}
struct
nvkm_fifo_chan
*
nvkm_fifo_chan_inst
(
struct
nvkm_fifo
*
fifo
,
u64
inst
,
unsigned
long
*
rflags
)
nvkm_fifo_chan_inst
_locked
(
struct
nvkm_fifo
*
fifo
,
u64
inst
)
{
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
fifo
->
lock
,
flags
);
list_for_each_entry
(
chan
,
&
fifo
->
chan
,
head
)
{
if
(
chan
->
inst
->
addr
==
inst
)
{
list_del
(
&
chan
->
head
);
list_add
(
&
chan
->
head
,
&
fifo
->
chan
);
*
rflags
=
flags
;
return
chan
;
}
}
return
NULL
;
}
struct
nvkm_fifo_chan
*
nvkm_fifo_chan_inst
(
struct
nvkm_fifo
*
fifo
,
u64
inst
,
unsigned
long
*
rflags
)
{
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
fifo
->
lock
,
flags
);
if
((
chan
=
nvkm_fifo_chan_inst_locked
(
fifo
,
inst
)))
{
*
rflags
=
flags
;
return
chan
;
}
spin_unlock_irqrestore
(
&
fifo
->
lock
,
flags
);
return
NULL
;
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
3534821d
...
...
@@ -435,6 +435,7 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
char
gpcid
[
8
]
=
""
,
en
[
16
]
=
""
;
int
engn
;
er
=
nvkm_enum_find
(
fifo
->
func
->
fault
.
reason
,
reason
);
eu
=
nvkm_enum_find
(
fifo
->
func
->
fault
.
engine
,
unit
);
...
...
@@ -476,7 +477,8 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
snprintf
(
en
,
sizeof
(
en
),
"%s"
,
eu
->
name
);
}
chan
=
nvkm_fifo_chan_inst
(
&
fifo
->
base
,
(
u64
)
inst
<<
12
,
&
flags
);
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
chan
=
nvkm_fifo_chan_inst_locked
(
&
fifo
->
base
,
(
u64
)
inst
<<
12
);
nvkm_error
(
subdev
,
"%s fault at %010llx engine %02x [%s] client %02x [%s%s] "
...
...
@@ -487,9 +489,23 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
(
u64
)
inst
<<
12
,
chan
?
chan
->
object
.
client
->
name
:
"unknown"
);
if
(
engine
&&
chan
)
gk104_fifo_recover
(
fifo
,
engine
,
(
void
*
)
chan
);
nvkm_fifo_chan_put
(
&
fifo
->
base
,
flags
,
&
chan
);
/* Kill the channel that caused the fault. */
if
(
chan
)
gk104_fifo_recover_chan
(
&
fifo
->
base
,
chan
->
chid
);
/* Channel recovery will probably have already done this for the
* correct engine(s), but just in case we can't find the channel
* information...
*/
for
(
engn
=
0
;
engn
<
fifo
->
engine_nr
&&
engine
;
engn
++
)
{
if
(
fifo
->
engine
[
engn
].
engine
==
engine
)
{
gk104_fifo_recover_engn
(
fifo
,
engn
);
break
;
}
}
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
}
static
const
struct
nvkm_bitfield
gk104_fifo_pbdma_intr_0
[]
=
{
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
浏览文件 @
3534821d
...
...
@@ -10,6 +10,9 @@ void nvkm_fifo_cevent(struct nvkm_fifo *);
void
nvkm_fifo_kevent
(
struct
nvkm_fifo
*
,
int
chid
);
void
nvkm_fifo_recover_chan
(
struct
nvkm_fifo
*
,
int
chid
);
struct
nvkm_fifo_chan
*
nvkm_fifo_chan_inst_locked
(
struct
nvkm_fifo
*
,
u64
inst
);
struct
nvkm_fifo_chan_oclass
;
struct
nvkm_fifo_func
{
void
*
(
*
dtor
)(
struct
nvkm_fifo
*
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录