AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hamza Mahfooz <hamza.mahfooz@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Rodrigo Siqueira <rodrigo.siqueira@amd.com>,
	"Aurabindo . Pillai" <aurabindo.pillai@amd.com>,
	Hamza Mahfooz <hamza.mahfooz@amd.com>,
	Roman Li <roman.li@amd.com>, Wayne Lin <wayne.lin@amd.com>,
	Tom Chung <chiahsuan.chung@amd.com>,
	Fangzhi Zuo <jerry.zuo@amd.com>,
	Zaeem Mohamed <zaeem.mohamed@amd.com>,
	Daniel Wheeler <daniel.wheeler@amd.com>,
	Samson Tam <Samson.Tam@amd.com>,
	Martin Leung <martin.leung@amd.com>
Subject: [PATCH 06/14] drm/amd/display: disable sharpness if HDR Multiplier is too large
Date: Tue, 27 Aug 2024 12:37:26 -0400	[thread overview]
Message-ID: <20240827164045.167557-7-hamza.mahfooz@amd.com> (raw)
In-Reply-To: <20240827164045.167557-1-hamza.mahfooz@amd.com>

From: Samson Tam <Samson.Tam@amd.com>

[Why]
Certain profiles have higher HDR multiplier than SDR boost max which
is not currently supported

[How]
Disable sharpness for these profiles

Fixes: 63697e1d69c7 ("drm/amd/display: add improvements for text display and HDR DWM and MPO")
Reviewed-by: Martin Leung <martin.leung@amd.com>
Signed-off-by: Samson Tam <Samson.Tam@amd.com>
Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com>
---
 drivers/gpu/drm/amd/display/dc/dc_spl_translate.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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
-- 
2.46.0


  parent reply	other threads:[~2024-08-27 16:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-27 16:37 [PATCH 00/14] DC Patches August 27, 2024 Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 01/14] drm/amd/display: Fix DCN35 set min dispclk logic Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 02/14] drm/amd/display: only trigger BIOS related assert for older ASICs Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 03/14] drm/amd/display: Lock DC and exit IPS when changing backlight Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 04/14] drm/amd/display: re-enable Dynamic ODM policy Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 05/14] drm/amd/display: Add dpia debug option to control power management Hamza Mahfooz
2024-08-27 16:37 ` Hamza Mahfooz [this message]
2024-08-27 16:37 ` [PATCH 07/14] drm/amd/display: Refactor dccg35_get_other_enabled_symclk_fe Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 08/14] drm/amd/display: fix dccg root clock optimization related hang Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 09/14] Revert "drm/amd/display: Wait for all pending cleared before full update" Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 10/14] drm/amd/display: Add sharpness control interface Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 11/14] drm/amd/display: fix graphics hang in multi-display mst case Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 12/14] drm/amd/display: Block timing sync for different signals in PMO Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 13/14] drm/amd/display: Fix flickering caused by dccg Hamza Mahfooz
2024-08-27 16:37 ` [PATCH 14/14] drm/amd/display: 3.2.299 Hamza Mahfooz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240827164045.167557-7-hamza.mahfooz@amd.com \
    --to=hamza.mahfooz@amd.com \
    --cc=Samson.Tam@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=aurabindo.pillai@amd.com \
    --cc=chiahsuan.chung@amd.com \
    --cc=daniel.wheeler@amd.com \
    --cc=harry.wentland@amd.com \
    --cc=jerry.zuo@amd.com \
    --cc=martin.leung@amd.com \
    --cc=rodrigo.siqueira@amd.com \
    --cc=roman.li@amd.com \
    --cc=sunpeng.li@amd.com \
    --cc=wayne.lin@amd.com \
    --cc=zaeem.mohamed@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox