From: Christian König Date: Tue, 5 May 2015 14:36:01 +0000 (+0200) Subject: drm/amdgpu: add HEVC/H.265 UVD support X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=86fa0bdc6fd7b2debc07ce86f1bcd5fb254822e3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/amdgpu: add HEVC/H.265 UVD support Signed-off-by: Christian König Reviewed-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c index 375759c8639c..2f7a5efa21c2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_uvd.c @@ -460,6 +460,14 @@ static int amdgpu_uvd_cs_msg_decode(uint32_t *msg, unsigned buf_sizes[]) min_dpb_size += ALIGN(width_in_mb * height_in_mb * 32, 64); break; + case 16: /* H265 */ + image_size = (ALIGN(width, 16) * ALIGN(height, 16) * 3) / 2; + image_size = ALIGN(image_size, 256); + + num_dpb_buffer = (le32_to_cpu(msg[59]) & 0xff) + 2; + min_dpb_size = image_size * num_dpb_buffer; + break; + default: DRM_ERROR("UVD codec not handled %d!\n", stream_type); return -EINVAL;