[PATCH] drm/amdgpu: seperate the dependency between CGCG and CGLS when diable CGCG/CGLS

2021-04-28 Thread Changfeng.Zhu
From: changzhu From: Changfeng The disable process of CGLS is dependent on CGCG now. Align with windows code, seperate the dependency between CGCG and CGLS and it will reduce confusion when debug CGCG/CGLS related issue. Change-Id: Ia91b8b16236bebd9224160672e500f6850dbc268 Signed-off-by: Chang

[PATCH] drm/amd/pm: update smu10.h WORKLOAD_PPLIB setting for raven

2020-12-08 Thread Changfeng.Zhu
From: changzhu From: Changfeng When using old WORKLOAD_PPLIB setting in smu10.h, there is problem that it can't be able to switch to mak gpu clk during compute workload. It needs to update WORKLOAD_PPLIB setting to fix this issue. Change-Id: Id2160a7b4a6cb8808d100de25e999714a7ccaebd Signed-off

[PATCH] drm/amdgpu: add ta DTM/HDCP print in amdgpu_firmware_info for apu

2020-09-08 Thread Changfeng.Zhu
From: changzhu From: Changfeng It needs to add ta DTM/HDCP print to get HDCP/DTM version info when cat amdgpu_firmware_info Change-Id: I05f20d6868ce2cac06a8496890b766dbb61de671 Signed-off-by: Changfeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 43 + 1 file changed

[PATCH] drm/amdgpu: add ta DTM/HDCP print in amdgpu_firmware_info for apu

2020-09-08 Thread Changfeng.Zhu
From: changzhu From: Changfeng It needs to add ta DTM/HDCP print to get HDCP/DTM version info when cat amdgpu_firmware_info Change-Id: I05f20d6868ce2cac06a8496890b766dbb61de671 Signed-off-by: Changfeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 27 - 1 file changed

[PATCH] drm/amdgpu: add ta firmware load in psp_v12_0 for renoir

2020-09-01 Thread Changfeng.Zhu
From: changzhu From: Changfeng It needs to load renoir_ta firmware because hdcp is enabled by default for renoir now. This can avoid error:DTM TA is not initialized Change-Id: Ib2f03a531013e4b432c2e9d4ec3dc021b4f8da7d Signed-off-by: Changfeng --- drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 54 +

[PATCH] drm/amd/powerplay: drop unnecessary message support check(v2)

2020-07-23 Thread Changfeng.Zhu
From: changzhu From: Changfeng Take back patch:drop unnecessary message support check Because the gpu reset fail problem on renoir can be fixed by: drm/amd/powerplay: skip invalid msg when smu set mp1 state It needs to remove SWSMU_CODE_LAYER_L1 in smu_cmn.h to guard a clear code layer. Change

[PATCH] drm/amdgpu: add is_raven_kicker judgement for raven1

2020-02-13 Thread Changfeng.Zhu
From: changzhu The rlc version of raven_kicer_rlc is different from the legacy rlc version of raven_rlc. So it needs to add a judgement function for raven_kicer_rlc and avoid disable GFXOFF when loading raven_kicer_rlc. Change-Id: I00d726cc39eae4ea788c1d5faeb8ce75ec0b884d Signed-off-by: changzhu

[PATCH] drm/amdgpu: add is_raven_kicker judgement for raven1

2020-02-13 Thread Changfeng.Zhu
From: changzhu The rlc version of raven_kicer_rlc is different from the legacy rlc version of raven_rlc. So it needs to add a judgement function for raven_kicer_rlc and avoid disable GFXOFF when loading raven_kicer_rlc. Change-Id: I00d726cc39eae4ea788c1d5faeb8ce75ec0b884d Signed-off-by: changzhu

[PATCH] drm/amdgpu: enable gfxoff for raven1 refresh

2019-12-12 Thread Changfeng.Zhu
From: changzhu When smu version is larger than 0x41e2b, it will load raven_kicker_rlc.bin.To enable gfxoff for raven_kicker_rlc.bin,it needs to avoid adev->pm.pp_feature &= ~PP_GFXOFF_MASK when it loads raven_kicker_rlc.bin. Change-Id: I4dffa1783c9ceb5d40df9756d821e2cd7feff84d Signed-off-by: cha

