[pull] amdgpu, amdkfd, ttm, sched drm-next-5.1

2019-01-25 Thread Alex Deucher
Hi Dave, Daniel, New stuff for 5.1. amdgpu: - DC bandwidth formula updates - Support for DCC on scanout surfaces - Support for multiple IH rings on soc15 asics - Fix xgmi locking - Add sysfs interface to get pcie usage stats - Simplify DC i2c/aux code - Initial support for BACO on vega10/20 - New

[PATCH] drm/amd/powerplay: add override pcie parameters for Vega20

2019-01-25 Thread Huang, JinHuiEric
It is to solve RDMA performance issue. Change-Id: I441d2943e504e2ef7d33de0e8773a0f9b8fdb2ca Signed-off-by: Eric Huang --- drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 46 ++ 1 file changed, 46 insertions(+) diff --git

[PATCH] drm/amdgpu: fix baco handling for soc15

2019-01-25 Thread Alex Deucher
Need to check if the operation is one that involves registers before getting the register offset. Fixes a crash in when handling commands without a register offset, e.g., wait. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/powerplay/hwmgr/common_baco.c | 9 ++--- 1 file changed, 6

Re: [Linux-v4.18-rc6] modpost-errors when compiling with clang-7 and CONFIG_DRM_AMDGPU=m

2019-01-25 Thread Nick Desaulniers
On Fri, Jan 25, 2019 at 8:05 AM Sedat Dilek wrote: > > On Fri, Jan 25, 2019 at 4:15 PM Wentland, Harry > wrote: > > > > On 2019-01-25 3:25 a.m., Koenig, Christian wrote: > > > Am 25.01.19 um 08:42 schrieb Sedat Dilek: > > >> [ CC Nick D. ] > > >> > > >> Hi Christian, > > >> > > >> Nick has

[Bug Report] Polaris 11 hangs entire system - ring gfx timeout

2019-01-25 Thread Tom Seewald
Is there anything that I can do to help troubleshoot this issue[0] further? I've produced wave and gfx ring dumps via UMR, but I don't know what the next step should be. [0]https://bugs.freedesktop.org/show_bug.cgi?id=108854 ___ amd-gfx mailing list

Re: [Linux-v4.18-rc6] modpost-errors when compiling with clang-7 and CONFIG_DRM_AMDGPU=m

2019-01-25 Thread Sedat Dilek
On Fri, Jan 25, 2019 at 4:15 PM Wentland, Harry wrote: > > On 2019-01-25 3:25 a.m., Koenig, Christian wrote: > > Am 25.01.19 um 08:42 schrieb Sedat Dilek: > >> [ CC Nick D. ] > >> > >> Hi Christian, > >> > >> Nick has posted a fix in [2]. > >> Is that OK for you? > > > > I've seen that and yeah

Re: [PATCH] drm/amd/display: add -msse2 to prevent Clang from emitting libcalls to undefined SW FP routines

2019-01-25 Thread Wentland, Harry
On 2019-01-24 7:52 p.m., ndesaulni...@google.com wrote: > arch/x86/Makefile disables SSE and SSE2 for the whole kernel. The > AMDGPU drivers modified in this patch re-enable SSE but not SSE2. Turn > on SSE2 to support emitting double precision floating point instructions > rather than calls to

Re: [PATCH] drm: enable uncached DMA optimization for ARM and arm64

2019-01-25 Thread Ard Biesheuvel
On Fri, 25 Jan 2019 at 12:30, Christian König wrote: > > Am 25.01.19 um 09:43 schrieb Ard Biesheuvel: > > On Thu, 24 Jan 2019 at 15:01, Alex Deucher wrote: > >> On Thu, Jan 24, 2019 at 9:00 AM Ard Biesheuvel > >> wrote: > >>> On Thu, 24 Jan 2019 at 13:31, Koenig, Christian > >>> wrote: >

Re: [Linux-v4.18-rc6] modpost-errors when compiling with clang-7 and CONFIG_DRM_AMDGPU=m

