Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a5cb318e
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看板
提交
a5cb318e
编写于
3月 20, 2013
作者:
A
Alex Deucher
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/radeon/dpm: pull in ppm info from atom
Used by SI dpm. Signed-off-by:
N
Alex Deucher
<
alexander.deucher@amd.com
>
上级
9985318b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
61 addition
and
0 deletion
+61
-0
drivers/gpu/drm/radeon/r600_dpm.c
drivers/gpu/drm/radeon/r600_dpm.c
+47
-0
drivers/gpu/drm/radeon/radeon.h
drivers/gpu/drm/radeon/radeon.h
+14
-0
未找到文件。
drivers/gpu/drm/radeon/r600_dpm.c
浏览文件 @
a5cb318e
...
...
@@ -769,6 +769,14 @@ static int r600_parse_clk_voltage_dep_table(struct radeon_clock_voltage_dependen
return
0
;
}
/* sizeof(ATOM_PPLIB_EXTENDEDHEADER) */
#define SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V2 12
#define SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V3 14
#define SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V4 16
#define SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V5 18
#define SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V6 20
#define SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V7 22
int
r600_parse_extended_power_table
(
struct
radeon_device
*
rdev
)
{
struct
radeon_mode_info
*
mode_info
=
&
rdev
->
mode_info
;
...
...
@@ -925,6 +933,43 @@ int r600_parse_extended_power_table(struct radeon_device *rdev)
}
}
/* ppm table */
if
(
le16_to_cpu
(
power_info
->
pplib
.
usTableSize
)
>=
sizeof
(
struct
_ATOM_PPLIB_POWERPLAYTABLE3
))
{
ATOM_PPLIB_EXTENDEDHEADER
*
ext_hdr
=
(
ATOM_PPLIB_EXTENDEDHEADER
*
)
(
mode_info
->
atom_context
->
bios
+
data_offset
+
le16_to_cpu
(
power_info
->
pplib3
.
usExtendendedHeaderOffset
));
if
((
le16_to_cpu
(
ext_hdr
->
usSize
)
>=
SIZE_OF_ATOM_PPLIB_EXTENDEDHEADER_V5
)
&&
ext_hdr
->
usPPMTableOffset
)
{
ATOM_PPLIB_PPM_Table
*
ppm
=
(
ATOM_PPLIB_PPM_Table
*
)
(
mode_info
->
atom_context
->
bios
+
data_offset
+
le16_to_cpu
(
ext_hdr
->
usPPMTableOffset
));
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
=
kzalloc
(
sizeof
(
struct
radeon_ppm_table
),
GFP_KERNEL
);
if
(
!
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
)
return
-
ENOMEM
;
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
ppm_design
=
ppm
->
ucPpmDesign
;
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
cpu_core_number
=
le16_to_cpu
(
ppm
->
usCpuCoreNumber
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
platform_tdp
=
le32_to_cpu
(
ppm
->
ulPlatformTDP
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
small_ac_platform_tdp
=
le32_to_cpu
(
ppm
->
ulSmallACPlatformTDP
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
platform_tdc
=
le32_to_cpu
(
ppm
->
ulPlatformTDC
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
small_ac_platform_tdc
=
le32_to_cpu
(
ppm
->
ulSmallACPlatformTDC
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
apu_tdp
=
le32_to_cpu
(
ppm
->
ulApuTDP
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
dgpu_tdp
=
le32_to_cpu
(
ppm
->
ulDGpuTDP
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
dgpu_ulv_power
=
le32_to_cpu
(
ppm
->
ulDGpuUlvPower
);
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
->
tj_max
=
le32_to_cpu
(
ppm
->
ulTjmax
);
}
}
return
0
;
}
...
...
@@ -940,4 +985,6 @@ void r600_free_extended_power_table(struct radeon_device *rdev)
kfree
(
rdev
->
pm
.
dpm
.
dyn_state
.
cac_leakage_table
.
entries
);
if
(
rdev
->
pm
.
dpm
.
dyn_state
.
phase_shedding_limits_table
.
entries
)
kfree
(
rdev
->
pm
.
dpm
.
dyn_state
.
phase_shedding_limits_table
.
entries
);
if
(
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
)
kfree
(
rdev
->
pm
.
dpm
.
dyn_state
.
ppm_table
);
}
drivers/gpu/drm/radeon/radeon.h
浏览文件 @
a5cb318e
...
...
@@ -1281,6 +1281,19 @@ struct radeon_phase_shedding_limits_table {
struct
radeon_phase_shedding_limits_entry
*
entries
;
};
struct
radeon_ppm_table
{
u8
ppm_design
;
u16
cpu_core_number
;
u32
platform_tdp
;
u32
small_ac_platform_tdp
;
u32
platform_tdc
;
u32
small_ac_platform_tdc
;
u32
apu_tdp
;
u32
dgpu_tdp
;
u32
dgpu_ulv_power
;
u32
tj_max
;
};
struct
radeon_dpm_dynamic_state
{
struct
radeon_clock_voltage_dependency_table
vddc_dependency_on_sclk
;
struct
radeon_clock_voltage_dependency_table
vddci_dependency_on_mclk
;
...
...
@@ -1295,6 +1308,7 @@ struct radeon_dpm_dynamic_state {
u16
min_vddc_for_pcie_gen2
;
struct
radeon_cac_leakage_table
cac_leakage_table
;
struct
radeon_phase_shedding_limits_table
phase_shedding_limits_table
;
struct
radeon_ppm_table
*
ppm_table
;
};
struct
radeon_dpm_fan
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录