[PATCH] drm/amdgpu: enable gfxoff for raven1 refresh

2019-12-12 Thread Changfeng.Zhu
From: changzhu When smu version is larger than 0x41e2b, it will load raven_kicker_rlc.bin.To enable gfxoff for raven_kicker_rlc.bin,it needs to avoid adev->pm.pp_feature &= ~PP_GFXOFF_MASK when it loads raven_kicker_rlc.bin. Change-Id: I4dffa1783c9ceb5d40df9756d821e2cd7feff84d Signed-off-by: cha

[PATCH 2/2] drm/amdgpu: add invalidate semaphore limit for SRIOV in gmc10

2019-12-10 Thread Changfeng.Zhu
From: changzhu It may fail to load guest driver in round 2 when using invalidate semaphore for SRIOV. So it needs to avoid using invalidate semaphore for SRIOV. Change-Id: I2719671cf86a1755b05c5f2ac7420a901abbe916 Signed-off-by: changzhu --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 29

[PATCH 1/2] drm/amdgpu: add invalidate semaphore limit for SRIOV and picasso in gmc9

2019-12-10 Thread Changfeng.Zhu
From: changzhu It may fail to load guest driver in round 2 or cause Xstart problem when using invalidate semaphore for SRIOV or picasso. So it needs avoid using invalidate semaphore for SRIOV and picasso. Change-Id: I806f8e99ec97be84e6aed0f5c499a53b1931b490 Signed-off-by: changzhu --- drivers/

[PATCH 2/2] drm/amdgpu: modify invalidate semaphore limit in gmc10

2019-12-10 Thread Changfeng.Zhu
From: changzhu It may fail to load guest driver in round 2 when using invalidate semaphore for SRIOV. So it needs to avoid using invalidate semaphore for SRIOV. Change-Id: I2719671cf86a1755b05c5f2ac7420a901abbe916 Signed-off-by: changzhu --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 32

[PATCH 1/2] drm/amdgpu: modify invalidate semaphore limit in gmc9

2019-12-10 Thread Changfeng.Zhu
From: changzhu It may fail to load guest driver in round 2 or cause Xstart problem when using invalidate semaphore for SRIOV or picasso. So it needs avoid using invalidate semaphore for SRIOV and picasso. Change-Id: I806f8e99ec97be84e6aed0f5c499a53b1931b490 Signed-off-by: changzhu --- drivers/

[PATCH] drm/amdgpu: avoid using invalidate semaphore for picasso(v2)

2019-12-09 Thread Changfeng.Zhu
From: changzhu It may cause timeout waiting for sem acquire in VM flush when using invalidate semaphore for picasso. So it needs to avoid using invalidate semaphore for piasso. Change-Id: I6dc552bde180919cd5ba6c81c6d9e3f800043b03 Signed-off-by: changzhu --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.

[PATCH 2/2] drm/amdgpu: avoid using invalidate semaphore for picasso

2019-12-03 Thread Changfeng.Zhu
From: changzhu It may cause timeout waiting for sem acquire in VM flush when using invalidate semaphore for picasso. So it needs to avoid using invalidate semaphore for piasso. Change-Id: I300e96af5c66b33a7d61e6420caa33d70471d44a Signed-off-by: changzhu --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0

[PATCH 1/2] drm/amdgpu: avoid using invalidate semaphore for SRIOV

2019-12-03 Thread Changfeng.Zhu
From: changzhu It may fail to load guest driver in round 2 when using invalidate semaphore for SRIOV. So it needs to avoid using invalidate semaphore for SRIOV. Change-Id: I8db1dc6f990fd0c458953571936467551cd4102d Signed-off-by: changzhu --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 21

[PATCH 2/2] drm/amdgpu: avoid using invalidate semaphore for picasso

2019-12-01 Thread Changfeng.Zhu
From: changzhu It may cause timeout waiting for sem acquire in VM flush when using invalidate semaphore for picasso. So it needs to avoid using invalidate semaphore for piasso. Change-Id: I193e6a9eecc0a8b2c99baabf18ad816fb473da52 Signed-off-by: changzhu --- drivers/gpu/drm/amd/amdgpu/gmc_v10_0