2019-01-25 Thread Wentland, Harry
On 2019-01-25 3:25 a.m., Koenig, Christian wrote: > Am 25.01.19 um 08:42 schrieb Sedat Dilek: >> [ CC Nick D. ] >> >> Hi Christian, >> >> Nick has posted a fix in [2]. >> Is that OK for you? > > I've seen that and yeah I'm perfectly fine with it, but Harry is the one > who needs to decide. >

Re: [PATCH 01/26] drm/irq: Don't check for DRIVER_HAVE_IRQ in drm_irq_(un)install

2019-01-25 Thread Emil Velikov
On Thu, 24 Jan 2019 at 16:58, Daniel Vetter wrote: > > If a non-legacy driver calls these it's valid to assume there is > interrupt support. The flag is really only needed for legacy drivers. ... legacy drivers which issue the IRQ via the DRM_IOCTL_CONTROL legacy IOCTL. At a later stage, we

Re: [PATCH] drm/amd/display: Expose connector VRR range via debugfs

2019-01-25 Thread Kazlauskas, Nicholas
On 1/25/19 3:13 AM, Koenig, Christian wrote: > Am 24.01.19 um 18:56 schrieb Wentland, Harry: >> >> On 2019-01-24 12:41 p.m., Christian König wrote: >>> Am 24.01.19 um 18:06 schrieb Nicholas Kazlauskas: [Why] It's useful to know the min and max vrr range for IGT testing. [How]

Re: [PATCH] drm: enable uncached DMA optimization for ARM and arm64

2019-01-25 Thread Christian König
Am 25.01.19 um 09:43 schrieb Ard Biesheuvel: On Thu, 24 Jan 2019 at 15:01, Alex Deucher wrote: On Thu, Jan 24, 2019 at 9:00 AM Ard Biesheuvel wrote: On Thu, 24 Jan 2019 at 13:31, Koenig, Christian wrote: Am 24.01.19 um 13:06 schrieb Ard Biesheuvel: The DRM driver stack is designed to work

[PATCH 138/138] drm/amd/powerplay: enable amdgpu dpm for smu

2019-01-25 Thread Huang Rui
From: Kevin Wang enable amdgpu dpm global flag Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c index

[PATCH 136/138] drm/amd/powerplay: implement dpm enable functions of uvd & vce for smu

2019-01-25 Thread Huang Rui
From: Kevin Wang add function of dpm enable uvd & vce for extern module use. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 16 ++-- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 18 ++

[PATCH 131/138] drm/amd/powerplay: dpm clk can be set only when performance level is manual

2019-01-25 Thread Huang Rui
From: Likun Gao Add condition to make dpm clk can not be set when perfomance level isn't equal to manual. Add mutex lock to smu when set dpm clk. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 31

[PATCH 128/138] drm/amd/powerplay: add sys interface for set sclk_od/mclk_od for smu

2019-01-25 Thread Huang Rui
From: Likun Gao Add sys interface for set pp_sclk_od and pp_mclk_od for smu. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 34 +- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 5 +++

[PATCH 135/138] drm/amd/powerplay: implement sensor of uvd & vce power state for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add functions of uvd & vce for hwmon. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c

[PATCH 137/138] drm/amd/powerplay: Unify smu handle task function

2019-01-25 Thread Huang Rui
From: Likun Gao Unify power stade adjust function into smu_handle_task by the judgment of task_id. Move functions which have no relationship with smu version into the file of amdgpu_smu. Modified the function of smu_display_config_changed into two part. Unify some similiar function.

[PATCH 134/138] drm/amd/powerplay: implement uvd & vce dpm enable functions

2019-01-25 Thread Huang Rui
From: Kevin Wang add dpm enable functions for vce,uvd. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 25 + 2 files changed, 31 insertions(+) diff --git

[PATCH 129/138] drm/amd/powerplay: add sys interface to set pp_od_clk_voltage for smu

2019-01-25 Thread Huang Rui
From: Likun Gao Add sys interface to set pp_od_clk_voltage for smu. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 30 ++-- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 7 +

[PATCH 130/138] drm/amd/powerplay: adjust power state when set od_clk

2019-01-25 Thread Huang Rui
From: Likun Gao Expose the function of adjust_power_state_dynamic to make it common to other functions. Add the operate of adjust powet state when set od percentage or overdrive commit dpm table. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang ---

