radeonsi: fix video APIs on Raven2
authorMarek Olšák <marek.olsak@amd.com>
Tue, 13 Nov 2018 23:37:39 +0000 (18:37 -0500)
committerMarek Olšák <marek.olsak@amd.com>
Wed, 14 Nov 2018 22:08:34 +0000 (17:08 -0500)
This was missed when I added the new enum.

Cc: 18.3 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Leo Liu <leo.liu@amd.com>
src/gallium/drivers/radeonsi/si_get.c
src/gallium/drivers/radeonsi/si_uvd.c

index b440230d227130a7f62ef4825525bfc9b1d50b48..91f38329d59b43a4a535ee62ef856f9ff7bba66f 100644 (file)
@@ -580,10 +580,12 @@ static int si_get_video_param(struct pipe_screen *screen,
                case PIPE_VIDEO_CAP_SUPPORTED:
                        return (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
                                (si_vce_is_fw_version_supported(sscreen) ||
-                               sscreen->info.family == CHIP_RAVEN)) ||
+                                sscreen->info.family == CHIP_RAVEN ||
+                                sscreen->info.family == CHIP_RAVEN2)) ||
                                (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN &&
                                (sscreen->info.family == CHIP_RAVEN ||
-                               si_radeon_uvd_enc_supported(sscreen)));
+                                sscreen->info.family == CHIP_RAVEN2 ||
+                                si_radeon_uvd_enc_supported(sscreen)));
                case PIPE_VIDEO_CAP_NPOT_TEXTURES:
                        return 1;
                case PIPE_VIDEO_CAP_MAX_WIDTH:
@@ -631,7 +633,8 @@ static int si_get_video_param(struct pipe_screen *screen,
                                return profile == PIPE_VIDEO_PROFILE_HEVC_MAIN;
                        return false;
                case PIPE_VIDEO_FORMAT_JPEG:
-                       if (sscreen->info.family == CHIP_RAVEN)
+                       if (sscreen->info.family == CHIP_RAVEN ||
+                           sscreen->info.family == CHIP_RAVEN2)
                                return true;
                        if (sscreen->info.family < CHIP_CARRIZO || sscreen->info.family >= CHIP_VEGA10)
                                return false;
index 1a9d8f8d9fa60aa37ebb230c75b02aadcd4cdff7..8c9553acbf3f288cd3d23451503a80548ce39203 100644 (file)
@@ -146,7 +146,8 @@ struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context,
                                               const struct pipe_video_codec *templ)
 {
        struct si_context *ctx = (struct si_context *)context;
-       bool vcn = (ctx->family == CHIP_RAVEN) ? true : false;
+       bool vcn = ctx->family == CHIP_RAVEN ||
+                  ctx->family == CHIP_RAVEN2;
 
        if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
                if (vcn) {