From 15f3335577e0b0e57aa2c017f262170adcff0c8e Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Wed, 16 Aug 2017 11:49:33 -0400 Subject: [PATCH] radeon/video: add MJPEG support MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit v2: add ASIC and Kernel version check Signed-off-by: Leo Liu Reviewed-by: Christian König --- src/gallium/drivers/radeon/radeon_video.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c index f7a1c4743d5..857a714f993 100644 --- a/src/gallium/drivers/radeon/radeon_video.c +++ b/src/gallium/drivers/radeon/radeon_video.c @@ -280,6 +280,14 @@ int rvid_get_video_param(struct pipe_screen *screen, profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10); else if (rscreen->family >= CHIP_CARRIZO) return profile == PIPE_VIDEO_PROFILE_HEVC_MAIN; + case PIPE_VIDEO_FORMAT_JPEG: + if (rscreen->family < CHIP_CARRIZO || rscreen->family >= CHIP_VEGA10) + return false; + if (!(rscreen->info.drm_major == 3 && rscreen->info.drm_minor >= 19)) { + RVID_ERR("No MJPEG support for the kernel version\n"); + return false; + } + return true; default: return false; } -- 2.30.2