OSDN Git Service

uclinux-h8/linux.git
5 years agodrm/amd/display: use fixed-width data type for soc bounding box struct
Xiaojie Yuan [Tue, 19 Mar 2019 06:27:04 +0000 (14:27 +0800)]
drm/amd/display: use fixed-width data type for soc bounding box struct

since it's firmware.

Signed-off-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: Split gpu_info_soc_bounding_box out from amdgpu_ucode.h
Leo Li [Wed, 3 Apr 2019 21:20:49 +0000 (17:20 -0400)]
drm/amdgpu: Split gpu_info_soc_bounding_box out from amdgpu_ucode.h

DC needs to include the soc bounding box when initializing HW resources.

Including amdgpu_ucode.h directly will cause warnings, since amdgpu.h is
required to define amdgpu_device. The solution here is to split the
bounding box structs into a different header, then include it in both
amdgpu_ucode.h, and relevant DC HW resource files.

Signed-off-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/display: Read soc_bounding_box from gpu_info (v2)
Harry Wentland [Tue, 7 May 2019 19:34:21 +0000 (14:34 -0500)]
drm/amd/display: Read soc_bounding_box from gpu_info (v2)

[WHY]
We don't want to expose sensitive ASIC information before ASIC release.

[HOW]
Encode the soc_bounding_box in the gpu_info FW (for Linux) and read it
at driver load.

v2: fix warning when CONFIG_DRM_AMD_DC_DCN2_0 is not set (Alex)

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: notify smu with active display count
hersen wu [Tue, 21 May 2019 20:03:28 +0000 (16:03 -0400)]
drm/amd/powerplay: notify smu with active display count

when dc update clocks via smu, smu needs to know how many
displays active. this interface is for dc notify number
of active displays to smu.

Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: allow dc request uclk change
hersen wu [Wed, 22 May 2019 14:57:40 +0000 (10:57 -0400)]
drm/amd/powerplay: allow dc request uclk change

when dc set mode or color format in frame buffer
change, it may request clock changes, like dispclk,
dcfclk, uclk. after smu get clock requests, smu
will make decision.

Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: initialize THM & CLK IP registers base address
Hawking Zhang [Sat, 15 Jun 2019 15:14:30 +0000 (23:14 +0800)]
drm/amdgpu: initialize THM & CLK IP registers base address

was missed before.

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: fix PA_SC_FIFO_SIZE for Navi10 (v2)
Marek Olšák [Tue, 28 May 2019 22:13:00 +0000 (18:13 -0400)]
drm/amdgpu: fix PA_SC_FIFO_SIZE for Navi10 (v2)

Proper size is 0.

v2: squash in whitespace fixes (Ernst Sjöstrand)

Signed-off-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: remove unsupport function set_thermal_fan_table for navi10
Kevin Wang [Thu, 30 May 2019 11:22:28 +0000 (19:22 +0800)]
drm/amd/powerplay: remove unsupport function set_thermal_fan_table for navi10

the PPSMC_MSG_SetFanTemperatureTarget is not support on 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>
5 years agodrm/amd/powerplay: enable BACO feature as WAR
Jack Xiao [Sat, 1 Jun 2019 02:35:12 +0000 (10:35 +0800)]
drm/amd/powerplay: enable BACO feature as WAR

It would hit SMU fw bug without BACO enablement when audio
driver put audio device to D3 state. Before the bug in SMU fw
get fixed, enable BACO feature as WAR.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: use pp_feature_mask to control uclk(mclk) dpm enabled
Kevin Wang [Thu, 30 May 2019 02:28:11 +0000 (10:28 +0800)]
drm/amd/powerplay: use pp_feature_mask to control uclk(mclk) dpm enabled

the uclk dpm feature is not work well on all navi10 asic,
use pp feature mask module parameter to control it.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: add new navi10 DIDs
tiancyin [Thu, 30 May 2019 03:04:11 +0000 (11:04 +0800)]
drm/amdgpu: add new navi10 DIDs

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>
5 years agodrm/amd/powerplay: add ppt interface version log
tiancyin [Mon, 20 May 2019 10:21:59 +0000 (18:21 +0800)]
drm/amd/powerplay: add ppt interface version log

Include the interface version as well.

Signed-off-by: tiancyin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/gfx10: update to latest golden setting
Alex Deucher [Tue, 4 Jun 2019 19:37:05 +0000 (14:37 -0500)]
drm/amdgpu/gfx10: update to latest golden setting

Fix UTCL1_CGTT_CLK_CTRL

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/powerplay/vega20: use correct table index
Alex Deucher [Thu, 30 May 2019 05:51:44 +0000 (00:51 -0500)]
drm/amdgpu/powerplay/vega20: use correct table index

