[PATCH] drm/amd: Turn off doorbell for vcn 4.0.5
Mario Limonciello
mario.limonciello at amd.com
Tue May 13 01:59:26 UTC 2025
On 5/10/2025 2:02 PM, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello at amd.com>
>
> On VCN 4.0.5 using a doorbell to notify VCN hardware for WPTR changes
> while dynamic power gating is enabled introduces a timing dependency
> that can sometimes cause WPTR to not be properly updated. This manifests
> as a job timeout which will trigger a VCN reset and cause the application
> that submitted the job to crash.
>
> Writing directly to the WPTR register instead of using the doorbell changes
> the timing enough that the issue doesn't happen. Turn off doorbell use for
> now while the issue continues to be debugged.
>
> Cc: stable at vger.kernel.org
> Cc: David.Wu3 at amd.com
> Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12528
> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3909
> Signed-off-by: Mario Limonciello <mario.limonciello at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
> index ba603b2246e2e..ea9513f65d7e4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
> +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_5.c
> @@ -181,7 +181,7 @@ static int vcn_v4_0_5_sw_init(struct amdgpu_ip_block *ip_block)
> return r;
>
> ring = &adev->vcn.inst[i].ring_enc[0];
> - ring->use_doorbell = true;
> + ring->use_doorbell = false;
> if (amdgpu_sriov_vf(adev))
> ring->doorbell_index = (adev->doorbell_index.vcn.vcn_ring0_1 << 1) +
> i * (adev->vcn.inst[i].num_enc_rings + 1) + 1;
Although this is confirmed to help the issue David found the correct
solution. I expect he'll submit that this week and it will supersede my
patch.
https://gitlab.freedesktop.org/-/project/176/uploads/defeac39ec232976c7c82aab151bfe63/0001-drm-amdgpu-read-back-DB_CTRL-register-after-write-fo.patch
More information about the amd-gfx
mailing list