diff options
author | Samson Tam <[email protected]> | 2024-08-21 20:17:23 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2024-09-02 11:35:32 -0400 |
commit | 8a060e9c17d0fd7a182e335a52dcb5fe327e3d86 (patch) | |
tree | 1b2a689deb4745da5086fa122f95c96f7837cc13 | |
parent | c24538c4aa352b68bd5c429b7fd3ccf4d4407143 (diff) |
drm/amd/display: disable sharpness if HDR Multiplier is too large
[Why]
Certain profiles have higher HDR multiplier than SDR boost max which
is not currently supported
[How]
Disable sharpness for these profiles
Fixes: 1b0ce903fe74 ("drm/amd/display: add improvements for text display and HDR DWM and MPO")
Reviewed-by: Martin Leung <[email protected]>
Signed-off-by: Samson Tam <[email protected]>
Signed-off-by: Hamza Mahfooz <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dc_spl_translate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c b/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c index 75d00c6a38f4..328499a77884 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c +++ b/drivers/gpu/drm/amd/display/dc/dc_spl_translate.c @@ -180,9 +180,13 @@ void translate_SPL_in_params_from_pipe_ctx(struct pipe_ctx *pipe_ctx, struct spl spl_in->is_fullscreen = dm_helpers_is_fullscreen(pipe_ctx->stream->ctx, pipe_ctx->stream); spl_in->is_hdr_on = dm_helpers_is_hdr_on(pipe_ctx->stream->ctx, pipe_ctx->stream); spl_in->hdr_multx100 = 0; - if (spl_in->is_hdr_on) + if (spl_in->is_hdr_on) { spl_in->hdr_multx100 = (uint32_t)dc_fixpt_floor(dc_fixpt_mul(plane_state->hdr_mult, dc_fixpt_from_int(100))); + /* Disable sharpness for HDR Mult > 6.0 */ + if (spl_in->hdr_multx100 > 600) + spl_in->adaptive_sharpness.enable = false; + } } /// @brief Translate SPL output parameters to pipe context |