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

2019-01-25 Thread Koenig, Christian
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] >>> Expose the min and max vfreq for the connector via a

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

2019-01-25 Thread Koenig, Christian
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. Christian. > > I have also added the Link [1] in the ClangBuiltLinux

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

2019-01-25 Thread 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 with cache co

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

2019-01-25 Thread Sedat Dilek
[ CC Nick D. ] Hi Christian, Nick has posted a fix in [2]. Is that OK for you? I have also added the Link [1] in the ClangBuiltLinux issue tracker. Regards, - Sedat - [1] https://github.com/ClangBuiltLinux/linux/issues/327 [2] https://lkml.org/lkml/2019/1/24/1376 On Mon, Oct 22, 2018 at 10:42

xf86-video-amdgpu merge request !24 is ready for review

2019-01-25 Thread Michel Dänzer
https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/24 Thanks in advance for taking a look! -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _

[PATCH 003/138] drm/amd/powerplay: add firmware loading interface

2019-01-25 Thread Huang Rui
This patch adds firmware loading interface for smu. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 ++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 ++ 3 files changed, 15 insertions(+) diff -

[PATCH 002/138] drm/amd/powerplay: add smu11 sub block for SMU IP

2019-01-25 Thread Huang Rui
This patch add smu11 sub ip block skeleton as placeholder Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 20 drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2 ++ drivers/gpu/drm/amd/powerplay/i

[PATCH 000/138] The new SW SMU driver of amdgpu

2019-01-25 Thread Huang Rui
Hi all, The series of patches are to implement a new SW SMU driver for future asics. Background: The powerplay driver will be retired. The final version is for vega20 with SMU11. However, the future asic will use the new swSMU framework to implement as well. Here is the first version of new sw sm

[PATCH 006/138] drm/amd/powerplay: add placeholder of smu_initialize_pptable

2019-01-25 Thread Huang Rui
This patch adds placeholder of smu_initialize_pptable for smu. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu

[PATCH 004/138] drm/amd/powerplay: add fw load checking interface

2019-01-25 Thread Huang Rui
This patch adds fw load checking interface for smu. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 6 ++ drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 7 +++ 3 files changed, 16 insertions(+) diff

