From a886ae5162cb11e1a545efb0d940fb9128dbc4d8 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 28 Oct 2019 13:17:04 -0400 Subject: [PATCH] radeonsi: enable 8K video decode support for HEVC and VP9 HW 8K decode support starts at Renoir Signed-off-by: Leo Liu Reviewed-by: Boyuan Zhang --- src/gallium/drivers/radeonsi/si_get.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 4a7b9e3c5fc..9458f6b959a 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -667,9 +667,25 @@ static int si_get_video_param(struct pipe_screen *screen, case PIPE_VIDEO_CAP_NPOT_TEXTURES: return 1; case PIPE_VIDEO_CAP_MAX_WIDTH: - return (sscreen->info.family < CHIP_TONGA) ? 2048 : 4096; + switch (codec) { + case PIPE_VIDEO_FORMAT_HEVC: + case PIPE_VIDEO_FORMAT_VP9: + return (sscreen->info.family < CHIP_RENOIR) ? + ((sscreen->info.family < CHIP_TONGA) ? 2048 : 4096) : + 8192; + default: + return (sscreen->info.family < CHIP_TONGA) ? 2048 : 4096; + } case PIPE_VIDEO_CAP_MAX_HEIGHT: - return (sscreen->info.family < CHIP_TONGA) ? 1152 : 4096; + switch (codec) { + case PIPE_VIDEO_FORMAT_HEVC: + case PIPE_VIDEO_FORMAT_VP9: + return (sscreen->info.family < CHIP_RENOIR) ? + ((sscreen->info.family < CHIP_TONGA) ? 1152 : 4096) : + 4352; + default: + return (sscreen->info.family < CHIP_TONGA) ? 1152 : 4096; + } case PIPE_VIDEO_CAP_PREFERED_FORMAT: if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10 || profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2) -- 2.30.2