drm/amdgpu/{uvd,vcn}: fetch ring's read_ptr after alloc
authorShirish S <shirish.s@amd.com>
Tue, 4 Jun 2019 15:55:03 +0000 (21:25 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 16 Sep 2019 06:22:15 +0000 (08:22 +0200)
commitf276beb324cc1c60dc3495dc03a927a70c1aa5c7
treef2f865e98187bbfa3785ea2fe384256cb94d4ed1
parent7abeffff7bc33f86da68ca3bfc0fee881b3ab7de
drm/amdgpu/{uvd,vcn}: fetch ring's read_ptr after alloc

[ Upstream commit 517b91f4cde3043d77b2178548473e8545ef07cb ]

[What]
readptr read always returns zero, since most likely
these blocks are either power or clock gated.

[How]
fetch rptr after amdgpu_ring_alloc() which informs
the power management code that the block is about to be
used and hence the gating is turned off.

Signed-off-by: Louis Li <Ching-shih.Li@amd.com>
Signed-off-by: Shirish S <shirish.s@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c