Use the SMU_* variant so we look up the correct index.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN: enable indirect DPG SRAM mode
Leo Liu [Mon, 27 May 2019 14:49:19 +0000 (10:49 -0400)]
drm/amdgpu/VCN: enable indirect DPG SRAM mode

This is default mode for VCN2.x now

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN: implement indirect DPG SRAM mode
Leo Liu [Mon, 27 May 2019 14:46:25 +0000 (10:46 -0400)]
drm/amdgpu/VCN: implement indirect DPG SRAM mode

SRAM will be programmed by PSP

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN: add buffer for indirect SRAM usage
Leo Liu [Fri, 24 May 2019 18:07:41 +0000 (14:07 -0400)]
drm/amdgpu/VCN: add buffer for indirect SRAM usage

This will be used later for indirect SRAM mode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: disable fw dstate when gfxoff is enabled
Jack Xiao [Tue, 28 May 2019 13:47:05 +0000 (21:47 +0800)]
drm/amd/powerplay: disable fw dstate when gfxoff is enabled

SMU FW has bug that it would cause hung when both fw dstate and
gfxoff are enabled at the same time.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: update smu11_driver_if_navi10.h
Jack Xiao [Tue, 28 May 2019 07:43:02 +0000 (15:43 +0800)]
drm/amd/powerplay: update smu11_driver_if_navi10.h

update the smu11_driver_if_navi10.h since navi10 smu fw
update to 42.23

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/psp: add new psp interface for vcn updating sram
Jack Xiao [Tue, 14 May 2019 03:31:04 +0000 (11:31 +0800)]
drm/amdgpu/psp: add new psp interface for vcn updating sram

PSP leverages the existing fw loading function for vcn updating sram.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/psp: convert ucode id to psp ucode id
Jack Xiao [Tue, 14 May 2019 03:53:57 +0000 (11:53 +0800)]
drm/amdgpu/psp: convert ucode id to psp ucode id

Convert ucode id to the corresponding psp ucode id.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: add corresponding vcn ram ucode id
Jack Xiao [Tue, 14 May 2019 03:36:33 +0000 (11:36 +0800)]
drm/amdgpu: add corresponding vcn ram ucode id

Add VCN RAM ucode id in corresponding to psp ucode id.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/psp: add new VCN RAM ucode id to psp
Jack Xiao [Tue, 14 May 2019 03:26:52 +0000 (11:26 +0800)]
drm/amdgpu/psp: add new VCN RAM ucode id to psp

PSP supports to program vcn sram by ucode loading interface.

Signed-off-by: Jack Xiao <Jack.Xiao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu: enable VCN2.0 DPG mode
Leo Liu [Wed, 15 May 2019 17:58:20 +0000 (13:58 -0400)]
drm/amdgpu: enable VCN2.0 DPG mode

It will be the default for VCN2.x family

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN2.0: add DPG pause mode
Leo Liu [Fri, 24 May 2019 16:51:48 +0000 (12:51 -0400)]
drm/amdgpu/VCN2.0: add DPG pause mode

Pause the DPG when not doing decode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN2.0: add DPG mode start and stop (v2)
Leo Liu [Tue, 14 May 2019 18:36:42 +0000 (14:36 -0400)]
drm/amdgpu/VCN2.0: add DPG mode start and stop (v2)

This is for using SRAM directly

v2: rebase (Alex)

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN2.0: add direct SRAM read and write
Leo Liu [Fri, 24 May 2019 16:19:00 +0000 (12:19 -0400)]
drm/amdgpu/VCN2.0: add direct SRAM read and write

This will be the basic and used for DPG mode

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/VCN2.0 remove unused Macro and declaration
Leo Liu [Tue, 14 May 2019 16:55:54 +0000 (12:55 -0400)]
drm/amdgpu/VCN2.0 remove unused Macro and declaration

Just for cleanup

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: simplified od_settings for each asic
Kevin Wang [Mon, 17 Jun 2019 18:17:27 +0000 (13:17 -0500)]
drm/amd/powerplay: simplified od_settings for each asic

the od_settings is asic related data, so move it to asic file.

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>
5 years agodrm/amd/powerplay: move od_default_setting callback to asic file
Kevin Wang [Tue, 21 May 2019 07:37:24 +0000 (15:37 +0800)]
drm/amd/powerplay: move od_default_setting callback to asic file

the set default od_setting is asic related function,
so move thic code to vega20_ppt file.

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>
5 years agodrm/amd/powerplay: move od8_setting helper function to vega20_ppt
Kevin Wang [Tue, 21 May 2019 07:19:22 +0000 (15:19 +0800)]
drm/amd/powerplay: move od8_setting helper function to vega20_ppt