[PATCH 126/138] drm/amd/powerplay: add sys interface for pcie for smu

2019-01-25 Thread Huang Rui
From: Likun Gao Add sys interface for set/get PCIE info for SMU. The related operate will do nothing as vega20 do not support it now. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 ++--

[PATCH 132/138] drm/amd/powerplay: implement update enabled feature state to smc for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang change: 1.when enable smu feature, the feature id will store sw-bitmap and smu controller. 2.add feature mutex lock to protect feature bitmap changed when update feature enabled state. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui ---

[PATCH 133/138] drm/amd/powerplay: hwmon don't check powerplay when sw smu is enabled

2019-01-25 Thread Huang Rui
From: Kevin Wang when sw-smu is enabled, the driver won't init powerplay structure. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 56 ++ 1 file changed, 30 insertions(+), 26 deletions(-)

[PATCH 125/138] drm/amd/powerplay: implement power_dpm_force_performance_level for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add get_performance_level and force_performance_level to implement the sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 23 +- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 2 +

[PATCH 127/138] drm/amd/powerplay: add function to update overdrive settings

2019-01-25 Thread Huang Rui
From: Likun Gao Add function of smu_update_specified_od8_value to modify specified overdrive value. Add fucntion of smu_update_od8_settings to update overdrive table. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h |

[PATCH 120/138] drm/amd/powerplay: add display_config_changed for SMU11.

2019-01-25 Thread Huang Rui
From: Chengming Gui add display_config_changed to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 42 ++ 1 file changed, 42 insertions(+) diff --git

[PATCH 121/138] drm/amd/powerplay: add apply_clock_adjust_rules for SMU11.

2019-01-25 Thread Huang Rui
From: Chengming Gui add apply_clock_adjust_rules to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 151 + 1 file changed, 151 insertions(+) diff --git

[PATCH 124/138] drm/amd/powerplay: add vega20_unforce_dpm_levels for SMU11.

2019-01-25 Thread Huang Rui
From: Chengming Gui add vega20_unforce_dpm_levels to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH 123/138] drm/amd/powerplay: add vega20_find/force_higest/lowest_dpm for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add vega20_find_highest_dpm_level, vega20_find_lowest_dpm_level, vega20_force_highest_dpm and vega20_force_lowest_dpm functions to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c |

[PATCH 122/138] drm/amd/powerplay: add vega20_notify_smc_display_config functions for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add vega20_notify_smc_display_config functions to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 45 ++ 1 file changed, 45 insertions(+) diff --git

[PATCH 116/138] drm/amd/powerplay: add mclk_latency_table struct and smu_clocks struct for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add mclk_latency_table struct and smu_clocks structi to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 20 1 file changed, 20 insertions(+) diff --git

[PATCH 117/138] drm/amd/powerplay: add enable_umd_pstate functions for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add enable_umd_pstate to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/include/amd_shared.h | 3 ++ drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 44 ++

[PATCH 118/138] drm/amd/powerplay: add get_profiling_clk_mask functions for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add get_profiling_clk_masking_clk_mask to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 40 ++ drivers/gpu/drm/amd/powerplay/vega20_ppt.h | 3 +++ 2 files

[PATCH 104/138] drm/amd/powerplay: implement interface to set watermarks for clock ranges

2019-01-25 Thread Huang Rui
This patch implements inteferface to set watermarks table for clock ranges on smu 11. It fills watermark table before it is written to SMC. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 11 +--

[PATCH 115/138] drm/amd/powerplay: add display_config to handle display config for SMU11.

2019-01-25 Thread Huang Rui
From: Chengming Gui add display_config to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 + drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 1 -

[PATCH 109/138] drm/amd/powerplay: get overdrive clock and voltage information

2019-01-25 Thread Huang Rui
From: Likun Gao Add sys interface to get overdrive clock and voltage information for smu11. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 ++- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 99

[PATCH 106/138] drm/amd/powerplay: add function to set default overdrive settings

