[PATCH] drm/amdgpu: Limit the max mc address to AMDGPU_VA_HOLE_START

2018-09-29 Thread Emily Deng
For the vram_start is 0 case, the gart range will be from 0x to 0x1FFF, which will cause the sdma engine hang. So limit the mc address to AMDGPU_VA_HOLE_START. Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 +++-- 1 file changed, 3 insertio

[PATCH 6/6] drm/amdgpu: Drop dead define in amdgpu.h

2018-09-29 Thread Rex Zhu
the struct was not in use any more. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 28 1 file changed, 28 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index 7c44871..c21d9b9 100644 --- a/drive

[PATCH 4/6] drm/amdgpu: Don't allocate memory for ucode when suspend

2018-09-29 Thread Rex Zhu
driver don't release the ucode memory when suspend. so don't need to allocate bo when resume back. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm

[PATCH 2/6] drm/amdgpu: Move gfx flag in_suspend to adev

2018-09-29 Thread Rex Zhu
Move in_suspend flag to adev from gfx, so can be used in other ip blocks, also keep consistent with gpu_in_reset flag. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h|

[PATCH 5/6] drm/amd/pp: Fix memory leak on Si/CI/AI dgpu asics

2018-09-29 Thread Rex Zhu
On SI/CI/AI, driver still need to release smu's fw, it was not related to other hw ip's fw load_type. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c

[PATCH 1/6] drm/amdgpu: Remove FW_LOAD_DIRECT type support on VI

2018-09-29 Thread Rex Zhu
AMDGPU_FW_LOAD_DIRECT is used for bring up. Now it don't work any more. so remove the support. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 3 - drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 249 ++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c|

[PATCH 3/6] drm/amdgpu: Fix cg/pg unexpected disabled when hw init failed

2018-09-29 Thread Rex Zhu
Check the ip blocks late_initialized state before enable/disable cg/pg, so if hw init failed, cg/pg function will not be executed. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 1/3] drm/amd/pp: Refine function iceland_start_smu

2018-09-29 Thread Rex Zhu
if upload firmware failed, no matter how many times the function runs again, the same error will be encountered. so remove the duplicated code. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) dif

[PATCH 3/3] drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function

2018-09-29 Thread Rex Zhu
The request_smu_load_fw of VI is used to load gfx/sdma ip's firmware. Check whether the gfx/sdma firmware have been loaded successfully in this callback function. if failed, driver can exit to avoid gpu hard hung. if successful, clean the flag reload_fw to avoid duplicated fw load. when suspend/re

[PATCH 2/3] drm/amd/pp: Setup SoftRegsStart before request smu load fw

2018-09-29 Thread Rex Zhu
need to know SoftRegsStart value to visit the register UcodeLoadStatus to check fw loading state. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c | 11 ++- drivers/gpu/drm/amd/powerplay/smumgr/tonga_smumgr.c | 9 + 2 files changed, 19 insertion

[PATCH 2/4] drm/amd/pp: Implement load_firmware interface

2018-09-29 Thread Rex Zhu
with this interface, gfx/sdma can be initialized before smu. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.

[PATCH 3/4] drm/amdgpu: Add fw load in gfx_v8 and sdma_v3.

2018-09-29 Thread Rex Zhu
gfx and sdma can be initialized before smu. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 11 +++ drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c | 8 2 files changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgp

[PATCH 1/4] drm/amd/pp: Not allocate ucode bo in smu hw init

2018-09-29 Thread Rex Zhu
ucode bo is needed by request_smu_load_fw, the request_smu_load_fw maybe called by gfx/sdma before smu hw init. so move amdgpu_ucode_bo_init to request_smu_lowd_fw. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 3 --- drivers/gpu/drm/amd/powerplay/smumgr/smu7_sm

[PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence

2018-09-29 Thread Rex Zhu
initialize gfx/sdma before dpm features enabled. and disable dpm features before gfx/sdma fini. Acked-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/cik.c | 17 + drivers/gpu/drm/amd/amdgpu/si.c| 13 +++-- drivers/gpu/drm/amd/amdgpu/soc15.c

RE: [PATCH 1/6] drm/amdgpu: Remove FW_LOAD_DIRECT type support on VI

2018-09-29 Thread Quan, Evan
Instead of change the fw load type to AMDGPU_FW_LOAD_SMU silently, it's better to warn/error out if user specify FW_LOAD_DIRECT load type. Regards, Evan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:15 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex

RE: [PATCH 3/6] drm/amdgpu: Fix cg/pg unexpected disabled when hw init failed

2018-09-29 Thread Quan, Evan
Comment inline > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:15 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 3/6] drm/amdgpu: Fix cg/pg unexpected disabled when hw > init failed > > Check the ip blocks late_initialized state bef

