Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
58bd2a88
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看板
提交
58bd2a88
编写于
9月 04, 2013
作者:
A
Alex Deucher
提交者:
Christian König
2月 18, 2014
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/radeon/dpm: fetch vce states from the vbios
Signed-off-by:
N
Alex Deucher
<
alexander.deucher@amd.com
>
上级
b62d628b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
43 addition
and
1 deletion
+43
-1
drivers/gpu/drm/radeon/r600_dpm.c
drivers/gpu/drm/radeon/r600_dpm.c
+27
-1
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon.h
+16
-0
未找到文件。
drivers/gpu/drm/radeon/r600_dpm.c
浏览文件 @
58bd2a88
...
...
@@ -1063,7 +1063,15 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
(
mode_info
->
atom_context
->
bios
+
data_offset
+
le16_to_cpu
(
ext_hdr
->
usVCETableOffset
)
+
1
+
1
+
array
->
ucNumEntries
*
sizeof
(
VCEClockInfo
));
ATOM_PPLIB_VCE_State_Table
*
states
=
(
ATOM_PPLIB_VCE_State_Table
*
)
(
mode_info
->
atom_context
->
bios
+
data_offset
+
le16_to_cpu
(
ext_hdr
->
usVCETableOffset
)
+
1
+
1
+
(
array
->
ucNumEntries
*
sizeof
(
VCEClockInfo
))
+
1
+
(
limits
->
numEntries
*
sizeof
(
ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
)));
ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
*
entry
;
ATOM_PPLIB_VCE_State_Record
*
state_entry
;
VCEClockInfo
*
vce_clk
;
u32
size
=
limits
->
numEntries
*
sizeof
(
struct
radeon_vce_clock_voltage_dependency_entry
);
rdev
->
pm
.
dpm
.
dyn_state
.
vce_clock_voltage_dependency_table
.
entries
=
...
...
@@ -1075,8 +1083,9 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
rdev
->
pm
.
dpm
.
dyn_state
.
vce_clock_voltage_dependency_table
.
count
=
limits
->
numEntries
;
entry
=
&
limits
->
entries
[
0
];
state_entry
=
&
states
->
entries
[
0
];
for
(
i
=
0
;
i
<
limits
->
numEntries
;
i
++
)
{
VCEClockInfo
*
vce_clk
=
(
VCEClockInfo
*
)
vce_clk
=
(
VCEClockInfo
*
)
((
u8
*
)
&
array
->
entries
[
0
]
+
(
entry
->
ucVCEClockInfoIndex
*
sizeof
(
VCEClockInfo
)));
rdev
->
pm
.
dpm
.
dyn_state
.
vce_clock_voltage_dependency_table
.
entries
[
i
].
evclk
=
...
...
@@ -1088,6 +1097,23 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
entry
=
(
ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
*
)
((
u8
*
)
entry
+
sizeof
(
ATOM_PPLIB_VCE_Clock_Voltage_Limit_Record
));
}
for
(
i
=
0
;
i
<
states
->
numEntries
;
i
++
)
{
if
(
i
>=
RADEON_MAX_VCE_LEVELS
)
break
;
vce_clk
=
(
VCEClockInfo
*
)
((
u8
*
)
&
array
->
entries
[
0
]
+
(
state_entry
->
ucVCEClockInfoIndex
*
sizeof
(
VCEClockInfo
)));
rdev
->
pm
.
dpm
.
vce_states
[
i
].
evclk
=
le16_to_cpu
(
vce_clk
->
usEVClkLow
)
|
(
vce_clk
->
ucEVClkHigh
<<
16
);
rdev
->
pm
.
dpm
.
vce_states
[
i
].
ecclk
=
le16_to_cpu
(
vce_clk
->
usECClkLow
)
|
(
vce_clk
->
ucECClkHigh
<<
16
);
rdev
->
pm
.
dpm
.
vce_states
[
i
].
clk_idx
=
state_entry
->
ucClockInfoIndex
&
0x3f
;
rdev
->
pm
.
dpm
.
vce_states
[
i
].
pstate
=
(
state_entry
->
ucClockInfoIndex
&
0xc0
)
>>
6
;
state_entry
=
(
ATOM_PPLIB_VCE_State_Record
*
)
((
u8
*
)
state_entry
+
sizeof
(
ATOM_PPLIB_VCE_State_Record
));
}
}
if
((
le16_to_cpu
(
ext_hdr
->
usSize
)
>=
SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V3
)
&&
ext_hdr
->
usUVDTableOffset
)
{
...
...
drivers/gpu/drm/radeon/radeon.h
浏览文件 @
58bd2a88
...
...
@@ -1259,6 +1259,8 @@ enum radeon_dpm_event_src {
RADEON_DPM_EVENT_SRC_DIGIAL_OR_EXTERNAL
=
4
};
#define RADEON_MAX_VCE_LEVELS 6
enum
radeon_vce_level
{
RADEON_VCE_LEVEL_AC_ALL
=
0
,
/* AC, All cases */
RADEON_VCE_LEVEL_DC_EE
=
1
,
/* DC, entropy encoding */
...
...
@@ -1454,6 +1456,17 @@ enum radeon_dpm_forced_level {
RADEON_DPM_FORCED_LEVEL_HIGH
=
2
,
};
struct
radeon_vce_state
{
/* vce clocks */
u32
evclk
;
u32
ecclk
;
/* gpu clocks */
u32
sclk
;
u32
mclk
;
u8
clk_idx
;
u8
pstate
;
};
struct
radeon_dpm
{
struct
radeon_ps
*
ps
;
/* number of valid power states */
...
...
@@ -1466,6 +1479,9 @@ struct radeon_dpm {
struct
radeon_ps
*
boot_ps
;
/* default uvd power state */
struct
radeon_ps
*
uvd_ps
;
/* vce requirements */
struct
radeon_vce_state
vce_states
[
RADEON_MAX_VCE_LEVELS
];
enum
radeon_vce_level
vce_level
;
enum
radeon_pm_state_type
state
;
enum
radeon_pm_state_type
user_state
;
u32
platform_caps
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录