2019-01-25 Thread Huang Rui
From: Likun Gao Add function of vega20_set_default_od8_setttings for vega20 with smu11 arch to setup default overdrive value. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 14 ++

[PATCH 110/138] drm/amd/powerplay: remove unnecessary checking in smu_hw_fini

2019-01-25 Thread Huang Rui
This patch removes unnecessary NULL pointer checking in smu_hw_fini, because kfree is able to handle NULL pointer case. Suggested-by: Hawking Zhang Signed-off-by: Huang Rui Reviewed-by: Hawking Zhang Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 54

[PATCH 113/138] drm/amd/powerplay: add watermarks related data structs and function for SMU11.

2019-01-25 Thread Huang Rui
From: Chengming Gui add write watermark table function and watermark flags to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

[PATCH 102/138] drm/amd/powerplay: add interface to get current clocks for display

2019-01-25 Thread Huang Rui
This patch fills the amd_pp_clock_info data for display, it will get the current info in that structure. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 2 + drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 78

[PATCH 119/138] drm/amd/powerplay: add set_uclk_to_highest_level for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui add set_uclk_to_highest_level to support sys interface for SMU11. Signed-off-by: Chengming Gui Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 43 +++--- 1 file changed, 40 insertions(+), 3 deletions(-) diff --git

[PATCH 112/138] drm/amd/powerplay: implement power_dpm_state sys interface for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui Add functions to get/set dpm state for SMU11. Signed-off-by: Chengming Gui Acked-by: Alex Deucher Acked-by: Kevin Wang Reviewd-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 +-

[PATCH 108/138] drm/amd/powerplay: print overdrive percentage information for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add function to get sclk or mclk overdrive percentage information for smu11. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 -- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++

[PATCH 114/138] drm/amd/powerplay: implement pp_power_profile_mode sys inerface for SMU11

2019-01-25 Thread Huang Rui
From: Chengming Gui Add set/get power profile mode functions. Added dependency interfaces: 1) vega20_set_activity_monitor_coeff 2) vega20_get_activity_monitor_coeff 3) conv_power_profile_to_pplib_workload Signed-off-by: Chengming Gui

[PATCH 111/138] drm/amd/powerplay: don't check hwmgr while using the sw smu

2019-01-25 Thread Huang Rui
While using the sw smu path, driver won't init hwmgr structure. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Likun Gao --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

[PATCH 107/138] drm/amd/powerplay: add golden dpm table to backup default DPM table

2019-01-25 Thread Huang Rui
From: Likun Gao Backup default DPM table into golden dpm table. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 11 +++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 ++-

[PATCH 105/138] drm/amd/powerplay: add function to store overdrive information for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add vega20_setup_od8_information function to store overdrive information from powerplay_table to smu_table which will used when setting od8. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 15 +

[PATCH 093/138] drm/amd/powerplay: add smu display configuration change function

2019-01-25 Thread Huang Rui
This patch adds display configuration change function that creates the new path with sw smu driver instead of powerplay. Signed-off-by: Huang Rui Reviewed-by: Evan Quan Reviewed-by: Kevin Wang --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 5

[PATCH 085/138] drm/amd/powerplay: implement sensor of get_gpu_power for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add sensor interface of get gpu power for debugfs and hwmon. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21 + 1 file changed, 21 insertions(+) diff --git

[PATCH 086/138] drm/amd/powerplay: implement sensor of get_gfx_vdd for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add sensor interface of gfx vdd for hwmon Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 31 ++ drivers/gpu/drm/amd/powerplay/vega20_ppt.h | 1 + 2 files changed, 32

[PATCH 091/138] drm/amd/powerplay: add the function to set deep sleep dcefclk

2019-01-25 Thread Huang Rui
This patch adds the function to set deep sleep dcefclk. It will be used on display part. Signed-off-by: Huang Rui Reviewed-by: Evan Quan Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 21

[PATCH 089/138] drm/amd/powerplay: implement sysfs of pp_cur_state function

2019-01-25 Thread Huang Rui
From: Kevin Wang add function of smu_get_currente_state for sw-smu. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 22 ++ drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 ++

[PATCH 101/138] drm/amd/powerplay: add interface to get current shallow sleep clocks

