amd/vpelib: Move predication size calculation to bufs_req

Calculation for the worst case scenario in bufs_req should also include
predication command size.

Acked-by: Chuanyu Tseng <Chuanyu.Tseng@amd.com>
Signed-off-by: Andrzei Okenczyc <Andrzej.Okenczyc@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36809>
This commit is contained in:
Okenczyc, Andrzej 2025-07-29 20:01:01 +02:00 committed by ChuanYu Tseng (Max)
parent fbeaca1202
commit e5cdc78e0e
2 changed files with 2 additions and 4 deletions

View file

@ -1218,6 +1218,8 @@ void vpe10_get_bufs_req(struct vpe_priv *vpe_priv, struct vpe_bufs_req *req)
req->emb_buf_size += emb_req;
}
req->cmd_buf_size += VPE_PREDICATION_CMD_SIZE;
}
enum vpe_status vpe10_check_mirror_rotation_support(const struct vpe_stream *stream)

View file

@ -741,10 +741,6 @@ enum vpe_status vpe_build_commands(
bufs->cmd_buf.size = vpe_priv->bufs_required.cmd_buf_size;
bufs->emb_buf.size = vpe_priv->bufs_required.emb_buf_size;
if (param->predication_info.enable == true) {
bufs->cmd_buf.size += VPE_PREDICATION_CMD_SIZE;
}
return VPE_STATUS_OK;
} else if ((bufs->cmd_buf.size < vpe_priv->bufs_required.cmd_buf_size) ||
(bufs->emb_buf.size < vpe_priv->bufs_required.emb_buf_size)) {