summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon/radeon_vce.c
diff options
context:
space:
mode:
authorBoyuan Zhang <[email protected]>2017-08-16 14:24:29 -0400
committerLeo Liu <[email protected]>2017-08-16 14:42:41 -0400
commita44b334e48f24060064eac49c73d8c767c2becf7 (patch)
treea0c6815c11bd0c20931ddc817b4ed46c60ebe602 /src/gallium/drivers/radeon/radeon_vce.c
parent733422e53c8758ce3f63db2109929339259681d8 (diff)
radeon/vce: support all firmwares with major ver 53
The vce firmware interface should now be stable, all firmwares with major version equals to 53 are supported. Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Christian König <christian.koenig at amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/radeon_vce.c')
-rw-r--r--src/gallium/drivers/radeon/radeon_vce.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gallium/drivers/radeon/radeon_vce.c b/src/gallium/drivers/radeon/radeon_vce.c
index 70c1e60f5b4..6b07a72f02c 100644
--- a/src/gallium/drivers/radeon/radeon_vce.c
+++ b/src/gallium/drivers/radeon/radeon_vce.c
@@ -52,7 +52,7 @@
#define FW_52_0_3 ((52 << 24) | (0 << 16) | (3 << 8))
#define FW_52_4_3 ((52 << 24) | (4 << 16) | (3 << 8))
#define FW_52_8_3 ((52 << 24) | (8 << 16) | (3 << 8))
-#define FW_53_19_4 ((53 << 24) | (19 << 16) | (4 << 8))
+#define FW_53 (53 << 24)
/**
* flush commands to the hardware
@@ -510,13 +510,13 @@ struct pipe_video_codec *rvce_create_encoder(struct pipe_context *context,
radeon_vce_52_init(enc);
get_pic_param = radeon_vce_52_get_param;
break;
- case FW_53_19_4:
- radeon_vce_52_init(enc);
- get_pic_param = radeon_vce_52_get_param;
- break;
default:
- goto error;
+ if ((rscreen->info.vce_fw_version & (0xff << 24)) == FW_53) {
+ radeon_vce_52_init(enc);
+ get_pic_param = radeon_vce_52_get_param;
+ } else
+ goto error;
}
return &enc->base;
@@ -546,10 +546,12 @@ bool rvce_is_fw_version_supported(struct r600_common_screen *rscreen)
case FW_52_0_3:
case FW_52_4_3:
case FW_52_8_3:
- case FW_53_19_4:
return true;
default:
- return false;
+ if ((rscreen->info.vce_fw_version & (0xff << 24)) == FW_53)
+ return true;
+ else
+ return false;
}
}