drm/radeon: activate UVD clocks before sending the destroy msg
authorChristian König <christian.koenig@amd.com>
Wed, 30 Oct 2013 11:56:04 +0000 (12:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 19:05:52 +0000 (11:05 -0800)
commit c154a76311293f9671439286834aa325b7ef59fe upstream.

Make sure the UVD clocks are still active before sending
the destroy message, otherwise the hw might hang.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/radeon_uvd.c

index 308eff5..a56dfe4 100644 (file)
@@ -240,6 +240,8 @@ void radeon_uvd_free_handles(struct radeon_device *rdev, struct drm_file *filp)
                if (handle != 0 && rdev->uvd.filp[i] == filp) {
                        struct radeon_fence *fence;
 
+                       radeon_uvd_note_usage(rdev);
+
                        r = radeon_uvd_get_destroy_msg(rdev,
                                R600_RING_TYPE_UVD_INDEX, handle, &fence);
                        if (r) {