1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/amd/pm/inc
Lang Yu abd0a16ac7 drm/amdgpu: add manual sclk/vddc setting support for cyan skilfish(v3)
Add manual sclk/vddc setting supoort via pp_od_clk_voltage sysfs
to maintain consistency with other asics. As cyan skillfish doesn't
support DPM, there is only a single frequency and voltage to adjust.

v2: maintain consistency and add command guide.
v3: adjust user settings storage and coding style.

Command guide:
echo vc point sclk vddc > pp_od_clk_voltage
	"vc"    - sclk voltage curve
	"point" - must be 0
	"sclk"  - target value of sclk(MHz), should be in safe range
	"vddc"  - target value of vddc(mV), a 6.25(mV) stepping is
		  recommended and should be in safe range (the real
		  vddc is an approximation of target value)
echo c > pp_od_clk_voltage
	"c"	- commit the changes of sclk and vddc, only after
		  the commit command, the target values set by "vc"
		  command will take effect
echo r > pp_od_clk_voltage
	"r" 	- reset sclk and vddc to default value, a subsequent
		  commit command is needed to take effect

Example:
1) Check default sclk and vddc
	$ cat pp_od_clk_voltage
	OD_SCLK:
	0: 1800Mhz *
	OD_VDDC:
	0: 862mV *
	OD_RANGE:
	SCLK:    1000Mhz       2000Mhz
	VDDC:     700mV        1129mV
2) Set sclk to 1500MHz and vddc to 700mV
	$ echo vc 0 1500 700 > pp_od_clk_voltage
	$ echo c > pp_od_clk_voltage
	$ cat pp_od_clk_voltage
	OD_SCLK:
	0: 1500Mhz *
	OD_VDDC:
	0: 693mV *
	OD_RANGE:
	SCLK:    1000Mhz       2000Mhz
	VDDC:     700mV        1129mV
3) Reset sclk and vddc to default
	$ echo r > pp_od_clk_voltage
	$ echo c > pp_od_clk_voltage
	$ cat pp_od_clk_voltage
	OD_SCLK:
	0: 1800Mhz *
	OD_VDDC:
	0: 874mV *
	OD_RANGE:
	SCLK:    1000Mhz       2000Mhz
	VDDC:     700mV        1129mV
NOTE:
We don't specify an explicit safe range, you can set any values
between min and max at your own risk. Enjoy!

