drm/amdgpu/vcn1: read back register after written
authorDavid (Ming Qiang) Wu <David.Wu3@amd.com>
Wed, 14 May 2025 22:50:15 +0000 (18:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 29 May 2025 14:55:39 +0000 (10:55 -0400)
commit0ef2803173f180fe31b5083b1dcf0f8fa6e5608f
treea608cdb3a341b2af02ca9280dc26ed3b75e10125
parent040585df957d45ebec0297bad525f39471229987
drm/amdgpu/vcn1: read back register after written

V3: drop changes where readbacks have implemented. This patch set
    is to add readbacks only.

V2: use common register UVD_STATUS for readback (standard PCI MMIO
    behavior, i.e. readback post all writes to let the writes hit
    the hardware)
    add readback in ..._stop() for more coverage.

Similar to the changes made for VCN v4.0.5 where readback to post the
writes to avoid race with the doorbell, the addition of register
readback support in other VCN versions is intended to prevent potential
race conditions, even though such issues have not been observed yet.
This change ensures consistency across different VCN variants and helps
avoid similar issues. The overhead introduced is negligible.

Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c