radeon/uvd: fix video format reporting
authorGrigori Goronzy <greg@chown.ath.cx>
Wed, 9 Oct 2013 00:23:47 +0000 (02:23 +0200)
committerChristian König <christian.koenig@amd.com>
Wed, 9 Oct 2013 11:02:40 +0000 (13:02 +0200)
UVD can only support NV12 in the case of hardware decoding, but we
can still use all other formats for software decoding. Use the UNKNOWN
profile to signal that we're not interesting in hardware decoding.

v2: use profile instead of entrypoint

Reviewed-by: Christian König <christian.koenig@amd.com>
src/gallium/drivers/radeon/radeon_uvd.c

index cfc7d033d61a28d6959bb2e0b7eeb6add47d4b75..34650d4d19bd77eaf617ab4543958e7a16d952d3 100644 (file)
@@ -1163,6 +1163,9 @@ boolean ruvd_is_format_supported(struct pipe_screen *screen,
                                 enum pipe_video_profile profile,
                                 enum pipe_video_entrypoint entrypoint)
 {
-       /* we can only handle this one anyway */
-       return format == PIPE_FORMAT_NV12;
+       /* we can only handle this one with UVD */
+       if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)
+               return format == PIPE_FORMAT_NV12;
+
+       return vl_video_buffer_is_format_supported(screen, format, profile, entrypoint);
 }