radeonsi: fix video processing path without VPE enabled
Fixes: 6b441ef6ab
(amd, radeonsi: supports post processing entrypoint)
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10495
Cc: mesa-stable
Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27339>
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user