diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index a8ee0bf08b5..a0751aff7f6 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -573,12 +573,9 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil /* Return the capability of Video Post Processor. * Have to determine the HW version of VPE. * Have to check the HW limitation and + * Check if the VPE exists and is valid */ - if (entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) { - /* Check if the VPE exists and is valid */ - if (!sscreen->info.ip[AMD_IP_VPE].num_queues) { - return false; - } + if (sscreen->info.ip[AMD_IP_VPE].num_queues && entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) { switch(param) { case PIPE_VIDEO_CAP_SUPPORTED: @@ -1009,7 +1006,7 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for { struct si_screen *sscreen = (struct si_screen *)screen; - if (entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) { + if (sscreen->info.ip[AMD_IP_VPE].num_queues && entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) { /* Todo: * Unable to confirm whether it is asking for an input or output type * Have to modify va frontend for solving this problem diff --git a/src/gallium/drivers/radeonsi/si_uvd.c b/src/gallium/drivers/radeonsi/si_uvd.c index d7f944c7069..3f01b6f5591 100644 --- a/src/gallium/drivers/radeonsi/si_uvd.c +++ b/src/gallium/drivers/radeonsi/si_uvd.c @@ -115,7 +115,8 @@ struct pipe_video_codec *si_uvd_create_decoder(struct pipe_context *context, else return si_vce_create_encoder(context, templ, ctx->ws, si_vce_get_buffer); } - } else if (templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) + } else if (((struct si_screen *)(context->screen))->info.ip[AMD_IP_VPE].num_queues && + templ->entrypoint == PIPE_VIDEO_ENTRYPOINT_PROCESSING) return si_vpe_create_processor(context, templ); if (ctx->vcn_ip_ver == VCN_4_0_0)