ac/gpu_info: remove redundant uvd_encode

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17411>
This commit is contained in:
Marek Olšák 2022-07-07 19:46:33 -04:00 committed by Marge Bot
parent 2972ceccfd
commit 9cbbdc6583
5 changed files with 4 additions and 7 deletions

View file

@ -877,7 +877,6 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
? info->ip[AMD_IP_VCN_UNIFIED].num_queues != 0
: info->ip[AMD_IP_VCN_DEC].num_queues != 0;
info->has_video_hw.vce_encode = info->ip[AMD_IP_VCE].num_queues != 0;
info->has_video_hw.uvd_encode = info->ip[AMD_IP_UVD_ENC].num_queues != 0;
info->has_video_hw.vcn_encode = info->ip[AMD_IP_VCN_ENC].num_queues != 0;
info->has_userptr = true;
info->has_syncobj = has_syncobj(fd);
@ -1477,7 +1476,6 @@ void ac_print_gpu_info(struct radeon_info *info, FILE *f)
fprintf(f, "Multimedia info:\n");
fprintf(f, " vce_encode = %u\n", info->has_video_hw.vce_encode);
fprintf(f, " uvd_encode = %u\n", info->has_video_hw.uvd_encode);
if (info->family >= CHIP_GFX1100)
fprintf(f, " vcn_unified = %u\n", info->has_video_hw.vcn_decode);

View file

@ -158,7 +158,6 @@ struct radeon_info {
struct {
bool vcn_decode;
bool vce_encode;
bool uvd_encode;
bool vcn_encode;
} has_video_hw;

View file

@ -351,5 +351,5 @@ error:
bool si_radeon_uvd_enc_supported(struct si_screen *sscreen)
{
return (sscreen->info.has_video_hw.uvd_encode);
return sscreen->info.ip[AMD_IP_UVD_ENC].num_queues;
}

View file

@ -579,7 +579,7 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
if (entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
if (!(sscreen->info.has_video_hw.vce_encode ||
sscreen->info.has_video_hw.uvd_encode ||
sscreen->info.ip[AMD_IP_UVD_ENC].num_queues ||
sscreen->info.has_video_hw.vcn_encode))
return 0;
@ -1053,7 +1053,7 @@ void si_init_screen_get_functions(struct si_screen *sscreen)
if (sscreen->info.ip[AMD_IP_UVD].num_queues || sscreen->info.has_video_hw.vcn_decode ||
sscreen->info.ip[AMD_IP_VCN_JPEG].num_queues || sscreen->info.has_video_hw.vce_encode ||
sscreen->info.has_video_hw.uvd_encode || sscreen->info.has_video_hw.vcn_encode) {
sscreen->info.ip[AMD_IP_UVD_ENC].num_queues || sscreen->info.has_video_hw.vcn_encode) {
sscreen->b.get_video_param = si_get_video_param;
sscreen->b.is_video_format_supported = si_vid_is_format_supported;
} else {

View file

@ -686,7 +686,7 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, unsign
/* Initialize multimedia functions. */
if (sscreen->info.ip[AMD_IP_UVD].num_queues || sscreen->info.has_video_hw.vcn_decode ||
sscreen->info.ip[AMD_IP_VCN_JPEG].num_queues || sscreen->info.has_video_hw.vce_encode ||
sscreen->info.has_video_hw.uvd_encode || sscreen->info.has_video_hw.vcn_encode) {
sscreen->info.ip[AMD_IP_UVD_ENC].num_queues || sscreen->info.has_video_hw.vcn_encode) {
sctx->b.create_video_codec = si_uvd_create_decoder;
sctx->b.create_video_buffer = si_video_buffer_create;
if (screen->resource_create_with_modifiers)