From ff92616d92b26d9d7c446c31b3138c193a109286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Fri, 19 Apr 2013 16:14:19 +0200 Subject: [PATCH] drm/radeon: raise UVD clocks while booting the VCPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- drivers/gpu/drm/radeon/r600.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c index 5fe9e74..d575819 100644 --- a/drivers/gpu/drm/radeon/r600.c +++ b/drivers/gpu/drm/radeon/r600.c @@ -2645,6 +2645,9 @@ int r600_uvd_init(struct radeon_device *rdev) { int i, j, r; + /* raise clocks while booting up the VCPU */ + radeon_set_uvd_clocks(rdev, 53300, 40000); + /* disable clock gating */ WREG32(UVD_CGC_GATE, 0); @@ -2715,18 +2718,23 @@ int r600_uvd_init(struct radeon_device *rdev) mdelay(10); r = -1; } + if (r) { DRM_ERROR("UVD not responding, giving up!!!\n"); + radeon_set_uvd_clocks(rdev, 0, 0); return r; } + /* enable interupt */ WREG32_P(UVD_MASTINT_EN, 3<<1, ~(3 << 1)); r = r600_uvd_rbc_start(rdev); - if (r) - return r; + if (!r) + DRM_INFO("UVD initialized successfully.\n"); + + /* lower clocks again */ + radeon_set_uvd_clocks(rdev, 0, 0); - DRM_INFO("UVD initialized successfully.\n"); return 0; } -- 1.7.9.5