Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
9cbcd337
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看板
提交
9cbcd337
编写于
12月 04, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nvd0/therm: add support for hardware fan tachometer
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
7b49bd68
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
27 addition
and
2 deletion
+27
-2
drivers/gpu/drm/nouveau/core/subdev/therm/nva3.c
drivers/gpu/drm/nouveau/core/subdev/therm/nva3.c
+1
-1
drivers/gpu/drm/nouveau/core/subdev/therm/nvd0.c
drivers/gpu/drm/nouveau/core/subdev/therm/nvd0.c
+24
-1
drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
+2
-0
未找到文件。
drivers/gpu/drm/nouveau/core/subdev/therm/nva3.c
浏览文件 @
9cbcd337
...
...
@@ -30,7 +30,7 @@ struct nva3_therm_priv {
struct
nouveau_therm_priv
base
;
};
static
int
int
nva3_therm_fan_sense
(
struct
nouveau_therm
*
therm
)
{
u32
tach
=
nv_rd32
(
therm
,
0x00e728
)
&
0x0000ffff
;
...
...
drivers/gpu/drm/nouveau/core/subdev/therm/nvd0.c
浏览文件 @
9cbcd337
...
...
@@ -75,6 +75,28 @@ nvd0_fan_pwm_clock(struct nouveau_therm *therm)
return
(
nv_device
(
therm
)
->
crystal
*
1000
)
/
20
;
}
static
int
nvd0_therm_init
(
struct
nouveau_object
*
object
)
{
struct
nvd0_therm_priv
*
priv
=
(
void
*
)
object
;
int
ret
;
ret
=
nouveau_therm_init
(
&
priv
->
base
.
base
);
if
(
ret
)
return
ret
;
/* enable fan tach, count revolutions per-second */
nv_mask
(
priv
,
0x00e720
,
0x00000003
,
0x00000002
);
if
(
priv
->
base
.
fan
.
tach
.
func
!=
DCB_GPIO_UNUSED
)
{
nv_mask
(
priv
,
0x00d79c
,
0x000000ff
,
priv
->
base
.
fan
.
tach
.
line
);
nv_wr32
(
priv
,
0x00e724
,
nv_device
(
priv
)
->
crystal
*
1000
);
nv_mask
(
priv
,
0x00e720
,
0x00000001
,
0x00000001
);
}
nv_mask
(
priv
,
0x00e720
,
0x00000002
,
0x00000000
);
return
0
;
}
static
int
nvd0_therm_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
...
...
@@ -93,6 +115,7 @@ nvd0_therm_ctor(struct nouveau_object *parent,
priv
->
base
.
fan
.
pwm_set
=
nvd0_fan_pwm_set
;
priv
->
base
.
fan
.
pwm_clock
=
nvd0_fan_pwm_clock
;
priv
->
base
.
base
.
temp_get
=
nv50_temp_get
;
priv
->
base
.
base
.
fan_sense
=
nva3_therm_fan_sense
;
return
0
;
}
...
...
@@ -102,7 +125,7 @@ nvd0_therm_oclass = {
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nvd0_therm_ctor
,
.
dtor
=
_nouveau_therm_dtor
,
.
init
=
_nouveau
_therm_init
,
.
init
=
nvd0
_therm_init
,
.
fini
=
_nouveau_therm_fini
,
},
};
drivers/gpu/drm/nouveau/core/subdev/therm/priv.h
浏览文件 @
9cbcd337
...
...
@@ -80,4 +80,6 @@ int nv50_fan_pwm_set(struct nouveau_therm *, int, u32, u32);
int
nv50_fan_pwm_clock
(
struct
nouveau_therm
*
);
int
nv50_temp_get
(
struct
nouveau_therm
*
therm
);
int
nva3_therm_fan_sense
(
struct
nouveau_therm
*
);
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录