amd/vpelib: Remove deprecated update_3dlut flag

[WHY & HOW]
update_3dlut flag has been replaced by UID mechanism.
Remove update_3dlut flag and update related functions.

Reviewed-by: Jesse Agate <jesse.agate@amd.com>
Reviewed-by: Tomson Chang <tomson.chang@amd.com>
Acked-by: Jack Chih <chiachih@amd.com>
Signed-off-by: Mike Hsieh <Mike.Hsieh@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30531>
This commit is contained in:
Hsieh, Mike
2024-03-11 13:08:44 +08:00
committed by Marge Bot
parent 0e38b794e2
commit 746556d585
6 changed files with 10 additions and 34 deletions
-1
View File
@@ -556,7 +556,6 @@ struct vpe_tonemap_params {
uint16_t lut_dim;
uint16_t *lut_data;
bool update_3dlut;
bool enable_3dlut;
};
+10 -13
View File
@@ -654,10 +654,13 @@ enum vpe_status vpe_color_update_color_space_and_tf(
new_matrix_scaling_factor = vpe_fixpt_one;
stream_ctx = &vpe_priv->stream_ctx[stream_idx];
bool is_3dlut_enable =
stream_ctx->stream.tm_params.UID != 0 || stream_ctx->stream.tm_params.enable_3dlut;
bool require_update = stream_ctx->UID_3DLUT != param->streams[stream_idx].tm_params.UID;
color_check_input_cm_update(vpe_priv, stream_ctx,
&param->streams[stream_idx].surface_info.cs, &param->streams[stream_idx].color_adj,
param->streams[stream_idx].tm_params.UID != 0 || param->streams[stream_idx].tm_params.enable_3dlut);
is_3dlut_enable);
build_scale_and_bias(stream_ctx->bias_scale,
&param->streams[stream_idx].surface_info.cs,
@@ -686,23 +689,18 @@ enum vpe_status vpe_color_update_color_space_and_tf(
}
color_update_degamma_tf(vpe_priv, stream_ctx->tf,
vpe_priv->stream_ctx->tf_scaling_factor,
y_scale,
vpe_fixpt_zero,
stream_ctx->stream.tm_params.UID != 0 || stream_ctx->stream.tm_params.enable_3dlut, // By Pass degamma if 3DLUT is enabled
vpe_priv->stream_ctx->tf_scaling_factor, y_scale, vpe_fixpt_zero,
is_3dlut_enable, // By Pass degamma if 3DLUT is enabled
stream_ctx->input_tf);
}
if (stream_ctx->dirty_bits.color_space || output_ctx->dirty_bits.color_space) {
status = vpe_color_update_gamut(vpe_priv, stream_ctx->cs, output_ctx->cs,
stream_ctx->gamut_remap,
stream_ctx->stream.tm_params.UID != 0 || stream_ctx->stream.tm_params.enable_3dlut);
stream_ctx->gamut_remap, is_3dlut_enable);
}
if (output_ctx->dirty_bits.transfer_function ||
output_ctx->dirty_bits.color_space ||
stream_ctx->update_3dlut) {
if (output_ctx->dirty_bits.transfer_function || output_ctx->dirty_bits.color_space ||
require_update) {
vpe_update_blnd_gamma(vpe_priv, param, &stream_ctx->stream.tm_params, stream_ctx->blend_tf);
}
}
@@ -769,7 +767,7 @@ enum vpe_status vpe_color_update_movable_cm(
bool enable_3dlut = stream_ctx->stream.tm_params.UID != 0 || stream_ctx->stream.tm_params.enable_3dlut;
if (stream_ctx->update_3dlut || stream_ctx->UID_3DLUT != stream_ctx->stream.tm_params.UID) {
if (stream_ctx->UID_3DLUT != stream_ctx->stream.tm_params.UID) {
uint32_t shaper_norm_factor;
struct vpe_color_space tm_out_cs;
@@ -832,7 +830,6 @@ enum vpe_status vpe_color_update_movable_cm(
vpe_convert_to_tetrahedral(vpe_priv, param->streams[stream_idx].tm_params.lut_data,
stream_ctx->lut3d_func, enable_3dlut);
stream_ctx->update_3dlut = false;
stream_ctx->UID_3DLUT = param->streams[stream_idx].tm_params.UID;
}
}
-9
View File
@@ -540,15 +540,6 @@ enum vpe_status vpe_check_input_support(struct vpe *vpe, const struct vpe_stream
return VPE_STATUS_OK;
}
enum vpe_status vpe_cache_tone_map_params(
struct stream_ctx *stream_ctx, const struct vpe_stream *stream)
{
stream_ctx->update_3dlut = stream_ctx->update_3dlut || stream->tm_params.update_3dlut ||
stream->tm_params.UID || (stream_ctx->stream.flags.geometric_scaling != stream->flags.geometric_scaling);
return VPE_STATUS_OK;
}
enum vpe_status vpe_check_tone_map_support(
struct vpe *vpe, const struct vpe_stream *stream, const struct vpe_build_param *param)
{
-2
View File
@@ -81,8 +81,6 @@ enum vpe_status vpe_check_output_support(struct vpe *vpe, const struct vpe_build
enum vpe_status vpe_check_input_support(struct vpe *vpe, const struct vpe_stream *stream);
enum vpe_status vpe_cache_tone_map_params(struct stream_ctx *, const struct vpe_stream *stream);
enum vpe_status vpe_check_tone_map_support(
struct vpe *vpe, const struct vpe_stream *stream, const struct vpe_build_param *param);
-1
View File
@@ -128,7 +128,6 @@ struct stream_ctx {
enum color_transfer_func tf;
enum color_space cs;
bool enable_3dlut;
bool update_3dlut;
uint64_t UID_3DLUT; // UID for current 3D LUT params
union {
-8
View File
@@ -392,14 +392,6 @@ enum vpe_status vpe_check_support(
if (!vpe_priv->stream_ctx)
status = VPE_STATUS_NO_MEMORY;
// VPElib needs to cache whether or not the 3DLUT has been updated
// This is to deal with case when 3DLUT has been updated but VPE rejects the job.
// Need a sticky bit to tell vpe to program the 3dlut on next jobs submission even
// if 3dlut has not changed
for (i = 0; i < param->num_streams; i++) {
vpe_cache_tone_map_params(&vpe_priv->stream_ctx[i], &param->streams[i]);
}
if (status == VPE_STATUS_OK) {
// output checking - check per asic support
status = vpe_check_output_support(vpe, param);