these callback functions is only used for vega20 asic, to be compatible
other asics,need to move this code to vega20_ppt file

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>
5 years agodrm/amd/powerplay: fix clk type name error OD_SCLK OD_MCLK
Kevin Wang [Thu, 16 May 2019 10:24:08 +0000 (18:24 +0800)]
drm/amd/powerplay: fix clk type name error OD_SCLK OD_MCLK

use sw-smu clk type name to replace legacy clk type name

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>
5 years agodrm/amd/powerplay: fix deadlock issue for smu_force_performance_level
Kevin Wang [Wed, 15 May 2019 07:59:38 +0000 (15:59 +0800)]
drm/amd/powerplay: fix deadlock issue for smu_force_performance_level

the smu->mutex is internal lock resource in sw-smu, some functions will use
it at the same time, so it maybe will cause deadlock issue.
this patch fix this issue in smu_force_performance_level function.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd: the data retured from PRT is expected to be 0
Jack Xiao [Mon, 20 May 2019 04:16:19 +0000 (12:16 +0800)]
drm/amd: the data retured from PRT is expected to be 0

The dummy page for returning from PRT resides inside system memory,
need set system flag bit in VM_L2_CNTL.

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>
5 years agodrm/amdgpu/gfx10: update gfx golden settings
tiancyin [Wed, 5 Jun 2019 21:57:44 +0000 (16:57 -0500)]
drm/amdgpu/gfx10: update gfx golden settings

add new registers: mmPA_SC_ENHANCE_1, mmTCP_CNTL,
update registers: mmDB_DEBUG4, mmUTCL1_CTRL

Reviewed-by: Xiaojie Yuan <xiaojie.yuan@amd.com>
Signed-off-by: tiancyin <tianci.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amdgpu/powerplay: add license to smu11 header
Alex Deucher [Wed, 22 May 2019 16:58:18 +0000 (11:58 -0500)]
drm/amdgpu/powerplay: add license to smu11 header

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: add interface to get uclk dpm table
hersen wu [Tue, 21 May 2019 19:02:23 +0000 (15:02 -0400)]
drm/amd/powerplay: add interface to get uclk dpm table

dc needs get uclk dpm table for bandwidth calculation

Signed-off-by: hersen wu <hersenxs.wu@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>
5 years agodrm/amd/powerplay: wake up azalia from d3 by sending smu message
hersen wu [Tue, 21 May 2019 19:38:59 +0000 (15:38 -0400)]
drm/amd/powerplay: wake up azalia from d3 by sending smu message

this is hw workaround to wake up azalia from d3. display asic
and azalia are two different pci devices. while display asic
wake from d3, current hw does not send signal to azalia.
workaround: display driver ask smu send message to azalia device
to let azalia wake up.

Defintion of SMU message, like PPSMC_MSG_BacroAudioD3PME, is per
asic. It is shared by different OS.

Signed-off-by: hersen wu <hersenxs.wu@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>
5 years agodrm/amd/powerplay: notify smu with active display count
hersen wu [Thu, 30 May 2019 04:30:32 +0000 (23:30 -0500)]
drm/amd/powerplay: notify smu with active display count

when dc update clocks via smu, smu needs to know how many
displays active. this interface is for dc notify number
of active displays to smu.

Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: allow dc request uclk change
hersen wu [Thu, 30 May 2019 04:28:55 +0000 (23:28 -0500)]
drm/amd/powerplay: allow dc request uclk change

when dc set mode or color format in frame buffer
change, it may request clock changes, like dispclk,
dcfclk, uclk. after smu get clock requests, smu
will make decision.

Signed-off-by: hersen wu <hersenxs.wu@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: remove smu callback funciton get_mclk(get_sclk)
Kevin Wang [Tue, 4 Jun 2019 09:38:42 +0000 (17:38 +0800)]
drm/amd/powerplay: remove smu callback funciton get_mclk(get_sclk)

remove smu callback: get_mclk, get_sclk.
because the function smu_get_dpm_freq_range has the same function.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: remove smu mutex lock in smu_hw_init
Kevin Wang [Tue, 4 Jun 2019 09:41:48 +0000 (17:41 +0800)]
drm/amd/powerplay: remove smu mutex lock in smu_hw_init

the smu mutex lock is unnecessary in smu hw init.

