Jelajahi Sumber

drm/radeon: fix UVD 256MB check

Otherwise the kernel might reject our decoding requests.

Signed-off-by: Christian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Christian König 11 tahun lalu
induk
melakukan
bae651dbd7
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      drivers/gpu/drm/radeon/radeon_uvd.c

+ 1 - 1
drivers/gpu/drm/radeon/radeon_uvd.c

@@ -473,7 +473,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;