Kevin Wang [Thu, 30 May 2019 10:00:22 +0000 (18:00 +0800)]
drm/amd/powerplay: add thermal ctf support for navi10
add sw-CTF support for navi10
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Fri, 21 Jun 2019 16:29:29 +0000 (11:29 -0500)]
drm/amd/powerplay: fix no statements in function returning non-void
Add missing return (rebase fix).
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Mon, 10 Jun 2019 13:39:29 +0000 (21:39 +0800)]
drm/amd/powerplay: move get_thermal_temperature_range to ppt funcs
The thermal policy could be ASIC specific ones and depends on structures
in pptable. As a result, get_thermal_temperature_range should be implemented
as ppt funcs instead of smu funcs
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 17 May 2019 06:12:51 +0000 (14:12 +0800)]
drm/amd/powerplay: move function thermal_get_temperature to veag20_ppt
the fcuntion thermal_get_temperature will be access SmuMetrics_t data,
the data structure is asic related, so move vega20_ppt to implement.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 17 May 2019 06:02:15 +0000 (14:02 +0800)]
drm/amd/powerplay: move function get_metrics_table to vega20_ppt
the SmuMetrics_t table is asic related data structure.
so move vega20_ppt file to implement.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Wed, 15 May 2019 04:59:58 +0000 (12:59 +0800)]
drm/amd/powerplay: move power_dpm_force_performance_level to amdgpu_smu file
because this callback is not asic related function, so move it to top
code level to support more asic (eg: navi10)
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 16 May 2019 07:06:25 +0000 (15:06 +0800)]
drm/amd/powerplay: enable uclk dpm default on navi10
enable uclk (mclk) dpm by default on navi10
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Tue, 14 May 2019 09:34:55 +0000 (17:34 +0800)]
drm/amd/powerplay: enable ac/dc feature on navi10
enable ac/dc feature on navi10. currently we don't have
the case to verify it.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Tue, 14 May 2019 09:08:36 +0000 (17:08 +0800)]
drm/amd/powerplay: enable gfxclk ds,dcefclk ds and fw dstate on navi10
on navi10, by default the below four features are enabled.
gfxclk deep sleep: enabled and verified
fw dstate: enabled and then soc ulv is verified
dcefclk deep sleep: enabled and verified. notice that on different boards,
due to the minimum dcefclk deep sleep setting in VBIOS, we may not see dcefclk
deep sleep kicking in.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 14 May 2019 06:01:01 +0000 (14:01 +0800)]
drm/amd/powerplay: add sclk sysfs interface support for navi10
miss sclk support in force_clk_levels function
Signed-off-by: Kevin Wang <kevin1.Wang@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tao Zhou [Tue, 14 May 2019 03:37:32 +0000 (11:37 +0800)]
drm/amdgpu: correct reference clock value on navi10
remove the divisor 4
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Acked-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tao Zhou [Mon, 13 May 2019 08:52:22 +0000 (16:52 +0800)]
drm/amd/powerplay/smu11: disable some pp features on navi10 A0 secure board
disable DPM UCLK and SOC DS on A0 secure board
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tao Zhou [Fri, 10 May 2019 08:31:57 +0000 (16:31 +0800)]
drm/amd/powerplay/smu11: add secure board check function (v2)
To determine whether the board is secure or not.
v2: rebase (Alex)
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tao Zhou [Mon, 13 May 2019 08:56:17 +0000 (16:56 +0800)]
drm/amd/powerplay/smu11: enable ds socclk by default
Enable soc clk deep sleep.
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 10 May 2019 07:29:11 +0000 (15:29 +0800)]
drm/amd/powerplay: fix amdgpu_pm_info show gpu load error
due to the smu dma/RTOS restriction, the interval of catching smu
metric table should be more than 1ms. otherwise it will cause the gpu
activity data corruption.
Signed-off-by:Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 21 Jun 2019 16:26:18 +0000 (11:26 -0500)]
drm/amd/powerplay: simplify the interface of get_gpu_power
this callback function is only call in read_sensor in smu_v11_0.c,
so move this code to {asic}_ppt.c to implement as asic related function.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 21 Jun 2019 16:25:00 +0000 (11:25 -0500)]
drm/amd/powerplay: simplify the interface of get_current_activity_percent
this callback function is only call in read_sensor in smu_v11_0.c,
so move this code to {asic}_ppt.c to implement as asic related function.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Wed, 8 May 2019 06:37:08 +0000 (14:37 +0800)]
drm/amd/powerplay: fix dpm freq unit error (10KHz -> Mhz)
the interface smu_v11_0_get_current_clk_freq should be return 10Khz not
Mhz unit to adapt vega20 and navi10 asic at the same time.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Sun, 28 Apr 2019 09:43:36 +0000 (17:43 +0800)]
amd/powerplay: update the vcn pg
update the vcn pg function in navi10.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Sun, 28 Apr 2019 10:40:11 +0000 (18:40 +0800)]
drm/amd/powerplay: add function read_sensor for navi10
add callback function read_sensor for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 25 Apr 2019 10:02:14 +0000 (18:02 +0800)]
drm/amd/powerplay: add function set_watermarks_table function for navi10
add callback function set_watermarks_table for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 25 Apr 2019 08:15:21 +0000 (16:15 +0800)]
drm/amd/powerplay: add function notify_smc_display_config_change for navi10
add callback function notify_smc_display_config_change for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 25 Apr 2019 07:52:54 +0000 (15:52 +0800)]
drm/amd/powerplay: add function get_profiling_clk_mask for navi10
add callback function get_profiling_clk_mask for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 25 Apr 2019 07:41:13 +0000 (15:41 +0800)]
drm/amd/powerplay: add funciton get[set]_power_profile_mode for navi10 (v2)
add callback function get[set]_power_profile_mode for navi10 asic
v2: fix smu_update_table for rebase (Alex)
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 21 Jun 2019 16:19:15 +0000 (11:19 -0500)]
drm/amd/powerplay: add function get_workload_type_map for swsmu
1.add new callback function get_workload_byte for smu
2.remove old workload map function
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 06:45:54 +0000 (14:45 +0800)]
drm/amd/powerplay: remove upload_dpm_level function for vega20
the function upload_dpm_level is an internal function,
so remove public interface.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 05:14:15 +0000 (13:14 +0800)]
drm/amd/powerplay: add function get_fan_speed_percent for navi10
add callback function get_fan_speed_percent for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 05:05:27 +0000 (13:05 +0800)]
drm/amd/powerplay: add function set_thermal_fan_table for navi10
add callback function set_thermal_fan_table for navi10 asic
Signed-off-by:Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 03:29:11 +0000 (11:29 +0800)]
drm/amd/powerplay: add function is_dpm_running for navi10
add callback function is_dpm_running for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 03:20:46 +0000 (11:20 +0800)]
drm/amd/powerplay: move read sensor of UVD[VCE]_POWER to amdgpu_smu file
This part of code is asic unrelated and moves to top code level.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 03:10:30 +0000 (11:10 +0800)]
drm/amd/powerplay: add function get_current_activity_percent for navi10
add callback function get_current_activity_percent for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 03:07:52 +0000 (11:07 +0800)]
drm/amd/powerplay: add function get_gpu_power for navi10
add callback function get_gpu_power for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 03:02:24 +0000 (11:02 +0800)]
drm/amd/powerplay: add function unforce_dpm_levels for navi10
add callback function unforce_dpm_levels for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 02:53:51 +0000 (10:53 +0800)]
drm/amd/powerplay: add funciton force_dpm_limit for navi10
add callback function force_dpm_limit for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Tue, 23 Apr 2019 06:16:52 +0000 (14:16 +0800)]
drm/amd/powerplay: add function display_configuration_changed for navi10
1.add callback function to support navi10 asic.
2.Remove unnecessary logical code.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Mon, 22 Apr 2019 06:37:46 +0000 (14:37 +0800)]
drm/amd/powerplay: add function pre_display_config_changed for navi10
add callback function pre_display_config_changed for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 19 Apr 2019 06:05:58 +0000 (14:05 +0800)]
drm/amd/powerplay: add function get_clock_by_type_with_latency for navi10
add callback function get_clock_by_type_with_latency for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 19 Apr 2019 05:27:19 +0000 (13:27 +0800)]
drm/amd/powerplay: add function populate_umd_state_clk for navi10
add callback function populate_umd_state_clk for navi10 asic
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 19 Apr 2019 02:31:18 +0000 (10:31 +0800)]
drm/amd/powerplay: add function force_clk_levels for navi10
add sysfs interface of force_clk_levels sysfs for navi10.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Mon, 22 Apr 2019 06:40:30 +0000 (14:40 +0800)]
drm/amd/powerplay: add helper function of smu_set_hard_freq_range
add this function to get dpm clock information.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Fri, 19 Apr 2019 02:19:28 +0000 (10:19 +0800)]
drm/amd/powerplay: add helper function of smu_set_soft_freq_range
add this helper function to get dpm clk information.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 18 Apr 2019 10:46:04 +0000 (18:46 +0800)]
drm/amd/powerplay: add helper function of smu_get_dpm_freq_range
add this helper function to get dpm clk information (min, max);
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Thu, 18 Apr 2019 07:06:34 +0000 (15:06 +0800)]
drm/amd/powerplay: add function print_clk_levels for navi10
add sysfs interface of print_clk_levels sysfs for navi10.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Wed, 27 Mar 2019 06:46:20 +0000 (14:46 +0800)]
drm/amd/powerplay: add helper function to get dpm freq informations
this function can help driver to get ppclk informations
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kevin Wang [Wed, 17 Apr 2019 06:58:28 +0000 (14:58 +0800)]
drm/amd/powerplay: add function get current clock freq interface for navi10
add function of get_current_clk_freq_by_table for navi10.
Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 6 May 2019 10:55:23 +0000 (18:55 +0800)]
drm/amdgpu/gfx10: require to pin/unpin CSIB BO when suspend/resume
CSIB BO is required to be pinned down to guarantee
bo is always valid when resume, and to be unpinned it
so that its content can be saved during suspend.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 6 May 2019 08:40:48 +0000 (16:40 +0800)]
drm/amdgpu/gfx10: remove unnecessary waiting on gfx inactive
The following KIQ ring test could guarantee the previous unmap
has been done.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 6 May 2019 08:35:41 +0000 (16:35 +0800)]
drm/amdgpu: RLC must be disabled after SMU when S3 on navi
SMU requires to interact with RLC when disable all features,
so RLC shouldn't be disabled ahead of SMU.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 6 May 2019 08:28:22 +0000 (16:28 +0800)]
drm/amd/powerplay/smu11: disable PLL shutdown when gfxoff enabled
MP1 cannot access clock IP during MP1 FW reload, disable PLL
shutdown as a workaround.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
tiancyin [Mon, 29 Apr 2019 08:56:16 +0000 (16:56 +0800)]
drm/amd/powerplay: disable uclk dpm by default
[why]
The uclk dpm feature is not supported by some certain navi10
board like 18202, while supported by some board like 18201.
It causes modprobe failure on 18202 board.
[how]
Disabled this feature by default, it can be enabled by module parameter
uclk_dpm_support=1.
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Leo Liu [Tue, 30 Apr 2019 14:15:38 +0000 (10:15 -0400)]
drm/amdgpu/VCN2.0: remove powergating for UVDW tile
No UVDW tile any more from VCN2.0, so mark out related fields.
It fixes error:
"[drm] Register(0) [mmUVD_PGFSM_STATUS] failed to reach value 0x002aaaaa != 0x00aaaaaa"
Signed-off-by: Leo Liu <leo.liu@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Fri, 26 Apr 2019 05:53:10 +0000 (13:53 +0800)]
amd/powerplay: enable uclk dpm
Enable uclk dpm on navi10 as the result of
removing fast switch setting.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Thu, 30 May 2019 04:20:24 +0000 (23:20 -0500)]
amd/powerplay: fix the issue of uclk dpm
PPSMC_MSG_SetUclkFastSwitch message can be applied on vega20,
but can't on navi10. This is the prerequisite of uclk dpm on
navi10.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Xiaojie Yuan [Fri, 19 Apr 2019 10:44:18 +0000 (18:44 +0800)]
drm/amdgpu/gfx10: fix unbalanced MAP/UNMAP_QUEUES when async_gfx_ring is disabled
gfx_v10_0_kiq_enable_kgq() is called only when async_gfx_ring is
enabled, so should gfx_v10_0_kiq_disable_kgq().
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Xiaojie Yuan [Fri, 21 Jun 2019 16:14:37 +0000 (11:14 -0500)]
drm/amdgpu/gfx10: drop redundant se/sh selection
we already selected se/sh at the beginning of the for loop
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 15 Apr 2019 09:03:01 +0000 (17:03 +0800)]
drm/amdgpu/mes10.1: enable mes FW backdoor loading
It enables MES FW backdoor loading in ip block functions.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Sun, 14 Apr 2019 09:16:48 +0000 (17:16 +0800)]
drm/amdgpu/mes10.1: implement mes enablement function
After MES firmware gets loaded, it enables MES engine starting execution.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Sun, 14 Apr 2019 08:17:30 +0000 (16:17 +0800)]
drm/amdgpu/mes10.1: implement MES firmware backdoor loading
It implements MES firmware backdoor loading.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Fri, 12 Apr 2019 11:11:18 +0000 (19:11 +0800)]
drm/amdgpu/mes10.1: implement ucode buffers destruction
Free ucode GPU buffers.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Fri, 12 Apr 2019 10:58:57 +0000 (18:58 +0800)]
drm/amdgpu/mes10.1: upload mes data ucode to gpu buffer
Allocate GPU buffer and upload mes data ucode to the buffer.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Fri, 12 Apr 2019 10:53:35 +0000 (18:53 +0800)]
drm/amdgpu/mes10.1: upload mes ucode to gpu buffer
Allocate GPU buffer and upload ucode firmware to the buffer.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 15 Apr 2019 08:58:20 +0000 (16:58 +0800)]
drm/amdgpu/mes10.1: implement ucode CPU buffer destruction
It implements the CPU buffer destruction of ucode.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 15 Apr 2019 03:31:04 +0000 (11:31 +0800)]
drm/amdgpu/mes10.1: load mes firmware file to CPU buffer
It requests MES firmware binary and uploads to CPU buffer.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 15 Apr 2019 03:34:03 +0000 (11:34 +0800)]
drm/amdgpu/mes10.1: add mes firmware info fields
The newly added fields is to store mes firmware related information.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Mon, 15 Apr 2019 03:33:05 +0000 (11:33 +0800)]
drm/amdgpu/ucode: add mes firmware file support
The newly added firmware struct is for mes firmware file.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Fri, 12 Apr 2019 06:23:44 +0000 (14:23 +0800)]
drm/amdgpu/ucode: add the definitions of MES ucode and ucode data
MES requires two seperate firmwares: ucode and ucode data.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Wed, 24 Apr 2019 02:55:20 +0000 (10:55 +0800)]
drm/amdgpu/sdma5: incorrect variable type for gpu address
Incorrect programming with 64bit gpu address assignment for
32bit variable.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
tiancyin [Mon, 22 Apr 2019 09:07:06 +0000 (17:07 +0800)]
drm/amdgpu/sdma5: fix a sdma potential hang in VK_Examples test
[why]
When page fault happens, it could lead to sdma hang is RESP_MODE =
0 for non-PRT case.
[how]
Setting SDMAx_UTCL1_CNTL.RESP_MODE to 0b011 to avoid SDMA halt.
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Mon, 22 Apr 2019 13:06:22 +0000 (21:06 +0800)]
drm/amd/powerplay: remove uvd_gated/vce_gated from smu_power_context (v2)
It's not needed for navi.
v2: remove unused variable (Alex)
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Thu, 18 Apr 2019 07:55:27 +0000 (15:55 +0800)]
drm/amdgpu/nv: set vcn pg flag
Enable VCN power gating by default.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Thu, 18 Apr 2019 10:11:55 +0000 (18:11 +0800)]
drm/amdgpu: enable vcn dpm scheme for navi
On navi1x, vcn dpm scheme was merged into powergating scheme.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Thu, 18 Apr 2019 09:37:14 +0000 (17:37 +0800)]
drm/amdgpu/vcn2: don't access register when power gated
It will cause bus hang to access register UVD_STATUS
when VCN is in the state of power gated.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Thu, 18 Apr 2019 02:00:48 +0000 (10:00 +0800)]
drm/amd/powerplay: add new interface for vcn powergating
add new interface for vcn powrergating and vcn dpm as well.
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Tue, 16 Apr 2019 08:47:10 +0000 (16:47 +0800)]
drm/amd/powerplay: enable vcn powergating v2
enable vcn powergating in driver for navi10
v2: set vcn pg bit according to AMD_PG_SUPPORT_VCN flag
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Thu, 18 Apr 2019 08:20:10 +0000 (16:20 +0800)]
drm/amdgpu/vcn2: notify SMU power up/down VCN
For sw control power gating, it needs notify SMU to power up/down VCN
when enter/exit working state.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Jack Xiao [Tue, 16 Apr 2019 09:27:41 +0000 (17:27 +0800)]
drm/amdgpu/gfx10: fix issues for suspend/resume
1). use PREEMPT_QUEUE instead of RESET_QUEUE for gfx ring disablement.
2). Need wait for unmapping queue done before continue execution.
Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Tianci Yin <tianci.yin@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Thu, 30 May 2019 04:18:01 +0000 (23:18 -0500)]
drm/amd/powerplay: set dpm_enabled flag but don't enable vcn dpm
This patch sets dpm_enabled flag but don't enable vcn dpm, because vcn dpm
doesn't work so far and we needs to enable the sysfs interfaces.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Tue, 16 Apr 2019 08:33:43 +0000 (16:33 +0800)]
drm/amd/powerplay: update smu11_driver_if_navi10.h
update the smu11_driver_if_navi10.h since navi10 smu fw
update to 42.15.0
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Xiaojie Yuan [Mon, 1 Apr 2019 13:44:21 +0000 (21:44 +0800)]
drm/amdgpu/gfx10: fix resume failure when enabling async gfx ring
'adev->in_suspend' code path is missing in gfx_v10_0_gfx_init_queue()
Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tianci Yin [Thu, 11 Apr 2019 10:59:07 +0000 (18:59 +0800)]
drm/amdgpu: disable some gfx light sleep
temporarily disable to avoid s3 test failure.
s3 test failure log:
"[drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring sdma0 timeout,
signaled seq=8278, emitted seq=8281"
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Tianci Yin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Tianci Yin [Wed, 3 Apr 2019 08:38:31 +0000 (16:38 +0800)]
drm/amdgpu/gfx10: update gfx golden settings
add new registers: mmCGTT_SPI_CLK_CTRL, mmDB_DEBUG3 and
mmGL2C_CGTT_SCLK_CTRL.
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Tianci Yin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Thu, 30 May 2019 04:15:54 +0000 (23:15 -0500)]
drm/amd/powerplay: do not set dpm_enabled flag before VCN/DCN DPM is workable
This dpm_enabled flag will be recognized as the VCN DPM enabled as well. In fact
VCN/DCN DPM on Navi10 is not good so far, so we cannot enable it for now.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Thu, 4 Apr 2019 04:50:23 +0000 (12:50 +0800)]
drm/amd/powerplay: fix the incorrect type of pptable
This patch is to fix the incorrect type of pptable, otherwise, the data will be
totally wrong in parsing phase.
Signed-off-by: Kenneth Feng <Kenneth.Feng@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 08:08:21 +0000 (16:08 +0800)]
drm/amd/powerplay: don't include the smu11 driver if header in smu v11 (v2)
This header is actually for each asic, so we should not include in smu_v11_0.c.
And rename the one for navi10.
v2: add hack for XGMI (Alex)
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Mon, 1 Apr 2019 10:06:36 +0000 (18:06 +0800)]
drm/amd/powerplay: move getting MAX_FAN_RPM value to asic level
Getting MAX_FAN_RPM value needs to be read by pptable, so it should be moved to
asic level.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 07:53:42 +0000 (15:53 +0800)]
drm/amd/powerplay: introduce smu power source type to handle AC/DC source for each asic
This patch introduces new smu power source type, it's to handle the different
AC/DC source defines for each asic with the same smu ip.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 07:15:49 +0000 (15:15 +0800)]
drm/amd/powerplay: move Watermarks_t uses into asic level
This patch moves the rest of Watermarks_t uses into asic level. It's to avoid
the conflicts with different asic.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 06:53:23 +0000 (14:53 +0800)]
drm/amd/powerplay: move SmuMetrics_t uses into asic level
This patch moves the rest of SmuMetrics_t uses into asic level. It's to avoid the
conflicts with different asic.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 05:25:04 +0000 (13:25 +0800)]
drm/amd/powerplay: move PPTable_t uses into asic level
This patch moves the rest of PPTable_t uses into asic level. It's to avoid the
conflicts with different asic.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 04:49:11 +0000 (12:49 +0800)]
drm/amd/powerplay: use the table size member in the structure instead of getting directly
This patch uses the table size member in the structure instead of getting
directly, because the table is different in each asic.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 04:02:00 +0000 (12:02 +0800)]
drm/amd/powerplay: modify smu_update_table to use SMU_TABLE_xxx as the input
Table id may be different for each asic, so it's good to use this as the input
for common interface.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Alex Deucher [Mon, 22 Apr 2019 19:06:42 +0000 (14:06 -0500)]
drm/amd/powerplay/smu11: remove smu_update_table_with_arg
Nothing was using it. Just replace with smu_update_table
which is what everything was using via a wrapper anyway.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 31 Mar 2019 03:53:28 +0000 (11:53 +0800)]
drm/amd/powerplay: add tables_init interface for each asic
The smc tables defines should be in the asic level.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Fri, 29 Mar 2019 10:07:23 +0000 (18:07 +0800)]
drm/amd/powerplay: init table_count for smu tables on asic level
TABLE_COUNT should be inited in asic level. Because the value may be different
on each asic even on the same ip.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Fri, 29 Mar 2019 09:52:11 +0000 (17:52 +0800)]
drm/amd/powerplay: introduce smu table id type to handle the smu table for each asic
This patch introduces new smu table type, it's to handle the different smu table
defines for each asic with the same smu ip.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Thu, 30 May 2019 04:14:33 +0000 (23:14 -0500)]
drm/amd/powerplay: introduce smu feature type to handle feature mask for each asic
This patch introduces new smu feature type, it's to handle the different feature
mask defines for each asic with the same smu ip.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Huang Rui [Sun, 24 Mar 2019 11:22:07 +0000 (19:22 +0800)]
drm/amd/powerplay: introduce smu clk type to handle ppclk for each asic
This patch introduces new smu clk type, it's to handle the different ppclk
defines for each asic with the same smu ip.
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Hawking Zhang [Mon, 1 Apr 2019 07:32:48 +0000 (15:32 +0800)]
drm/amdgpu: enable sw smu driver for navi10 by default
Navi10 will use sw smu driver for dynamic power managment,
while vega20 could also use sw smu driver when amdgpu_dpm is
set to 2
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Thu, 28 Mar 2019 09:14:42 +0000 (17:14 +0800)]
drm/amd/powerplay: enable DCEFCLK dpm support
Enabale DCEFCLK dpm on navi10
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Kenneth Feng [Thu, 28 Mar 2019 02:54:16 +0000 (10:54 +0800)]
drm/amd/powerplay: gfxoff-seperate the Vega20 case
seperate the Vega20 case from navi10 for gfxoff so that gfxoff
won't be allowed on Vega20
Signed-off-by: Kenneth Feng <kenneth.feng@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>