Am 16.08.2017 um 19:53 schrieb Leo Liu:
v2: add ASIC and Kernel version check

Signed-off-by: Leo Liu <leo....@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");

I don't think printing here is a good idea. Querying what the driver can do is never an error or otherwise vainfo would print tons of messages for not supported codecs.

+                               return false;
+                       }
+                       if (!(rscreen->info.drm_major == 3 && 
rscreen->info.drm_minor >= 19)) {
+                               RVID_ERR("No MJPEG support for the kernel 
version\n");

That one can stay I think, cause a note to update the kernel is a good idea.

With the first error message removed the patch is Reviewed-by: Christian König <christian.koe...@amd.com>

Christian.

+                               return false;
+                       }
+                       return true;
                default:
                        return false;
                }


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to