Signed-off-by: Kevin Wang <kevin1.wang@amd.com>
Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
5 years agodrm/amd/powerplay: add thermal ctf support for navi10
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>
5 years agodrm/amd/powerplay: fix no statements in function returning non-void
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>
5 years agodrm/amd/powerplay: move get_thermal_temperature_range to ppt funcs
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>
5 years agodrm/amd/powerplay: move function thermal_get_temperature to veag20_ppt
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>
5 years agodrm/amd/powerplay: move function get_metrics_table to vega20_ppt
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>
5 years agodrm/amd/powerplay: move power_dpm_force_performance_level to amdgpu_smu file
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>
5 years agodrm/amd/powerplay: enable uclk dpm default on navi10
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>
5 years agodrm/amd/powerplay: enable ac/dc feature on navi10
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>
5 years agodrm/amd/powerplay: enable gfxclk ds,dcefclk ds and fw dstate on navi10
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>
5 years agodrm/amd/powerplay: add sclk sysfs interface support for navi10
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>
5 years agodrm/amdgpu: correct reference clock value on navi10
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>
5 years agodrm/amd/powerplay/smu11: disable some pp features on navi10 A0 secure board
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>
5 years agodrm/amd/powerplay/smu11: add secure board check function (v2)
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>
5 years agodrm/amd/powerplay/smu11: enable ds socclk by default
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>
5 years agodrm/amd/powerplay: fix amdgpu_pm_info show gpu load error
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>
5 years agodrm/amd/powerplay: simplify the interface of get_gpu_power
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>
5 years agodrm/amd/powerplay: simplify the interface of get_current_activity_percent
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>
5 years agodrm/amd/powerplay: fix dpm freq unit error (10KHz -> Mhz)
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>
5 years agoamd/powerplay: update the vcn pg
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>
5 years agodrm/amd/powerplay: add function read_sensor for navi10
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>
5 years agodrm/amd/powerplay: add function set_watermarks_table function for navi10
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>
5 years agodrm/amd/powerplay: add function notify_smc_display_config_change for navi10
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>
5 years agodrm/amd/powerplay: add function get_profiling_clk_mask for navi10
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>
5 years agodrm/amd/powerplay: add funciton get[set]_power_profile_mode for navi10 (v2)
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>
5 years agodrm/amd/powerplay: add function get_workload_type_map for swsmu
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>
5 years agodrm/amd/powerplay: remove upload_dpm_level function for vega20
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>
5 years agodrm/amd/powerplay: add function get_fan_speed_percent for navi10
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>
5 years agodrm/amd/powerplay: add function set_thermal_fan_table for navi10
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>
5 years agodrm/amd/powerplay: add function is_dpm_running for navi10
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>
5 years agodrm/amd/powerplay: move read sensor of UVD[VCE]_POWER to amdgpu_smu file
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>
5 years agodrm/amd/powerplay: add function get_current_activity_percent for navi10
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>
5 years agodrm/amd/powerplay: add function get_gpu_power for navi10
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>
5 years agodrm/amd/powerplay: add function unforce_dpm_levels for navi10
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>
5 years agodrm/amd/powerplay: add funciton force_dpm_limit for navi10
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>
5 years agodrm/amd/powerplay: add function display_configuration_changed for navi10
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>
5 years agodrm/amd/powerplay: add function pre_display_config_changed for navi10
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>
5 years agodrm/amd/powerplay: add function get_clock_by_type_with_latency for navi10
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>
5 years agodrm/amd/powerplay: add function populate_umd_state_clk for navi10
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>
5 years agodrm/amd/powerplay: add function force_clk_levels for navi10
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>
5 years agodrm/amd/powerplay: add helper function of smu_set_hard_freq_range
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>
5 years agodrm/amd/powerplay: add helper function of smu_set_soft_freq_range
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>
5 years agodrm/amd/powerplay: add helper function of smu_get_dpm_freq_range
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>
5 years agodrm/amd/powerplay: add function print_clk_levels for navi10
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>
5 years agodrm/amd/powerplay: add helper function to get dpm freq informations
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>
5 years agodrm/amd/powerplay: add function get current clock freq interface for navi10
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>
5 years agodrm/amdgpu/gfx10: require to pin/unpin CSIB BO when suspend/resume
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>
5 years agodrm/amdgpu/gfx10: remove unnecessary waiting on gfx inactive
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>
5 years agodrm/amdgpu: RLC must be disabled after SMU when S3 on navi
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>
5 years agodrm/amd/powerplay/smu11: disable PLL shutdown when gfxoff enabled
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>
5 years agodrm/amd/powerplay: disable uclk dpm by default
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>
5 years agodrm/amdgpu/VCN2.0: remove powergating for UVDW tile
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>
5 years agoamd/powerplay: enable uclk dpm
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>
5 years agoamd/powerplay: fix the issue of uclk dpm
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>
5 years agodrm/amdgpu/gfx10: fix unbalanced MAP/UNMAP_QUEUES when async_gfx_ring is disabled
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>
5 years agodrm/amdgpu/gfx10: drop redundant se/sh selection
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>
5 years agodrm/amdgpu/mes10.1: enable mes FW backdoor loading
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>
5 years agodrm/amdgpu/mes10.1: implement mes enablement function
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>
5 years agodrm/amdgpu/mes10.1: implement MES firmware backdoor loading
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>