2019-01-25 Thread Huang Rui
This patch adds interface to get current shallow sleep clocks for display and in smu v11 didn't have this implementation. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 13 + 1 file changed, 13 insertions(+) diff --git

[PATCH 096/138] drm/amd/powerplay: add interface to get clock by type with latency for display (v2)

2019-01-25 Thread Huang Rui
This patch adds get clock by type with latency, display will use it to get current clocks with latency. v2: fix the missed mutex lock before return. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 21

[PATCH 094/138] drm/amd/powerplay: add get_clock_by_type interface for display

2019-01-25 Thread Huang Rui
This patch adds get_clock_by_type interface for display, in smu v11 didn't have the implementation. Signed-off-by: Huang Rui Reviewed-by: Evan Quan Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 6 ++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h

[PATCH 103/138] drm/amd/powerplay: add interface to notify smu enable pme restore register

2019-01-25 Thread Huang Rui
This patch adds interface to notify smu enable pme restore register for display and in smu v11 didn't have this implementation. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 8

[PATCH 099/138] drm/amd/powerplay: add interface to get dal power level

2019-01-25 Thread Huang Rui
This patch adds interface to get dal power level for display and in smu v11 didn't have this implementation. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 097/138] drm/amd/powerplay: add interface to get clock by type with voltage for display

2019-01-25 Thread Huang Rui
This patch adds inteface to get clock by type with voltage, display will use it to get current clocks with voltage. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 20 +---

[PATCH 098/138] drm/amd/powerplay: add interface to request display clock voltage

2019-01-25 Thread Huang Rui
This patch adds interface to request display clock voltage, display will use it to request current display clock voltage. Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Evan Quan --- .../drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 17 ++---

[PATCH 100/138] drm/amd/powerplay: add interface to get performance level

2019-01-25 Thread Huang Rui
This patch adds interface to get performance level for display and in smu v11 didn't have this implementation. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH 095/138] drm/amd/powerplay: add interface to get max high clocks for display

2019-01-25 Thread Huang Rui
This patch adds interface to get max high clocks for display and in smu v11 didn't have this implementation. Signed-off-by: Huang Rui Reviewed-by: Evan Quan Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c | 7 +++

[PATCH 092/138] drm/amd/powerplay: add two interfaces to set_active_display_count and store_cc6_data

2019-01-25 Thread Huang Rui
This patch adds two interfaces to set_active_display_count and store_cc6_data, they won't be used for smu11, and just be the placeholders for future asic on display to smu interface. Signed-off-by: Huang Rui Reviewed-by: Evan Quan Reviewed-by: Kevin Wang ---

[PATCH 087/138] drm/amd/powerplay: implement sensor of get feature mask

2019-01-25 Thread Huang Rui
From: Kevin Wang add sensor interface of feature mask for debugfs. this interface is not ip related function, so need move high level file to implement (amdgpu_smu) Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c |

[PATCH 081/138] drm/amd/powerplay: upload dpm level for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add function to support gfx_clk and mem_clk upload min and max dpm level for smu11. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 72 ++ 1 file changed, 72 insertions(+)

[PATCH 083/138] drm/amd/powerplay: implement sensor of SCLK and MCLK for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add sensor interface of SCLK and MCKL for sys interface and hwmon. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 8 1 file changed, 8 insertions(+) diff --git

[PATCH 084/138] drm/amd/powerplay: implement sensor of thermal_get_temperature for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add sensor interface of thermal temperature for debugfs and hwmon. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 26 ++ drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 1 +

[PATCH 090/138] drm/amd/powerplay: implement sysfs of pp_force_state for sw-smu

2019-01-25 Thread Huang Rui
From: Kevin Wang the SMU v11 doesn’t support pp_force_state so far, so we didn’t implement it. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

[PATCH 088/138] drm/amd/powerplay: implement sysfs of get num states function

2019-01-25 Thread Huang Rui
From: Kevin Wang add function smu_get_power_num_state function for sw-smu. it's only for sysfs interface, the power state feature is not ready for sw-smu. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 ++-

