drm/amdgpu: add MJPEG check for UVD physical mode msg buffer
authorLeo Liu <leo.liu@amd.com>
Tue, 15 Aug 2017 14:57:34 +0000 (10:57 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 17 Aug 2017 20:47:44 +0000 (16:47 -0400)
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c

index aefecf6..e19928d 100644 (file)
@@ -588,6 +588,10 @@ static int amdgpu_uvd_cs_msg_decode(struct amdgpu_device *adev, uint32_t *msg,
                }
                break;
 
+       case 8: /* MJPEG */
+               min_dpb_size = 0;
+               break;
+
        case 16: /* H265 */
                image_size = (ALIGN(width, 16) * ALIGN(height, 16) * 3) / 2;
                image_size = ALIGN(image_size, 256);