drm/radeon: fix alignment of UVD fence
authorChristian König <christian.koenig@amd.com>
Sun, 14 Apr 2013 10:47:59 +0000 (12:47 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 22 Apr 2013 14:39:11 +0000 (10:39 -0400)
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/drm/radeon/radeon_uvd.c

index 82fe1835ff8c73bb5ba3bde669010f08a09206e4..1a699cefaac774842dc6d8ade7e4c2ad03219fcc 100644 (file)
@@ -776,10 +776,9 @@ int radeon_fence_driver_start_ring(struct radeon_device *rdev, int ring)
 
                } else {
                        /* put fence directly behind firmware */
-                       rdev->fence_drv[ring].cpu_addr = rdev->uvd.cpu_addr +
-                                                        rdev->uvd_fw->size;
-                       rdev->fence_drv[ring].gpu_addr = rdev->uvd.gpu_addr +
-                                                        rdev->uvd_fw->size;
+                       index = ALIGN(rdev->uvd_fw->size, 8);
+                       rdev->fence_drv[ring].cpu_addr = rdev->uvd.cpu_addr + index;
+                       rdev->fence_drv[ring].gpu_addr = rdev->uvd.gpu_addr + index;
                }
 
        } else {
index 2fb4d6cf26b633447571e213cf32943e1711a4b9..15580fb8546efd4b78272f6149634cfe3a503b7f 100644 (file)
@@ -107,7 +107,7 @@ int radeon_uvd_init(struct radeon_device *rdev)
 
        platform_device_unregister(pdev);
 
-       bo_size = RADEON_GPU_PAGE_ALIGN(rdev->uvd_fw->size + 4) +
+       bo_size = RADEON_GPU_PAGE_ALIGN(rdev->uvd_fw->size + 8) +
                  RADEON_UVD_STACK_SIZE + RADEON_UVD_HEAP_SIZE;
        r = radeon_bo_create(rdev, bo_size, PAGE_SIZE, true,
                             RADEON_GEM_DOMAIN_VRAM, NULL, &rdev->uvd.vcpu_bo);