RE: [PATCH 2/6] drm/amdgpu: Move gfx flag in_suspend to adev

2018-09-29 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:15 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 2/6] drm/amdgpu: Move gfx flag in_suspend to adev > > Move in_suspend flag to adev from gfx, so can be used in

RE: [PATCH 4/6] drm/amdgpu: Don't allocate memory for ucode when suspend

2018-09-29 Thread Quan, Evan
The patch is fine. But i can not see where amdgpu_ucode_init_bo is called on resume. Regards, Evan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:15 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 4/6] drm/amdgpu: Don't allocate mem

RE: [PATCH 6/6] drm/amdgpu: Drop dead define in amdgpu.h

2018-09-29 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:15 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 6/6] drm/amdgpu: Drop dead define in amdgpu.h > > the struct was not in use any more. > > Signed-off-by: Rex

RE: [PATCH 5/6] drm/amd/pp: Fix memory leak on Si/CI/AI dgpu asics

2018-09-29 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:15 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 5/6] drm/amd/pp: Fix memory leak on Si/CI/AI dgpu asics > > On SI/CI/AI, driver still need to release smu's fw

RE: [PATCH 3/3] drm/amd/pp: Refine smu7/8 request_smu_load_fw callback function

2018-09-29 Thread Quan, Evan
Series is Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:17 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 3/3] drm/amd/pp: Refine smu7/8 request_smu_load_fw > callback function > > The request_smu_load_fw o

RE: [PATCH 3/4] drm/amdgpu: Add fw load in gfx_v8 and sdma_v3.

2018-09-29 Thread Quan, Evan
Will the pp_funcs->load_firmware be called twice? Regards, Evan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:19 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 3/4] drm/amdgpu: Add fw load in gfx_v8 and sdma_v3. > > gfx and sdma c

RE: [PATCH 1/4] drm/amd/pp: Not allocate ucode bo in smu hw init

2018-09-29 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:19 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 1/4] drm/amd/pp: Not allocate ucode bo in smu hw init > > ucode bo is needed by request_smu_load_fw, the reque

RE: [PATCH 2/4] drm/amd/pp: Implement load_firmware interface

2018-09-29 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:19 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 2/4] drm/amd/pp: Implement load_firmware interface > > with this interface, gfx/sdma can be initialized before

RE: [PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence

2018-09-29 Thread Quan, Evan
Reviewed-by: Evan Quan > -Original Message- > From: amd-gfx On Behalf Of Rex > Zhu > Sent: 2018年9月30日 0:19 > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence > > initialize gfx/sdma before dpm features enabled. >

RE: [PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence

2018-09-29 Thread Jin, Jian-Rong
Thanks Zhi! -Original Message- From: amd-gfx On Behalf Of Quan, Evan Sent: 2018年9月30日 12:20 To: Zhu, Rex ; amd-gfx@lists.freedesktop.org Cc: Zhu, Rex Subject: RE: [PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence Reviewed-by: Evan Quan > -Original Message- > From:

Recall: [PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence

2018-09-29 Thread Jin, Jian-Rong
Jin, Jian-Rong would like to recall the message, "[PATCH 4/4] drm/amdgpu: Change the gfx/sdma init/fini sequence". ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 2/5] drm/amdgpu: Add new AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM sensor

2018-09-29 Thread Rex Zhu
For getting the min/max fan speed in RPM units. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h index 8593850..97001a6

[PATCH 1/5] drm/amdgpu: Refine uvd_v6/7_0_enc_get_destroy_msg

2018-09-29 Thread Rex Zhu
1. make uvd_v7_0_enc_get_destroy_msg static 2. drop a function variable that always true Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 10 +++--- drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c | 12 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/driv

[PATCH 3/5] drm/amd/pp: Implement AMDGPU_PP_SENSOR_MIN/MAX_FAN_RPM

2018-09-29 Thread Rex Zhu
so user can query the RPM range Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c| 6 ++ drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b

[PATCH 4/5] drm/amdgpu: Add fan RPM setting via sysfs

2018-09-29 Thread Rex Zhu
Add fan1_target for get/set fan speed in RPM unit Add fan1_min/fan1_max for get min, max fan speed in RPM unit Add fan1_enable to enable/disable the fan1 sensor v2: query the min/max rpm gpu support instand of hardcode. Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.h|

[PATCH 5/5] drm/amdgpu: Disable sysfs pwm1 if not in manual fan control

2018-09-29 Thread Rex Zhu
Following lm-sensors 3.0.0, Only enable pwm1 sysfs when fan control mode(pwm1_enable) in manual Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu