radeonsi: Adds return on failure to get plane info

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27456>
This commit is contained in:
Surafel Assefa 2024-02-02 22:12:07 -05:00 committed by Marge Bot
parent 53e130e333
commit eaf8c56a11
1 changed files with 6 additions and 4 deletions

View File

@ -423,13 +423,15 @@ si_vpe_set_plane_info(struct vpe_video_processor *vpeproc,
si_vpe_set_color_space(process_properties, &surface_info->cs, format, which_surface);
/* Get surface info, such as buffer alignment and offset */
if (vpeproc->base.context->screen && vpeproc->base.context->screen->resource_get_info)
if (vpeproc->base.context->screen && vpeproc->base.context->screen->resource_get_info) {
vpeproc->base.context->screen->resource_get_info(vpeproc->base.context->screen,
surfaces[0]->texture,
&pitch,
&offset);
else
} else {
SIVPE_ERR("Get plane pitch and offset info failed\n");
return VPE_STATUS_ERROR;
}
si_res = si_resource(surfaces[0]->texture);
plane_address->tmz_surface = false;
@ -450,12 +452,12 @@ si_vpe_set_plane_info(struct vpe_video_processor *vpeproc,
plane_address->video_progressive.luma_dcc_const_color.quad_part = 0;
//plane_size->surface_pitch /= 1; // Byte alignment to Pixel alignment
/* Get 2nd plane buffer info */
if (surfaces[1] && vpeproc->base.context->screen && vpeproc->base.context->screen->resource_get_info)
if (surfaces[1] && vpeproc->base.context->screen && vpeproc->base.context->screen->resource_get_info) {
vpeproc->base.context->screen->resource_get_info(vpeproc->base.context->screen,
surfaces[1]->texture,
&pitch,
&offset);
else {
} else {
SIVPE_ERR("Get 2nd plane pitch and offset info failed\n");
return VPE_STATUS_ERROR;
}