Signed-off-by: Lang Yu <lang.yu@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2021-09-16 09:56:23 -04:00
..
vega12
aldebaran_ppsmc.h drm/amd/pm: Support board calibration on aldebaran 2021-07-23 10:07:59 -04:00
amd_powerplay.h
amdgpu_dpm.h drm/amd/pm: drop the unnecessary intermediate percent-based transition 2021-08-16 15:35:56 -04:00
amdgpu_pm.h drm/amd/pm: do not use drm middle layer for debugfs 2021-02-18 16:43:09 -05:00
amdgpu_smu.h drm/amd/pm: And destination bounds checking to struct copy 2021-08-30 14:59:34 -04:00
arcturus_ppsmc.h drm/amd/pm: Add LightSBR SMU MSG support 2021-03-23 23:25:43 -04:00
cz_ppsmc.h
fiji_ppsmc.h
hardwaremanager.h
hwmgr.h drm/amd/pm: drop the unnecessary intermediate percent-based transition 2021-08-16 15:35:56 -04:00
polaris10_pwrvirus.h
power_state.h
pp_debug.h
pp_endian.h
pp_thermal.h drm/amd/pm/inc/pp_thermal: Mark 'SMU7Thermal{WithDelay}Policy' as __maybe_unused 2020-12-01 16:04:44 -05:00
ppinterrupt.h
rv_ppsmc.h drm/amdgpu/powerplay/smu10: add support for gpu busy query (v2) 2021-03-23 23:27:50 -04:00
smu7.h
smu7_common.h
smu7_discrete.h
smu7_fusion.h
smu7_ppsmc.h drm/amd/pm: correct Polaris DIDT configurations 2020-10-27 11:59:16 -04:00
smu8.h
smu8_fusion.h
smu9.h
smu9_driver_if.h
smu10.h drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven 2020-12-08 23:06:15 -05:00
smu10_driver_if.h drm/amd/pm: add Raven2 watermark WmType setting 2020-09-17 17:48:18 -04:00
smu11_driver_if.h
smu11_driver_if_arcturus.h
smu11_driver_if_cyan_skillfish.h drm/amdgpu: update SMU driver interface for cyan skilfish(v3) 2021-09-16 09:56:23 -04:00
smu11_driver_if_navi10.h drm/amd/pm: bump Navi1x driver if version and related data structures V2 2021-03-02 14:05:18 -05:00
smu11_driver_if_sienna_cichlid.h drm/amd/pm: bump DRIVER_IF_VERSION for Sienna Cichlid 2021-07-08 17:47:28 -04:00
smu11_driver_if_vangogh.h drm/amd/pm: update the driver interface header for vangogh 2021-04-15 16:32:19 -04:00
smu12_driver_if.h
smu13_driver_if_aldebaran.h drm/amd/pm: Update aldebaran pmfw interface 2021-05-19 22:29:35 -04:00
smu13_driver_if_yellow_carp.h drm/admgpu/pm: add smu v13 driver interface header for yellow carp (v3) 2021-06-04 16:03:09 -04:00
smu71.h
smu71_discrete.h
smu72.h
smu72_discrete.h
smu73.h
smu73_discrete.h
smu74.h
smu74_discrete.h drm/amd/pm: correct VR shared rail info 2020-10-27 11:58:57 -04:00
smu75.h
smu75_discrete.h
smu_11_0_cdr_table.h drm/amd/pm: implement a new umc cdr workaround 2020-09-17 17:46:40 -04:00
smu_types.h drm/amdgpu: add manual sclk/vddc setting support for cyan skilfish(v3) 2021-09-16 09:56:23 -04:00
smu_ucode_xfer_cz.h
smu_ucode_xfer_vi.h
smu_v11_0.h drm/amd/pm: drop the unnecessary intermediate percent-based transition 2021-08-16 15:35:56 -04:00
smu_v11_0_7_ppsmc.h drm/amd/pm: new SMC message for 2nd usb2.0 port workaround 2020-12-10 16:41:49 -05:00
smu_v11_0_7_pptable.h
smu_v11_0_ppsmc.h drm/amd/pm: apply the CDR workarounds only with some specific UMC firmwares(V2) 2020-09-17 17:46:47 -04:00
smu_v11_0_pptable.h
smu_v11_5_pmfw.h drm/amd/pm: update the swSMU headers for vangogh 2020-11-13 00:12:51 -05:00
smu_v11_5_ppsmc.h drm/amd/pm: update the smu v11.5 smc header for vangogh 2021-02-09 15:29:15 -05:00
smu_v11_8_pmfw.h drm/amdgpu: add smu_v11_8_pmfw header for cyan_skilfish 2021-07-23 10:08:01 -04:00
smu_v11_8_ppsmc.h drm/amdgpu: update SMU PPSMC for cyan skilfish 2021-09-16 09:56:23 -04:00
smu_v12_0.h drm/amd/pm: add the callback to get the bootup values for renoir 2021-04-15 16:32:44 -04:00
smu_v12_0_ppsmc.h
smu_v13_0.h drm/amd/pm: update yellow carp pmfw interface version 2021-08-05 21:17:40 -04:00
smu_v13_0_1_pmfw.h drm/amd/pm: update smu v13.0.1 firmware header 2021-08-05 21:17:59 -04:00
smu_v13_0_1_ppsmc.h drm/amdgpu/pm: add smu v13.0.1 smc header for yellow carp (v2) 2021-06-04 16:03:10 -04:00
smu_v13_0_pptable.h drm/amd/swsmu: add aldebaran smu13 ip support (v3) 2021-03-23 22:54:24 -04:00
smumgr.h drm/amd/pm: perform SMC reset on suspend/hibernation 2020-10-30 01:00:43 -04:00
tonga_ppsmc.h
vega10_ppsmc.h
vega12_ppsmc.h
vega20_ppsmc.h