[Mesa-dev] [PATCH 05/20] radeon/video: add MJPEG support

Leo Liu leo.liu at amd.com
Wed Aug 16 17:53:08 UTC 2017


v2: add ASIC and Kernel version check

Signed-off-by: Leo Liu <leo.liu at amd.com>
---
 src/gallium/drivers/radeon/radeon_video.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index f7a1c4743d..21c57d2c0f 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -280,6 +280,16 @@ 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) {
+				RVID_ERR("No MJPEG support for the ASIC\n");
+				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.11.0



More information about the mesa-dev mailing list