[PATCH v3] drm/amdgpu: fix the doorbell missing when in CGPG issue for renoir.
Lazar, Lijo
lijo.lazar at amd.com
Thu Jul 29 08:39:19 UTC 2021
On 7/29/2021 1:25 PM, Yifan Zhang wrote:
> If GC has entered CGPG, ringing doorbell > first page doesn't wakeup GC.
> Enlarge CP_MEC_DOORBELL_RANGE_UPPER to workaround this issue.
>
> Signed-off-by: Yifan Zhang <yifan1.zhang at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> index 03acc777adf7..a35f1d041a85 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
> @@ -3675,7 +3675,18 @@ static int gfx_v9_0_kiq_init_register(struct amdgpu_ring *ring)
> if (ring->use_doorbell) {
> WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_LOWER,
> (adev->doorbell_index.kiq * 2) << 2);
> - WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
> + /* In renoir, if GC has entered CGPG, ringing doorbell > first page
> + * doesn't wakeup GC. Enlarge CP_MEC_DOORBELL_RANGE_UPPER to
> + * workaround this issue. And this change has to align with firmware
> + * update.
> + */
> + if ((adev->asic_type == CHIP_RENOIR) &&
> + (adev->gfx.me_fw_version >= 0x000000a5) &&
> + (adev->gfx.me_feature_version >= 52))
> + WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
> + (adev->doorbell.size - 4));
For better readability, perhaps
if (extended_doorbell_range(adev))
...
else
...
and move the ASIC and FW version check inside extended_doorbell_range.
Thanks,
Lijo
> + else
> + WREG32_SOC15(GC, 0, mmCP_MEC_DOORBELL_RANGE_UPPER,
> (adev->doorbell_index.userqueue_end * 2) << 2);
> }
>
>
More information about the amd-gfx
mailing list