Merge branch 'v3.10/topic/arm64-dma' of git://git.linaro.org/kernel/linux-linaro...
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / drm / radeon / radeon_uvd.c
index f3ccf6d4addb7577067da9670b2eecc7664c3312..21d2d5280fc1de6004bae215d57ed4a967e5753d 100644 (file)
@@ -242,6 +242,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) {
@@ -458,7 +460,7 @@ static int radeon_uvd_cs_reloc(struct radeon_cs_parser *p,
                return -EINVAL;
        }
 
-       if ((start >> 28) != (end >> 28)) {
+       if ((start >> 28) != ((end - 1) >> 28)) {
                DRM_ERROR("reloc %LX-%LX crossing 256MB boundary!\n",
                          start, end);
                return -EINVAL;