[PATCH 068/138] drm/amd/powerplay: add function to get power limit for smu11 (v2)

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_get_power_limit function to get power limit vaule. v2: update "set" to "get", it only implements "get" behavior. (Alex) Signed-off-by: Likun Gao Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4

[PATCH 070/138] drm/amd/powerplay: print clock levels for smu11 (v2)

2019-01-25 Thread Huang Rui
From: Likun Gao Add function to print current levels for smu11. v2: expose get_current_clk_freq for smu v11. (Kevin) Signed-off-by: Likun Gao Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 9 ++-

[PATCH 078/138] drm/amd/powerplay: implement is_support_sw_smu function for new smu

2019-01-25 Thread Huang Rui
From: Kevin Wang add this helper to check new sw-smu support. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc15.c | 2 +- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 23

[PATCH 076/138] drm/amd/powerplay: add function to start thermal control

2019-01-25 Thread Huang Rui
From: Likun Gao Add function to start thermal control for smu11 when smu hw_init. Signed-off-by: Likun Gao Acked-by: Alex Deucher Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4

[PATCH 072/138] drm/amd/powerplay: add function to get thermal range

2019-01-25 Thread Huang Rui
From: Likun Gao Add the function to get the min and max thermal value for vega20 with smu11 architecture. Signed-off-by: Likun Gao Acked-by: Alex Deucher Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 1 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12

[PATCH 073/138] drm/amd/powerplay: add function to set thermal range

2019-01-25 Thread Huang Rui
From: Likun Gao Add the function to set the correct min and max thermal value for smu11 Signed-off-by: Likun Gao Acked-by: Alex Deucher Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 32 +++ 1 file changed, 32 insertions(+) diff --git

[PATCH 080/138] drm/amd/powerplay: implement sysfs of pp_table for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add pp_table sysfs interface for new sw-smu. get: return pptable raw data set: write pptable raw data to pptable, then reset smu (hw_fini -> hw_init) Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 14 -

[PATCH 082/138] drm/amd/powerplay: force clock levels for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add function to set sclk or mclk level for smu11. Signed-off-by: Likun Gao Reviewed-by: Evan Quan Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 ++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +

[PATCH 077/138] drm/amd/powerplay: implement smu update table function

2019-01-25 Thread Huang Rui
From: Kevin Wang sometime, the driver need changed table data between driver and smu. this function can help update table data Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 30 ++

[PATCH 079/138] drm/amd/powerplay: implement sysfs of amdgpu_get_busy_percent for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add interface amdgpu_get_busy_percent for smu11 Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c| 7 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h| 5 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 62

[PATCH 055/138] drm/amd/powerplay: implement smu vega20_message_map for vega20

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements smu vega20_message_map to map the PPSMC messages from smu11 to specific asic. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 + drivers/gpu/drm/amd/powerplay/vega20_ppt.c | 101

[PATCH 074/138] drm/amd/powerplay: add function to enable thermal alert

2019-01-25 Thread Huang Rui
From: Likun Gao Add function to enable thermal alerts on thermal control for smu11. Signed-off-by: Likun Gao Acked-by: Alex Deucher Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 14 ++ 1 file changed, 14 insertions(+) diff --git

[PATCH 054/138] drm/amd/powerplay: add enum smu_msg_type to header

2019-01-25 Thread Huang Rui
From: Kevin Wang each asic with different message index, add this header to help top level smu code to send message. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 89 ++ 1 file changed, 89 insertions(+) diff

[PATCH 063/138] drm/amd/powerplay: implement smu feature functions

2019-01-25 Thread Huang Rui
From: Kevin Wang each ip will support different smu feature, the driver use bitmap to management this feature. bitmap: -allowed: sw driver to enable & disable some feature when driver init. -suppored: the feature is supproed. -enabled: the feature is enabled. Signed-off-by: Kevin Wang

[PATCH 066/138] drm/amd/powerplay: set defalut dpm table for smu

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_set_default_dpm_table function to set dpm table for smu11. Modified the sequence to populate smc pptable, as it should be done after related dpm feature is enabled. Signed-off-by: Likun Gao Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c |

[PATCH 060/138] drm/amd/powerplay: Change the allocate method of dpm context for smu11.

