Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e4518762 authored by Christian König's avatar Christian König
Browse files

drm/radeon/uvd: use lower clocks on old UVD to boot v2

Some RV7xx generation hardware crashes after you
raise the UVD clocks for the first time. Try to
avoid this by using the lower clocks to boot these.

Workaround for: https://bugzilla.kernel.org/show_bug.cgi?id=71891



v2: lower clocks on IB test as well

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
parent b8eade24
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -83,6 +83,9 @@ int uvd_v1_0_init(struct radeon_device *rdev)
	int r;

	/* raise clocks while booting up the VCPU */
	if (rdev->family < CHIP_RV740)
		radeon_set_uvd_clocks(rdev, 10000, 10000);
	else
		radeon_set_uvd_clocks(rdev, 53300, 40000);

	r = uvd_v1_0_start(rdev);
@@ -407,6 +410,9 @@ int uvd_v1_0_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
	struct radeon_fence *fence = NULL;
	int r;

	if (rdev->family < CHIP_RV740)
		r = radeon_set_uvd_clocks(rdev, 10000, 10000);
	else
		r = radeon_set_uvd_clocks(rdev, 53300, 40000);
	if (r) {
		DRM_ERROR("radeon: failed to raise UVD clocks (%d).\n", r);