[PATCH] drm/amdgpu: Enable mode-1 reset for RAS recovery in fatal error mode

2022-11-14 Thread YiPeng Chai
The patch is enabling mode-1 reset for RAS recovery in fatal error mode. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c| 7 ++- 2 files changed, 10 insertions

[PATCH] drm/amdgpu: Fixed the problem that ras error can't be queried after gpu recovery is completed

2022-11-13 Thread YiPeng Chai
Amdgpu_ras_set_error_query_ready is called at the start of amdgpu_device_gpu_recover to disable query ras error, but the code behind only enables query ras error in full reset path, but not in soft reset path, emergency restart path and skip the hardware reset path. Signed-off-by: YiPeng Chai

[PATCH] drm/amdgpu: Add umc channel index mapping table for umc_v8_10

2022-11-13 Thread YiPeng Chai
Add umc channel index mapping table for umc_v8_10. Signed-off-by: YiPeng Chai Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 - drivers/gpu/drm/amd/amdgpu/umc_v8_10.c | 10 ++ drivers/gpu/drm/amd/amdgpu/umc_v8_10.h | 4 3 files changed, 18

[PATCH] drm/amdgpu: Fixed ras warning when uninstalling amdgpu

2022-09-19 Thread YiPeng Chai
. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index e55f106621ef..3deb716710e6 100644 --- a/drivers/gpu/drm/amd/amdgpu

[PATCH V3 3/3] drm/amd/pm: Remove redundant check condition

2022-09-08 Thread YiPeng Chai
condition checks, so the first conditional check in amdgpu_pm_sysfs_fini can be removed. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 5e318b3f6c0f

[PATCH V3 2/3] drm/amdgpu: Fixed psp fence and memory issues when removing amdgpu device

2022-09-08 Thread YiPeng Chai
pu_device_gpu_recover, then amdgpu_fill_buffer will not be called when psp_suspend is called. 2. Free psp ring memory in psp_sw_fini. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 - drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 1 + drivers/gpu/drm/am

[PATCH V3 1/3] drm/amdgpu: Adjust removal control flow for smu v13_0_2

2022-09-08 Thread YiPeng Chai
acy: .hw_fini -> .early_fini -> .sw_fini. Since .suspend has been called when removing the first device, except the resumed phase1 basic ip blocks, all of other ip blocks .hw_fini of current device will do nothing. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/a

[PATCH V2] drm/amdgpu: Adjust removal control flow for smu v13_0_2

2022-09-06 Thread YiPeng Chai
the global variable amdgpu_device_remove_cnt and add a variable to the structure amdgpu_hive_info. 3. Use hive to detect the first removed device instead of a global variable. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++ drivers/gpu/drm/amd/amdgpu

[PATCH V2] drm/amdgpu: TA unload messages are not actually sent to psp when amdgpu is uninstalled

2022-09-01 Thread YiPeng Chai
amdgpu_pci_remove. 3. Since amdgpu_device_fini_hw is called by amdgpu_driver_unload_kms, remove the unplug check to release device mmio resource in amdgpu_device_fini_hw before calling drm_dev_unplug. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +-- drive

[PATCH V2 2/2] drm/amdgpu: fix hive reference leak when adding xgmi device

2022-08-16 Thread YiPeng Chai
Only amdgpu_get_xgmi_hive but no amdgpu_put_xgmi_hive which will leak the hive reference. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH V2 1/2] drm/amdgpu: Move psp_xgmi_terminate call from amdgpu_xgmi_remove_device to psp_hw_fini

2022-08-16 Thread YiPeng Chai
from amdgpu_xgmi_remove_device to psp_hw_fini. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm

[PATCH] drm/amdgpu: TA unload messages are not actually sent to psp when amdgpu is uninstalled

2022-08-15 Thread YiPeng Chai
in psp_cmd_submit_buf. So the call to drm_dev_enter in psp_cmd_submit_buf should be removed, so that the TA unload messages can be sent to the psp when amdgpu is uninstalled. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 1 file changed, 4 deletions(-) diff --git

[PATCH 2/2] drm/amdgpu: fix hive reference leak when adding xgmi device

2022-08-12 Thread YiPeng Chai
Only amdgpu_get_xgmi_hive but no amdgpu_put_xgmi_hive which will leak the hive reference. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 1/2] drm/amdgpu: The call to amdgpu_xgmi_remove_device needs to be earlier than psp_hw_fini

2022-08-12 Thread YiPeng Chai
The amdgpu_xgmi_remove_device function will send unload command to psp through psp ring to terminate xgmi, but psp ring has been destroyed in psp_hw_fini. Signed-off-by: YiPeng Chai --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[PATCH] drm/pm/swsmu: add ras eeprom i2c function for smu13 v13_0_0

2022-07-19 Thread YiPeng Chai
Add ras eeprom i2c function for smu13 v13_0_0. Signed-off-by: YiPeng Chai Acked-by: Evan Quan Acked-by: Alex Deucher --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 157 ++ 1 file changed, 157 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c

[PATCH 2/2] drm/amdgpu: add umc ras functions for umc v8_10_0

2022-07-12 Thread YiPeng Chai
1. Support query umc ras error counter. 2. Support ras umc ue error address remapping. v2: Use adev->gmc.num_umc to replace hardcoded definitions. Signed-off-by: YiPeng Chai Reviewed-by: Alexander Deucher Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou --- drivers/gpu/drm/amd/amd

[PATCH 1/2] drm/amdgpu: add umc v8_10_0 ip headers

2022-07-12 Thread YiPeng Chai
Add umc v8_10_0 register offset and shift masks header files Signed-off-by: YiPeng Chai Reviewed-by: Alexander Deucher Reviewed-by: Hawking Zhang Reviewed-by: Tao Zhou --- .../include/asic_reg/umc/umc_8_10_0_offset.h | 33 +++ .../include/asic_reg/umc/umc_8_10_0_sh_mask.h | 94

<    1   2