Commit 2ce529da authored by Alex Deucher's avatar Alex Deucher
Browse files

drm/radeon: split out radeon_uvd_resume from uvd_v4_2_resume



For powergating, we just need to re-init the registers, there
is no need to restore the uvd BOs.  This just adds needless
work when powergating uvd for playback while the system is
on.  We only need to restore the uvd BOs on an actual resume
from suspend or when the driver loads.

This fixes multi-stream UVD playback on KB systems.

Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
parent 27c505ca
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -7051,6 +7051,8 @@ static int cik_startup(struct radeon_device *rdev)
		return r;
	}

	r = radeon_uvd_resume(rdev);
	if (!r) {
		r = uvd_v4_2_resume(rdev);
		if (!r) {
			r = radeon_fence_driver_start_ring(rdev,
@@ -7058,6 +7060,7 @@ static int cik_startup(struct radeon_device *rdev)
			if (r)
				dev_err(rdev->dev, "UVD fences init error (%d).\n", r);
		}
	}
	if (r)
		rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_size = 0;

+0 −5
Original line number Diff line number Diff line
@@ -39,11 +39,6 @@ int uvd_v4_2_resume(struct radeon_device *rdev)
{
	uint64_t addr;
	uint32_t size;
	int r;

	r = radeon_uvd_resume(rdev);
	if (r)
		return r;

	/* programm the VCPU memory controller bits 0-27 */
	addr = rdev->uvd.gpu_addr >> 3;