2019-01-25 Thread Huang Rui
From: Likun Gao Change the allocate method of dpm context as dpm_table is different bewteen vega20 and smu11. Signed-off-by: Likun Gao Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 ++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +---

[PATCH 075/138] drm/amd/powerplay: add function to set fan table to control thermal

2019-01-25 Thread Huang Rui
From: Likun Gao Add function of smu_v11_0_set_thermal_fan_table to set fan table for smu11. Signed-off-by: Likun Gao Acked-by: Alex Deucher Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 12 1 file changed, 12 insertions(+) diff --git

[PATCH 067/138] drm/amd/powerplay: add function to populate umd state clk.

2019-01-25 Thread Huang Rui
From: Likun Gao Add vega20_populate_umd_state_clk function to set pstate_sclk and pstate_mclk. Signed-off-by: Likun Gao Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 ++

[PATCH 065/138] drm/amd/powerplay: implement smu_notify_display_change function for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang add smu_notify_display_change function to send msg to smc to notify display is changed. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++

[PATCH 071/138] drm/amd/powerplay: add get_max_sustainable_clock function

2019-01-25 Thread Huang Rui
This patch adds get_max_sustainable_clock function for smu11. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 9 ++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 + drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 8 ++

[PATCH 064/138] drm/amd/powerplay: implement feature get functions

2019-01-25 Thread Huang Rui
From: Kevin Wang add smu feature operation function helper to deal with smu feature bitmap. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 37 ++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 5 2 files

[PATCH 069/138] drm/amd/powerplay: implement get_current_clk_freq for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements get_current_clk_freq for smu11 future use. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 24 2 files changed, 27

[PATCH 057/138] drm/amd/powerplay: replace SMU_MSG_XXX with PPSMC_MSG_XXX message index for smu11 (v2)

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch is to setup a common SMU_MSGs for smu11. We can support common MSG definitions for each asics under smu11. v2: move smu_v11_0_ppsmc.h to xxx_ppt.c level, because it depends on specific asic. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui ---

[PATCH 058/138] drm/amd/powerplay: add append_powerplay_table function

2019-01-25 Thread Huang Rui
It needs to add append_powerplay_table function to program the smc_dpm_table for PPTable_t. Signed-off-by: Huang Rui Acked-by: Alex Deucher Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 4 ++

[PATCH 061/138] drm/amd/powerplay: implement smu_init_display for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang Add smu_init_display function to send msg to smc to init display. Signed-off-by: Kevin Wang Reviewed-by: Huang Ray --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 4 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 drivers/gpu/drm/amd/powerplay/smu_v11_0.c

[PATCH 062/138] drm/amd/powerplay: implement smu_run_afll_btc function

2019-01-25 Thread Huang Rui
From: Kevin Wang Add smu_run_afll_btc function to send msg to smc to start run afll btc. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 ++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++

[PATCH 048/138] drm/amd/powerplay: add function to check pptable for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_check_pptable function for smu11. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 9 +

[PATCH 043/138] drm/amd/powerplay: implement get_clk_info_from_vbios function for smu11 (v2)

2019-01-25 Thread Huang Rui
This patch implements the get_clk_info_from_vbios function for smu11. We can do execute_vbios_cmd_table to fetch the clk value from vbios. v2: use the proper cpu_to_le[32|16]() and le[32|16]_to_cpu() macros to handle endianness. (Alex) Signed-off-by: Huang Rui Reviewed-by: Kevin Wang ---

[PATCH 045/138] drm/amd/powerplay: implement notify_memory_pool_location function for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements the notify_memory_pool_location function to send memory address to smc for dram logging. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 47 +++ 1 file changed, 47

[PATCH 038/138] drm/amd/powerplay: implement smu_init(fini)_fb_allocations function

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements smu_init_fb_allocations/smu_fini_fb_allocations function for smu to reserve the BOs for smc tables. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 60 +- 1 file changed, 59

[PATCH 041/138] drm/amd/powerplay: add data structure of bootup values

2019-01-25 Thread Huang Rui
This patch adds data structures for bootup values. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 16 1 file changed, 16 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h

  1   2   >