radeonsi/vpe: Silence expected errors with unsupported output format
YUV formats are currently unsupported for output, so we should not print any errors in case application uses YUV output format. There is a shader fallback that will be correctly used in this case. Don't print any vpelib errors unless AMDGPU_SIVPE_LOG_LEVEL is set. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12263 Acked-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32543>
This commit is contained in:
@@ -103,6 +103,11 @@ si_vpe_log(void* log_ctx, const char* fmt, ...)
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
static void
|
||||
si_vpe_log_silent(void* log_ctx, const char* fmt, ...)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
si_vpe_populate_debug_options(struct vpe_debug_options* debug)
|
||||
{
|
||||
@@ -110,9 +115,9 @@ si_vpe_populate_debug_options(struct vpe_debug_options* debug)
|
||||
}
|
||||
|
||||
static void
|
||||
si_vpe_populate_callback_modules(struct vpe_callback_funcs* funcs)
|
||||
si_vpe_populate_callback_modules(struct vpe_callback_funcs* funcs, uint8_t log_level)
|
||||
{
|
||||
funcs->log = si_vpe_log;
|
||||
funcs->log = log_level ? si_vpe_log : si_vpe_log_silent;
|
||||
funcs->zalloc = si_vpe_zalloc;
|
||||
funcs->free = si_vpe_free;
|
||||
}
|
||||
@@ -197,7 +202,7 @@ si_vpe_populate_init_data(struct si_context *sctx, struct vpe_init_data* params,
|
||||
|
||||
memset(¶ms->debug, 0, sizeof(struct vpe_debug_options));
|
||||
si_vpe_populate_debug_options(¶ms->debug);
|
||||
si_vpe_populate_callback_modules(¶ms->funcs);
|
||||
si_vpe_populate_callback_modules(¶ms->funcs, log_level);
|
||||
|
||||
SIVPE_DBG(log_level, "Get family: %d\n", sctx->family);
|
||||
SIVPE_DBG(log_level, "Get gfx_level: %d\n", sctx->gfx_level);
|
||||
@@ -914,7 +919,7 @@ si_vpe_processor_is_process_supported(struct pipe_video_codec *codec,
|
||||
|
||||
result = vpe_check_support(vpe_handle, build_param, &bufs_required);
|
||||
if (VPE_STATUS_OK != result) {
|
||||
SIVPE_ERR("Check support failed with result: %d\n", result);
|
||||
SIVPE_WARN(vpeproc->log_level, "Check support failed with result: %d\n", result);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user