radeonsi: enable vcn encode for HEVC main
authorBoyuan Zhang <boyuan.zhang@amd.com>
Thu, 25 Jan 2018 20:06:35 +0000 (15:06 -0500)
committerLeo Liu <leo.liu@amd.com>
Mon, 5 Feb 2018 14:16:18 +0000 (09:16 -0500)
Enable vcn encode for HEVC main profile on Raven.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeonsi/si_get.c

index 1346534bed742175a69bec262eb1ddc0a4339208..80023625b72fb53f64690d68b16f6e7b3cfac8b8 100644 (file)
@@ -583,8 +583,10 @@ static int si_get_video_param(struct pipe_screen *screen,
        if (entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
                switch (param) {
                case PIPE_VIDEO_CAP_SUPPORTED:
-                       return codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
+                       return (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
                                (si_vce_is_fw_version_supported(sscreen) ||
+                               sscreen->info.family == CHIP_RAVEN)) ||
+                               (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN &&
                                sscreen->info.family == CHIP_RAVEN);
                case PIPE_VIDEO_CAP_NPOT_TEXTURES:
                        return 1;