Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
ff2b6c6e
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
ff2b6c6e
编写于
10月 27, 2011
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/pm: remove the older interfaces completely
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
36f1317e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
10 addition
and
60 deletion
+10
-60
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+0
-5
drivers/gpu/drm/nouveau/nouveau_pm.c
drivers/gpu/drm/nouveau/nouveau_pm.c
+8
-54
drivers/gpu/drm/nouveau/nv04_timer.c
drivers/gpu/drm/nouveau/nv04_timer.c
+2
-1
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
ff2b6c6e
...
...
@@ -549,11 +549,6 @@ struct nouveau_pm_engine {
struct
device
*
hwmon
;
struct
notifier_block
acpi_nb
;
int
(
*
clock_get
)(
struct
drm_device
*
,
u32
id
);
void
*
(
*
clock_pre
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
,
u32
id
,
int
khz
);
void
(
*
clock_set
)(
struct
drm_device
*
,
void
*
);
int
(
*
clocks_get
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
);
void
*
(
*
clocks_pre
)(
struct
drm_device
*
,
struct
nouveau_pm_level
*
);
int
(
*
clocks_set
)(
struct
drm_device
*
,
void
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_pm.c
浏览文件 @
ff2b6c6e
...
...
@@ -96,31 +96,12 @@ nouveau_pwmfan_set(struct drm_device *dev, int percent)
return
-
ENODEV
;
}
static
int
nouveau_pm_clock_set
(
struct
drm_device
*
dev
,
struct
nouveau_pm_level
*
perflvl
,
u8
id
,
u32
khz
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_pm_engine
*
pm
=
&
dev_priv
->
engine
.
pm
;
void
*
pre_state
;
if
(
khz
==
0
)
return
0
;
pre_state
=
pm
->
clock_pre
(
dev
,
perflvl
,
id
,
khz
);
if
(
IS_ERR
(
pre_state
))
return
PTR_ERR
(
pre_state
);
if
(
pre_state
)
pm
->
clock_set
(
dev
,
pre_state
);
return
0
;
}
static
int
nouveau_pm_perflvl_set
(
struct
drm_device
*
dev
,
struct
nouveau_pm_level
*
perflvl
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_pm_engine
*
pm
=
&
dev_priv
->
engine
.
pm
;
void
*
state
;
int
ret
;
if
(
perflvl
==
pm
->
cur
)
...
...
@@ -144,18 +125,10 @@ nouveau_pm_perflvl_set(struct drm_device *dev, struct nouveau_pm_level *perflvl)
}
}
if
(
pm
->
clocks_pre
)
{
void
*
state
=
pm
->
clocks_pre
(
dev
,
perflvl
);
if
(
IS_ERR
(
state
))
return
PTR_ERR
(
state
);
pm
->
clocks_set
(
dev
,
state
);
}
else
if
(
pm
->
clock_set
)
{
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_CORE
,
perflvl
->
core
);
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_SHADER
,
perflvl
->
shader
);
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_MEMORY
,
perflvl
->
memory
);
nouveau_pm_clock_set
(
dev
,
perflvl
,
PLL_VDEC
,
perflvl
->
vdec
);
}
state
=
pm
->
clocks_pre
(
dev
,
perflvl
);
if
(
IS_ERR
(
state
))
return
PTR_ERR
(
state
);
pm
->
clocks_set
(
dev
,
state
);
pm
->
cur
=
perflvl
;
return
0
;
...
...
@@ -202,28 +175,9 @@ nouveau_pm_perflvl_get(struct drm_device *dev, struct nouveau_pm_level *perflvl)
memset
(
perflvl
,
0
,
sizeof
(
*
perflvl
));
if
(
pm
->
clocks_get
)
{
ret
=
pm
->
clocks_get
(
dev
,
perflvl
);
if
(
ret
)
return
ret
;
}
else
if
(
pm
->
clock_get
)
{
ret
=
pm
->
clock_get
(
dev
,
PLL_CORE
);
if
(
ret
>
0
)
perflvl
->
core
=
ret
;
ret
=
pm
->
clock_get
(
dev
,
PLL_MEMORY
);
if
(
ret
>
0
)
perflvl
->
memory
=
ret
;
ret
=
pm
->
clock_get
(
dev
,
PLL_SHADER
);
if
(
ret
>
0
)
perflvl
->
shader
=
ret
;
ret
=
pm
->
clock_get
(
dev
,
PLL_VDEC
);
if
(
ret
>
0
)
perflvl
->
vdec
=
ret
;
}
ret
=
pm
->
clocks_get
(
dev
,
perflvl
);
if
(
ret
)
return
ret
;
if
(
pm
->
voltage
.
supported
&&
pm
->
voltage_get
)
{
ret
=
pm
->
voltage_get
(
dev
);
...
...
drivers/gpu/drm/nouveau/nv04_timer.c
浏览文件 @
ff2b6c6e
...
...
@@ -2,6 +2,7 @@
#include "drm.h"
#include "nouveau_drv.h"
#include "nouveau_drm.h"
#include "nouveau_hw.h"
int
nv04_timer_init
(
struct
drm_device
*
dev
)
...
...
@@ -17,7 +18,7 @@ nv04_timer_init(struct drm_device *dev)
/* determine base clock for timer source */
if
(
dev_priv
->
chipset
<
0x40
)
{
n
=
dev_priv
->
engine
.
pm
.
clock_get
(
dev
,
PLL_CORE
);
n
=
nouveau_hw_get_clock
(
dev
,
PLL_CORE
);
}
else
if
(
dev_priv
->
chipset
==
0x40
)
{
/*XXX: figure this out */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录