Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
6ca307b0
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看板
提交
6ca307b0
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fifo: remove dependence on namedb/engctx lookup
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
35acf3d7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
41 deletion
+28
-41
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
+14
-20
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+14
-21
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c
浏览文件 @
6ca307b0
...
...
@@ -462,17 +462,15 @@ gf100_fifo_recover(struct gf100_fifo *fifo, struct nvkm_engine *engine,
struct
nvkm_subdev
*
subdev
=
&
fifo
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
chid
=
chan
->
base
.
chid
;
unsigned
long
flags
;
nvkm_error
(
subdev
,
"%s engine fault on channel %d, recovering...
\n
"
,
nvkm_subdev_name
[
engine
->
subdev
.
index
],
chid
);
assert_spin_locked
(
&
fifo
->
base
.
lock
);
nvkm_mask
(
device
,
0x003004
+
(
chid
*
0x08
),
0x00000001
,
0x00000000
);
chan
->
state
=
KILLED
;
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
fifo
->
mask
|=
1ULL
<<
nv_engidx
(
engine
);
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
schedule_work
(
&
fifo
->
fault
);
}
...
...
@@ -514,8 +512,10 @@ gf100_fifo_intr_sched_ctxsw(struct gf100_fifo *fifo)
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_engine
*
engine
;
struct
gf100_fifo_chan
*
chan
;
unsigned
long
flags
;
u32
engn
;
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
for
(
engn
=
0
;
engn
<
6
;
engn
++
)
{
u32
stat
=
nvkm_rd32
(
device
,
0x002640
+
(
engn
*
0x04
));
u32
busy
=
(
stat
&
0x80000000
);
...
...
@@ -533,6 +533,7 @@ gf100_fifo_intr_sched_ctxsw(struct gf100_fifo *fifo)
gf100_fifo_recover
(
fifo
,
engine
,
chan
);
}
}
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
}
static
void
...
...
@@ -630,9 +631,10 @@ gf100_fifo_intr_fault(struct gf100_fifo *fifo, int unit)
u32
write
=
(
stat
&
0x00000080
);
u32
hub
=
(
stat
&
0x00000040
);
u32
reason
=
(
stat
&
0x0000000f
);
struct
nvkm_object
*
engctx
=
NULL
,
*
object
;
struct
nvkm_engine
*
engine
=
NULL
;
const
struct
nvkm_enum
*
er
,
*
eu
,
*
ec
;
struct
nvkm_engine
*
engine
=
NULL
;
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
char
gpcid
[
8
]
=
""
;
er
=
nvkm_enum_find
(
gf100_fifo_fault_reason
,
reason
);
...
...
@@ -657,31 +659,23 @@ gf100_fifo_intr_fault(struct gf100_fifo *fifo, int unit)
break
;
default:
engine
=
nvkm_engine
(
fifo
,
eu
->
data2
);
if
(
engine
)
engctx
=
nvkm_engctx_get
(
engine
,
inst
);
break
;
}
}
chan
=
nvkm_fifo_chan_inst
(
&
fifo
->
base
,
(
u64
)
inst
<<
12
,
&
flags
);
nvkm_error
(
subdev
,
"%s fault at %010llx engine %02x [%s] client %02x [%s%s] "
"reason %02x [%s] on channel %d [%010llx %s]
\n
"
,
write
?
"write"
:
"read"
,
(
u64
)
vahi
<<
32
|
valo
,
unit
,
eu
?
eu
->
name
:
""
,
client
,
gpcid
,
ec
?
ec
->
name
:
""
,
reason
,
er
?
er
->
name
:
""
,
-
1
,
(
u64
)
inst
<<
12
,
nvkm_client_name
(
engctx
));
object
=
engctx
;
while
(
object
)
{
switch
(
nv_mclass
(
object
))
{
case
FERMI_CHANNEL_GPFIFO
:
gf100_fifo_recover
(
fifo
,
engine
,
(
void
*
)
object
);
break
;
}
object
=
object
->
parent
;
}
reason
,
er
?
er
->
name
:
""
,
chan
?
chan
->
chid
:
-
1
,
(
u64
)
inst
<<
12
,
nvkm_client_name
(
chan
));
nvkm_engctx_put
(
engctx
);
if
(
engine
&&
chan
)
gf100_fifo_recover
(
fifo
,
engine
,
(
void
*
)
chan
);
nvkm_fifo_chan_put
(
&
fifo
->
base
,
flags
,
&
chan
);
}
static
const
struct
nvkm_bitfield
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
6ca307b0
...
...
@@ -508,17 +508,15 @@ gk104_fifo_recover(struct gk104_fifo *fifo, struct nvkm_engine *engine,
struct
nvkm_subdev
*
subdev
=
&
fifo
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
u32
chid
=
chan
->
base
.
chid
;
unsigned
long
flags
;
nvkm_error
(
subdev
,
"%s engine fault on channel %d, recovering...
\n
"
,
nvkm_subdev_name
[
nv_subdev
(
engine
)
->
index
],
chid
);
assert_spin_locked
(
&
fifo
->
base
.
lock
);
nvkm_mask
(
device
,
0x800004
+
(
chid
*
0x08
),
0x00000800
,
0x00000800
);
chan
->
state
=
KILLED
;
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
fifo
->
mask
|=
1ULL
<<
nv_engidx
(
engine
);
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
schedule_work
(
&
fifo
->
fault
);
}
...
...
@@ -584,8 +582,10 @@ gk104_fifo_intr_sched_ctxsw(struct gk104_fifo *fifo)
struct
nvkm_device
*
device
=
fifo
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_engine
*
engine
;
struct
gk104_fifo_chan
*
chan
;
unsigned
long
flags
;
u32
engn
;
spin_lock_irqsave
(
&
fifo
->
base
.
lock
,
flags
);
for
(
engn
=
0
;
engn
<
ARRAY_SIZE
(
fifo_engine
);
engn
++
)
{
u32
stat
=
nvkm_rd32
(
device
,
0x002640
+
(
engn
*
0x04
));
u32
busy
=
(
stat
&
0x80000000
);
...
...
@@ -605,6 +605,7 @@ gk104_fifo_intr_sched_ctxsw(struct gk104_fifo *fifo)
gk104_fifo_recover
(
fifo
,
engine
,
chan
);
}
}
spin_unlock_irqrestore
(
&
fifo
->
base
.
lock
,
flags
);
}
static
void
...
...
@@ -766,9 +767,10 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
u32
write
=
(
stat
&
0x00000080
);
u32
hub
=
(
stat
&
0x00000040
);
u32
reason
=
(
stat
&
0x0000000f
);
struct
nvkm_object
*
engctx
=
NULL
,
*
object
;
struct
nvkm_engine
*
engine
=
NULL
;
const
struct
nvkm_enum
*
er
,
*
eu
,
*
ec
;
struct
nvkm_engine
*
engine
=
NULL
;
struct
nvkm_fifo_chan
*
chan
;
unsigned
long
flags
;
char
gpcid
[
8
]
=
""
;
er
=
nvkm_enum_find
(
gk104_fifo_fault_reason
,
reason
);
...
...
@@ -793,32 +795,23 @@ gk104_fifo_intr_fault(struct gk104_fifo *fifo, int unit)
break
;
default:
engine
=
nvkm_engine
(
fifo
,
eu
->
data2
);
if
(
engine
)
engctx
=
nvkm_engctx_get
(
engine
,
inst
);
break
;
}
}
chan
=
nvkm_fifo_chan_inst
(
&
fifo
->
base
,
(
u64
)
inst
<<
12
,
&
flags
);
nvkm_error
(
subdev
,
"%s fault at %010llx engine %02x [%s] client %02x [%s%s] "
"reason %02x [%s] on channel %d [%010llx %s]
\n
"
,
write
?
"write"
:
"read"
,
(
u64
)
vahi
<<
32
|
valo
,
unit
,
eu
?
eu
->
name
:
""
,
client
,
gpcid
,
ec
?
ec
->
name
:
""
,
reason
,
er
?
er
->
name
:
""
,
-
1
,
(
u64
)
inst
<<
12
,
nvkm_client_name
(
engctx
));
object
=
engctx
;
while
(
object
)
{
switch
(
nv_mclass
(
object
))
{
case
KEPLER_CHANNEL_GPFIFO_A
:
case
MAXWELL_CHANNEL_GPFIFO_A
:
gk104_fifo_recover
(
fifo
,
engine
,
(
void
*
)
object
);
break
;
}
object
=
object
->
parent
;
}
reason
,
er
?
er
->
name
:
""
,
chan
?
chan
->
chid
:
-
1
,
(
u64
)
inst
<<
12
,
nvkm_client_name
(
chan
));
nvkm_engctx_put
(
engctx
);
if
(
engine
&&
chan
)
gk104_fifo_recover
(
fifo
,
engine
,
(
void
*
)
chan
);
nvkm_fifo_chan_put
(
&
fifo
->
base
,
flags
,
&
chan
);
}
static
const
struct
nvkm_bitfield
gk104_fifo_pbdma_intr_0
[]
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录