Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
25e3a463
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看板
提交
25e3a463
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/mc: switch to device pri macros
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
99336ed3
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
28 addition
and
21 deletion
+28
-21
drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
+12
-8
drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c
+2
-2
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c
+3
-2
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv40.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv40.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv44.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv44.c
+7
-6
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c
+3
-2
未找到文件。
drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c
浏览文件 @
25e3a463
...
...
@@ -36,7 +36,8 @@ nvkm_mc_unk260(struct nvkm_mc *mc, u32 data)
static
inline
u32
nvkm_mc_intr_mask
(
struct
nvkm_mc
*
mc
)
{
u32
intr
=
nv_rd32
(
mc
,
0x000100
);
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
u32
intr
=
nvkm_rd32
(
device
,
0x000100
);
if
(
intr
==
0xffffffff
)
/* likely fallen off the bus */
intr
=
0x00000000
;
return
intr
;
...
...
@@ -46,13 +47,14 @@ static irqreturn_t
nvkm_mc_intr
(
int
irq
,
void
*
arg
)
{
struct
nvkm_mc
*
mc
=
arg
;
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
const
struct
nvkm_mc_oclass
*
oclass
=
(
void
*
)
nv_object
(
mc
)
->
oclass
;
const
struct
nvkm_mc_intr
*
map
=
oclass
->
intr
;
struct
nvkm_subdev
*
unit
;
u32
intr
;
nv
_wr32
(
mc
,
0x000140
,
0x00000000
);
nv
_rd32
(
mc
,
0x000140
);
nv
km_wr32
(
device
,
0x000140
,
0x00000000
);
nv
km_rd32
(
device
,
0x000140
);
intr
=
nvkm_mc_intr_mask
(
mc
);
if
(
mc
->
use_msi
)
oclass
->
msi_rearm
(
mc
);
...
...
@@ -73,7 +75,7 @@ nvkm_mc_intr(int irq, void *arg)
nv_error
(
mc
,
"unknown intr 0x%08x
\n
"
,
stat
);
}
nv
_wr32
(
mc
,
0x000140
,
0x00000001
);
nv
km_wr32
(
device
,
0x000140
,
0x00000001
);
return
intr
?
IRQ_HANDLED
:
IRQ_NONE
;
}
...
...
@@ -81,7 +83,8 @@ int
_nvkm_mc_fini
(
struct
nvkm_object
*
object
,
bool
suspend
)
{
struct
nvkm_mc
*
mc
=
(
void
*
)
object
;
nv_wr32
(
mc
,
0x000140
,
0x00000000
);
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
nvkm_wr32
(
device
,
0x000140
,
0x00000000
);
return
nvkm_subdev_fini
(
&
mc
->
subdev
,
suspend
);
}
...
...
@@ -89,18 +92,19 @@ int
_nvkm_mc_init
(
struct
nvkm_object
*
object
)
{
struct
nvkm_mc
*
mc
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
int
ret
=
nvkm_subdev_init
(
&
mc
->
subdev
);
if
(
ret
)
return
ret
;
nv
_wr32
(
mc
,
0x000140
,
0x00000001
);
nv
km_wr32
(
device
,
0x000140
,
0x00000001
);
return
0
;
}
void
_nvkm_mc_dtor
(
struct
nvkm_object
*
object
)
{
struct
nvkm_device
*
device
=
nv_device
(
object
);
struct
nvkm_mc
*
mc
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
free_irq
(
mc
->
irq
,
mc
);
if
(
mc
->
use_msi
)
pci_disable_msi
(
device
->
pdev
);
...
...
@@ -112,7 +116,7 @@ nvkm_mc_create_(struct nvkm_object *parent, struct nvkm_object *engine,
struct
nvkm_oclass
*
bclass
,
int
length
,
void
**
pobject
)
{
const
struct
nvkm_mc_oclass
*
oclass
=
(
void
*
)
bclass
;
struct
nvkm_device
*
device
=
nv_device
(
parent
)
;
struct
nvkm_device
*
device
=
(
void
*
)
parent
;
struct
nvkm_mc
*
mc
;
int
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/mc/gf100.c
浏览文件 @
25e3a463
...
...
@@ -51,13 +51,13 @@ gf100_mc_intr[] = {
static
void
gf100_mc_msi_rearm
(
struct
nvkm_mc
*
mc
)
{
nv
_wr32
(
mc
,
0x088704
,
0x00000000
);
nv
km_wr32
(
mc
->
subdev
.
device
,
0x088704
,
0x00000000
);
}
void
gf100_mc_unk260
(
struct
nvkm_mc
*
mc
,
u32
data
)
{
nv
_wr32
(
mc
,
0x000260
,
data
);
nv
km_wr32
(
mc
->
subdev
.
device
,
0x000260
,
data
);
}
struct
nvkm_oclass
*
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv04.c
浏览文件 @
25e3a463
...
...
@@ -42,9 +42,10 @@ int
nv04_mc_init
(
struct
nvkm_object
*
object
)
{
struct
nvkm_mc
*
mc
=
(
void
*
)
object
;
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
nv
_wr32
(
mc
,
0x000200
,
0xffffffff
);
/* everything enabled */
nv
_wr32
(
mc
,
0x001850
,
0x00000001
);
/* disable rom access */
nv
km_wr32
(
device
,
0x000200
,
0xffffffff
);
/* everything enabled */
nv
km_wr32
(
device
,
0x001850
,
0x00000001
);
/* disable rom access */
return
nvkm_mc_init
(
mc
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv40.c
浏览文件 @
25e3a463
...
...
@@ -26,7 +26,7 @@
void
nv40_mc_msi_rearm
(
struct
nvkm_mc
*
mc
)
{
nv
_wr08
(
mc
,
0x088068
,
0xff
);
nv
km_wr08
(
mc
->
subdev
.
device
,
0x088068
,
0xff
);
}
struct
nvkm_oclass
*
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv44.c
浏览文件 @
25e3a463
...
...
@@ -27,14 +27,15 @@ int
nv44_mc_init
(
struct
nvkm_object
*
object
)
{
struct
nvkm_mc
*
mc
=
(
void
*
)
object
;
u32
tmp
=
nv_rd32
(
mc
,
0x10020c
);
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
u32
tmp
=
nvkm_rd32
(
device
,
0x10020c
);
nv
_wr32
(
mc
,
0x000200
,
0xffffffff
);
/* everything enabled */
nv
km_wr32
(
device
,
0x000200
,
0xffffffff
);
/* everything enabled */
nv
_wr32
(
mc
,
0x001700
,
tmp
);
nv
_wr32
(
mc
,
0x001704
,
0
);
nv
_wr32
(
mc
,
0x001708
,
0
);
nv
_wr32
(
mc
,
0x00170c
,
tmp
);
nv
km_wr32
(
device
,
0x001700
,
tmp
);
nv
km_wr32
(
device
,
0x001704
,
0
);
nv
km_wr32
(
device
,
0x001708
,
0
);
nv
km_wr32
(
device
,
0x00170c
,
tmp
);
return
nvkm_mc_init
(
mc
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/mc/nv50.c
浏览文件 @
25e3a463
...
...
@@ -44,7 +44,7 @@ nv50_mc_intr[] = {
static
void
nv50_mc_msi_rearm
(
struct
nvkm_mc
*
mc
)
{
struct
nvkm_device
*
device
=
nv_device
(
mc
)
;
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
pci_write_config_byte
(
device
->
pdev
,
0x68
,
0xff
);
}
...
...
@@ -52,7 +52,8 @@ int
nv50_mc_init
(
struct
nvkm_object
*
object
)
{
struct
nvkm_mc
*
mc
=
(
void
*
)
object
;
nv_wr32
(
mc
,
0x000200
,
0xffffffff
);
/* everything on */
struct
nvkm_device
*
device
=
mc
->
subdev
.
device
;
nvkm_wr32
(
device
,
0x000200
,
0xffffffff
);
/* everything on */
return
nvkm_mc_init
(
mc
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录