[PATCH 1/2] drm/amdgpu: avoid using invalidate semaphore for SRIOV

2019-12-01 Thread Changfeng.Zhu
From: changzhu It may fail to load guest driver in round 2 when using invalidate semaphore for SRIOV. So it needs to avoid using invalidate semaphore for SRIOV. Fix for:http://ontrack-internal.amd.com/browse/SWDEV-214157 Change-Id: I1e498d33df2f8a53dbbec7a28672085cea68acb8 Signed-off-by: changz

[PATCH] drm/amdgpu: invalidate mmhub semphore workaround in gmc9/gmc10

2019-11-21 Thread Changfeng.Zhu
From: changzhu It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in gmc9/gmc10 invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. After adding semaphore acquire before invalidation, the semaphore regis

[PATCH 2/2] drm/amdgpu: invalidate mmhub semphore workaround in gmc9/gmc10

2019-11-20 Thread Changfeng.Zhu
From: changzhu It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in gmc9/gmc10 invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. After adding semaphore acquire before invalidation, the semaphore regis

[PATCH 2/2] drm/amdgpu: invalidate mmhub semphore workaround in gmc9/gmc10

2019-11-20 Thread Changfeng.Zhu
From: changzhu It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in gmc9/gmc10 invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. After adding semaphore acquire before invalidation, the semaphore regis

[PATCH 1/2] drm/amdgpu: invalidate mmhub semphore workaround in amdgpu_virt

2019-11-20 Thread Changfeng.Zhu
From: changzhu It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in virt invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. Change-Id: Ie98304e475166b53eed033462d76423b6b0fc25b Signed-off-by: changzhu

[PATCH 3/3] drm/amdgpu: invalidate semphore workaround in gmc9/gmc10

2019-11-19 Thread Changfeng.Zhu
From: changzhu It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in gmc9/gmc10 invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. After adding semaphore acquire before invalidation, the semaphore regis

[PATCH 2/3] drm/amdgpu: invalidate semphore workaround in amdgpu_virt

2019-11-19 Thread Changfeng.Zhu
From: changzhu It may lose gpuvm invalidate acknowldege state across power-gating off cycle. To avoid this issue in virt invalidation, add semaphore acquire before invalidation and semaphore release after invalidation. Change-Id: Ie98304e475166b53eed033462d76423b6b0fc25b Signed-off-by: changzhu

[PATCH 1/3] drm/amdgpu: initialize vm_inv_eng0_sem for gfxhub and mmhub

2019-11-19 Thread Changfeng.Zhu
From: changzhu SW must acquire/release one of the vm_invalidate_eng*_sem around the invalidation req/ack. Through this way,it can avoid losing invalidate acknowledge state across power-gating off cycle. To use vm_invalidate_eng*_sem, it needs to initialize vm_invalidate_eng*_sem firstly. Change-

[PATCH] drm/amd/powerplay: enable gpu_busy_percent sys for renoir

2019-11-18 Thread Changfeng.Zhu
From: changzhu To get the value of gpu_busy_percent, it needs to realize get_current_activity_percent and get_metrics_table. The framework of renoir smu is different from old ones like raven. It needs to realize get_current_activity_percent and get_metrics_table in renoir_ppt.c like navi10. Chan

[PATCH 1/2] drm/amdgpu: enable mmhub power pate for renoir

2019-11-14 Thread Changfeng.Zhu
From: changzhu mmhub power gate structure is changed in renoir compared with raven. It goes through smu_dpm_set_power_gate other than adev->powerplay.pp_funcs->set_powergating_by_smu in renoir. So we can realize mmhub power gate in smu_dpm_set_power_gate -> smu_powergate_mmhub -> powergate_mmhub

[PATCH 2/2] drm/amdgpu: invalidate semphore mmhub workaround for gfx9/gfx10

2019-11-14 Thread Changfeng.Zhu
From: changzhu MMHUB may lose GPUVM invalidate acknowledge state across power-gating off cycle when it does invalidation req/ack work. So we must acquire/release one of the vm_invalidate_eng*_sem around the invalidation req/ack. Besides, vm_invalidate_eng*_sem will be read-only after acquire it