Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
dd4bb3ec
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看板
提交
dd4bb3ec
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/pmu: switch to new-style timer macros
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
909604d4
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
32 addition
and
10 deletion
+32
-10
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
+21
-5
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c
+7
-4
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk110.c
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk110.c
+4
-1
未找到文件。
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/base.c
浏览文件 @
dd4bb3ec
...
...
@@ -43,7 +43,11 @@ nvkm_pmu_send(struct nvkm_pmu *pmu, u32 reply[2],
/* wait for a free slot in the fifo */
addr
=
nvkm_rd32
(
device
,
0x10a4a0
);
if
(
!
nv_wait_ne
(
pmu
,
0x10a4b0
,
0xffffffff
,
addr
^
8
))
if
(
nvkm_msec
(
device
,
2000
,
u32
tmp
=
nvkm_rd32
(
device
,
0x10a4b0
);
if
(
tmp
!=
(
addr
^
8
))
break
;
)
<
0
)
return
-
EBUSY
;
/* we currently only support a single process at a time waiting
...
...
@@ -203,11 +207,17 @@ _nvkm_pmu_init(struct nvkm_object *object)
/* prevent previous ucode from running, wait for idle, reset */
nvkm_wr32
(
device
,
0x10a014
,
0x0000ffff
);
/* INTR_EN_CLR = ALL */
nv_wait
(
pmu
,
0x10a04c
,
0xffffffff
,
0x00000000
);
nvkm_msec
(
device
,
2000
,
if
(
!
nvkm_rd32
(
device
,
0x10a04c
))
break
;
);
nvkm_mask
(
device
,
0x000200
,
0x00002000
,
0x00000000
);
nvkm_mask
(
device
,
0x000200
,
0x00002000
,
0x00002000
);
nvkm_rd32
(
device
,
0x000200
);
nv_wait
(
pmu
,
0x10a10c
,
0x00000006
,
0x00000000
);
nvkm_msec
(
device
,
2000
,
if
(
!
(
nvkm_rd32
(
device
,
0x10a10c
)
&
0x00000006
))
break
;
);
/* upload data segment */
nvkm_wr32
(
device
,
0x10a1c0
,
0x01000000
);
...
...
@@ -228,13 +238,19 @@ _nvkm_pmu_init(struct nvkm_object *object)
nvkm_wr32
(
device
,
0x10a100
,
0x00000002
);
/* wait for valid host->pmu ring configuration */
if
(
!
nv_wait_ne
(
pmu
,
0x10a4d0
,
0xffffffff
,
0x00000000
))
if
(
nvkm_msec
(
device
,
2000
,
if
(
nvkm_rd32
(
device
,
0x10a4d0
))
break
;
)
<
0
)
return
-
EBUSY
;
pmu
->
send
.
base
=
nvkm_rd32
(
device
,
0x10a4d0
)
&
0x0000ffff
;
pmu
->
send
.
size
=
nvkm_rd32
(
device
,
0x10a4d0
)
>>
16
;
/* wait for valid pmu->host ring configuration */
if
(
!
nv_wait_ne
(
pmu
,
0x10a4dc
,
0xffffffff
,
0x00000000
))
if
(
nvkm_msec
(
device
,
2000
,
if
(
nvkm_rd32
(
device
,
0x10a4dc
))
break
;
)
<
0
)
return
-
EBUSY
;
pmu
->
recv
.
base
=
nvkm_rd32
(
device
,
0x10a4dc
)
&
0x0000ffff
;
pmu
->
recv
.
size
=
nvkm_rd32
(
device
,
0x10a4dc
)
>>
16
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk104.c
浏览文件 @
dd4bb3ec
...
...
@@ -36,10 +36,13 @@ magic_(struct nvkm_device *device, u32 ctrl, int size)
nvkm_wr32
(
device
,
0x00c800
,
0x00000000
);
nvkm_wr32
(
device
,
0x00c808
,
0x00000000
);
nvkm_wr32
(
device
,
0x00c800
,
ctrl
);
if
(
nv_wait
(
device
,
0x00c800
,
0x40000000
,
0x40000000
))
{
while
(
size
--
)
nvkm_wr32
(
device
,
0x00c804
,
0x00000000
);
}
nvkm_msec
(
device
,
2000
,
if
(
nvkm_rd32
(
device
,
0x00c800
)
&
0x40000000
)
{
while
(
size
--
)
nvkm_wr32
(
device
,
0x00c804
,
0x00000000
);
break
;
}
);
nvkm_wr32
(
device
,
0x00c800
,
0x00000000
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gk110.c
浏览文件 @
dd4bb3ec
...
...
@@ -67,7 +67,10 @@ gk110_pmu_pgob(struct nvkm_pmu *pmu, bool enable)
nvkm_mask
(
device
,
0x0206b4
,
0x00000000
,
0x00000000
);
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
magic
);
i
++
)
{
nvkm_wr32
(
device
,
magic
[
i
].
addr
,
magic
[
i
].
data
);
nv_wait
(
pmu
,
magic
[
i
].
addr
,
0x80000000
,
0x00000000
);
nvkm_msec
(
device
,
2000
,
if
(
!
(
nvkm_rd32
(
device
,
magic
[
i
].
addr
)
&
0x80000000
))
break
;
);
}
nvkm_mask
(
device
,
0x10a78c
,
0x00000002
,
0x00000000
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录