[Mesa-dev] radeon/uvd: don't expose HEVC on old UVD hw

Submitted by Alex Deucher on Oct. 22, 2015, 4:27 p.m.

Details

Message ID 1445531269-10267-1-git-send-email-alexander.deucher@amd.com
State New
Headers show
Series "radeon/uvd: don't expose HEVC on old UVD hw" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alex Deucher Oct. 22, 2015, 4:27 p.m.
The section for UVD 2 and older was not updated
when HEVC support was added. Reported by Kano
on irc.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: mesa-stable@lists.freedesktop.org
---
 src/gallium/drivers/radeon/radeon_video.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
index 3a1834b..722f446 100644
--- a/src/gallium/drivers/radeon/radeon_video.c
+++ b/src/gallium/drivers/radeon/radeon_video.c
@@ -237,8 +237,9 @@  int rvid_get_video_param(struct pipe_screen *screen,
 		enum pipe_video_format codec = u_reduce_video_profile(profile);
 		switch (param) {
 		case PIPE_VIDEO_CAP_SUPPORTED:
-			/* no support for MPEG4 */
+			/* no support for MPEG4, HEVC */
 			return codec != PIPE_VIDEO_FORMAT_MPEG4 &&
+			       codec != PIPE_VIDEO_FORMAT_HEVC &&
 			       /* FIXME: VC-1 simple/main profile is broken */
 			       profile != PIPE_VIDEO_PROFILE_VC1_SIMPLE &&
 			       profile != PIPE_VIDEO_PROFILE_VC1_MAIN;

Comments

Am 22.10.2015 um 18:27 schrieb Alex Deucher:
> The section for UVD 2 and older was not updated
> when HEVC support was added. Reported by Kano
> on irc.
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: mesa-stable@lists.freedesktop.org
> ---
>  src/gallium/drivers/radeon/radeon_video.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/gallium/drivers/radeon/radeon_video.c b/src/gallium/drivers/radeon/radeon_video.c
> index 3a1834b..722f446 100644
> --- a/src/gallium/drivers/radeon/radeon_video.c
> +++ b/src/gallium/drivers/radeon/radeon_video.c
> @@ -237,8 +237,9 @@ int rvid_get_video_param(struct pipe_screen *screen,
>  		enum pipe_video_format codec = u_reduce_video_profile(profile);
>  		switch (param) {
>  		case PIPE_VIDEO_CAP_SUPPORTED:
> -			/* no support for MPEG4 */
> +			/* no support for MPEG4, HEVC */
>  			return codec != PIPE_VIDEO_FORMAT_MPEG4 &&
> +			       codec != PIPE_VIDEO_FORMAT_HEVC &&
>  			       /* FIXME: VC-1 simple/main profile is broken */
>  			       profile != PIPE_VIDEO_PROFILE_VC1_SIMPLE &&
>  			       profile != PIPE_VIDEO_PROFILE_VC1_MAIN;
> 

Wouldn't it be safer to use a positive list instead? I could imagine
even more getting added sometime in the future...

Roland