radeonsi/gfx11: update codec support for gfx11
authorJames Zhu <James.Zhu@amd.com>
Sun, 20 Feb 2022 16:42:29 +0000 (11:42 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 10 May 2022 04:29:55 +0000 (04:29 +0000)
Update codec support for gfx11.

Signed-off-by: James Zhu <James.Zhu@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16328>

src/gallium/drivers/radeonsi/si_get.c

index b95c05d..870ebe9 100644 (file)
@@ -613,9 +613,15 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
 
       switch (codec) {
       case PIPE_VIDEO_FORMAT_MPEG12:
-         return profile != PIPE_VIDEO_PROFILE_MPEG1;
+         if (sscreen->info.chip_class >= GFX11)
+            return false;
+         else
+            return profile != PIPE_VIDEO_PROFILE_MPEG1;
       case PIPE_VIDEO_FORMAT_MPEG4:
-         return 1;
+         if (sscreen->info.chip_class >= GFX11)
+            return false;
+         else
+            return true;
       case PIPE_VIDEO_FORMAT_MPEG4_AVC:
          if ((sscreen->info.family == CHIP_POLARIS10 || sscreen->info.family == CHIP_POLARIS11) &&
              sscreen->info.uvd_fw_version < UVD_FW_1_66_16) {
@@ -624,7 +630,10 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
          }
          return true;
       case PIPE_VIDEO_FORMAT_VC1:
-         return true;
+         if (sscreen->info.chip_class >= GFX11)
+            return false;
+         else
+            return true;
       case PIPE_VIDEO_FORMAT_HEVC:
          /* Carrizo only supports HEVC Main */
          if (sscreen->info.family >= CHIP_STONEY)