[PATCH 015/138] drm/amd/powerplay: add interface to write pptable (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to write pptable for smu. It's to copy pptable bo in the vram to smc with SMU MSGs such as SetDriverDramAddr and TransferTableDram2Smu. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 +

[PATCH 012/138] drm/amd/powerplay: add interface to parse pptable (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to parse pptable for smu. It's to parse pptable format and fill PPTable_t smc_pptable to smu_table_context structure. And read the smc_dpm_table from vbios, then fill it into smc_pptable. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- driv

[PATCH 001/138] drm/amd/powerplay: add new smu ip block

2019-01-25 Thread Huang Rui
This patch add amdgpu_smu ip block skeleton as placeholder. We plan use new smu ip block from Vega20. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 + drivers/gpu/drm/amd/powerplay/Makefile | 2 +- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 166

[PATCH 007/138] drm/amd/powerplay: add interface to init smc tables (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to init smc tables for smu. It is to create smu_table structure, and init smc tables such as TABLE_PPTABLE, TABLE_WATERMARKS, TABLE_SMU_METRICS, and etc. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_s

[PATCH 009/138] drm/amd/powerplay: add interface to get vbios bootup values (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to get vbios bootup values for smu. It's to get boot_values from vbios to set revision, gfxclk, and etc. v2: add detailed info to describe this function. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 + drivers/gpu/drm/amd/powerpla

[PATCH 013/138] drm/amd/powerplay: add interface to populate smc pptable (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to populate smc pptable for smu. It's to set initialized values (get from vbios) to dpm tables context such as gfxclk, memclk, dcefclk, and etc. And enable the DPM feature for each type of clks. v2: add detailed info to describe this function Signed-off-by: Huang Rui --

[PATCH 005/138] drm/amd/powerplay: add interface to read pptable from vbios

2019-01-25 Thread Huang Rui
This patch adds interface to read pptable from vbios for smu. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 19 ++- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/

[PATCH 033/138] drm/amdgpu: move get_index_into_master_table macro into atomfirmware header

2019-01-25 Thread Huang Rui
This patchs move get_index_into_master_table macro into atomfirmware header for future use on smu. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 2 -- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.h | 2 ++ 2 files changed, 2 insertions

[PATCH 026/138] drm/amd/powerplay: implement check_fw_status function for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang Add function of check firmware status funtions for smu11 Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 11 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 13 - 2 files changed, 23 insertions(+), 1

[PATCH 021/138] drm/amd/powerplay: add resume sequence placeholder for smu ip block

2019-01-25 Thread Huang Rui
This patch adds resume sequence placeholder for smu ip block. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 39 +- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/a

[PATCH 024/138] drm/amd/powerplay: add new ppsmc header for smu11 (v2)

2019-01-25 Thread Huang Rui
This header will be used for smc message handling. v2: add a license to the top of the header file (Alex) Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- .../gpu/drm/amd/powerplay/inc/smu_v11_0_ppsmc.h| 128 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c |

[PATCH 016/138] drm/amd/powerplay: add interface to set min dcef deep sleep (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to set min dcef deep sleep for smu. It's to set min deep sleep dce fclk with bootup value from vbios via SetMinDeepSleepDcefclk MSG. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8

[PATCH 031/138] drm/amd/powerplay: add smu table context structure

2019-01-25 Thread Huang Rui
This patch adds smu table context. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h ind

[PATCH 019/138] drm/amd/powerplay: add interface to notify memory pool location (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to notify memory pool location for smu. It's to use msg SetSystemVirtualDramAddr and DramLogSetDramAddr can notify pool location. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8 d

[PATCH 036/138] drm/amd/powerplay: implement smu dpm context functions for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements smu dpm context functions for smu v11. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 6 drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h | 26 ++ drivers/gpu/drm/amd/powerplay/sm

[PATCH 032/138] drm/amd/powerplay: add get atom data table helper

2019-01-25 Thread Huang Rui
This patch adds get atom data table helper for smu future use. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 17 + drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 4 2 files changed, 21 insertions(+) diff --git a/dr

[PATCH 014/138] drm/amd/powerplay: add interface to check fw version (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to check fw version for smu. It's to send msg GetDriverIfVersion to check if the return value is equal with DRIVER_IF_VERSION of smc header. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 8

[PATCH 011/138] drm/amd/powerplay: add interface to init fb allocations (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to init fb allocations for smu. It's to allocate vram bos to store smc table contents. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 13 + 1 file changed, 13 insertions(+) diff --g

[PATCH 023/138] drm/amd/powerplay: init microcode for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add function of init mircrocode for smu11. Signed-off-by: Likun Gao Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 47 ++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.

[PATCH 020/138] drm/amd/powerplay: add interfaces for smu resume

2019-01-25 Thread Huang Rui
SMU resume needs three more interfaces such as write_watermarks_table, set_last_dcef_min_deep_sleep_clk, and system_features_control. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/power

[PATCH 018/138] drm/amd/powerplay: add interface to allocate memory pool (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to allocate memory pool for smu. This memory pool will be used for SMC use and msg SetSystemVirtualDramAddr and DramLogSetDramAddr can notify it changed. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_s

[PATCH 008/138] drm/amd/powerplay: add interface to init power (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to init power function for smu. It's to create smu_power_context structure, and allocate smu_dpm_context and context size to fill the smu_power_context data. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdg

[PATCH 022/138] drm/amdgpu: enable new smu ip block for vega20

2019-01-25 Thread Huang Rui
Switch to new smu ip block since vega20. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/soc15.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index dd81721..0e60496 100644 --- a/drive

[PATCH 010/138] drm/amd/powerplay: add interface to check pptable (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to check pptable function for smu. It's to check if the format_revision in vbios is up to pptable header version, and the structure size is not 0. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c

[PATCH 028/138] drm/amd/powerplay: add pptable header for smu11

2019-01-25 Thread Huang Rui
This patch adds the pptable header for smu11. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- .../gpu/drm/amd/powerplay/inc/smu_v11_0_pptable.h | 147 + drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 1 + 2 files changed, 148 insertions(+) create mode 100644 d

[PATCH 035/138] drm/amd/powerplay: implement smu_init[fini]_smc_tables for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang Each SMU IP may have a different number of SMU tables, so these tables are allocated using dynamic memory Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 21 + drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 2

[PATCH 029/138] drm/amdgpu: update atomfirmware header for smu11

2019-01-25 Thread Huang Rui
This patch updates atomfirmware header on smu11 for future use. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/include/atomfirmware.h | 44 +- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 1 + 2 files changed, 38

[PATCH 039/138] drm/amd/powerplay: remove header of smu_v11_0_pptable

2019-01-25 Thread Huang Rui
From: Kevin Wang different ASICs have different pptables, so the header will move to asic source code to implement. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/

[PATCH 017/138] drm/amd/powerplay: add interface to set tool table location (v2)

2019-01-25 Thread Huang Rui
This patch adds interface to set tool table location for smu. Set PMSTATUSLOG table bo address with SetToolsDramAddr MSG for tools. v2: add detailed info to describe this function Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 7 ++- drivers/gpu/drm/amd/powerp

[PATCH 030/138] drm/amdgpu: update new members in atomfirmware

2019-01-25 Thread Huang Rui
This patch updates new members for fields to meet new atomfirmware header. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomf

[PATCH 034/138] drm/amd/powerplay: implement read_pptable_from_vbios function for smu11

2019-01-25 Thread Huang Rui
This patch implements the function of read_pptable_from_vbios for smu11. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drive

[PATCH 025/138] drm/amd/powerplay: implement smu send message functions for smu11 (v3)

2019-01-25 Thread Huang Rui
From: Kevin Wang Add function of smu send message for smu11 v2: fix the missing ) in define of smu_send_smc_msg_with_param v3: Use adev usec timeout for smu as well, the origin time 10 us is not enough. (Ray) Signed-off-by: Huang Rui Signed-off-by: Likun Gao Signed-off-by: Kevin Wang Review

[PATCH 027/138] drm/amd/powerplay: implement check_fw_version function for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang Add function of check firmware version for smu11 Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/driv

[PATCH 052/138] drm/amd/powerplay: add function to set min dcef deep sleep for smu11 (v2)

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_set_min_dcef_deep_sleep function for smu11. v2: fix coding error about set_min_dcef_deep_sleep (Kevin) Signed-off-by: Kevin Wang Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 18

[PATCH 037/138] drm/amd/powerplay: implement smu_init[fini]_power function for smu11

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements smu_init[fini]_power function for smu v11. 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 | 9 +++ drivers/gpu/drm/amd/powerplay/inc/smu_

[PATCH 040/138] drm/amd/powerplay: update pptable header for smu11

2019-01-25 Thread Huang Rui
This patch updates pptable header for smu v11. Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- .../gpu/drm/amd/powerplay/inc/smu_v11_0_pptable.h | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu_v11_0_pptable

[PATCH 053/138] drm/amd/powerplay: add function to set tool table location for smu11 (v2)

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_set_tool_table_location function for smu11. v2: fix the missed TABLE_PMSTATUSLOG bo creation which caused AGM hung. (Ray) Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 23

[PATCH 049/138] drm/amd/powerplay: update hw fini function to relase some memory

2019-01-25 Thread Huang Rui
From: Likun Gao Release memory of table_context->driver_pptable and table_context->ppt_information when smu hw fini. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 + 1 file changed, 5 insertions(+) diff --git a

[PATCH 044/138] drm/amd/powerplay: implement smu_alloc[free]_memory pool function

2019-01-25 Thread Huang Rui
From: Kevin Wang This patch implements smu_alloc[free]_memory pool function to reserve the memory pool bo. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 55 +- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 11 +

[PATCH 047/138] drm/amd/powerplay: add function to parse pptable for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_parse_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 | 20 drivers/gpu/drm/amd/p

[PATCH 046/138] drm/amd/powerplay: add vega20 pptable function file

2019-01-25 Thread Huang Rui
This patch adds the vega20_ppt.c to support ATOM_Vega20_POWERPLAYTABLE format for vega20 on smu11. It will be used to implement to asic specific pptable helpers. Signed-off-by: Huang Rui Reviewed-by: Likun Gao --- drivers/gpu/drm/amd/powerplay/Makefile | 2 +- drivers/gpu/drm/amd/power

[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 + drivers/gpu/drm/amd/powerplay/ve

[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 --- drive

[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 insertions(+)

[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 in

[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 b/drivers/gpu/drm/amd/powe

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

2019-01-25 Thread Huang Rui
This patch implements get_vbios_bootup_values function for smu11 to fetach firmwareinfo member from atombios. v2: use switch statement based on the content revision (Alex) Signed-off-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 59 ++

[PATCH 056/138] drm/amd/powerplay: use virtual msg index to replace asic-related msg index

2019-01-25 Thread Huang Rui
From: Kevin Wang Using virtual msg index is able to support all ASIC specific message values on one smu upper layer. Signed-off-by: Kevin Wang Reviewed-by: Huang Rui --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --g

[PATCH 050/138] drm/amd/powerplay: add function to populate smc pptable for smu11

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_populate_smc_pptable function for smu11. Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 42 +++ 1 file changed, 42 insertions(+) diff --git a/drivers/gpu/drm/am

[PATCH 051/138] drm/amd/powerplay: add function to write pptable for smu11 (v2)

2019-01-25 Thread Huang Rui
From: Likun Gao Add smu_v11_0_write_pptable and smu_v11_0_copy_table_to_smc function for smu11. v2: fix the build warning. (Ray) Signed-off-by: Likun Gao Reviewed-by: Huang Rui Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 60 +++ 1 file

[PATCH 059/138] drm/amd/powerplay: expose the function of smu read argument

2019-01-25 Thread Huang Rui
From: Likun Gao Expose the function of smu_read_smc_arg to get argument value from SMU11. Signed-off-by: Likun Gao Reviewed-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 3 +++ drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 3 ++- 2 files changed, 5 insertions(+), 1 de

[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 ++ drivers/gpu/drm

[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 +++ drivers/gpu/drm/amd/powerplay/vega20

[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 +--- drivers/gpu/drm/a

[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 a/drivers/gpu/drm/a

[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 ++ drivers/gpu/drm/amd/powerpla

[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 +++ drivers/gpu/drm/amd/

[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 ++ drivers/gp

[PATCH 064/138] drm/amd/powerplay: implement feature get&set 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 ch

[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 ins

[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 --- drivers/gpu/drm/amd/

[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 a/drivers/gpu/drm/amd/pow

[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 --gi

[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 Reviewed

[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 | 18

[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 ++ drivers/gpu/drm/amd/powerplay/inc

[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 ++- drivers/gpu/drm/amd/powerplay/inc/amdgp

[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 drivers/gpu/drm/amd

[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 a/dr

[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 - drivers/gpu/dr

[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 drivers/gpu/drm/amd/powerplay/in

[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 + drivers/gpu/drm/amd/powerplay/vega20_pp

[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 --- drivers/gpu/drm/amd/powerplay/inc/a

[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 | 21

[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(+) di

[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 a/drivers/gpu/drm/amd/powerplay/

[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 + drive

[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 b/drivers/gp

[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 ++- drivers/gpu/drm/amd/powe

[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 +++ drivers/gpu/drm/amd/powerplay/inc/amdgp

[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 a/drivers/gpu/drm/amd/powerplay/

[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 +--- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu

[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 ++--- drivers/gpu/drm/amd/powerpl

[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 a/drivers/gpu

[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

  1   2   >