[PATCH 13/23] drm/amd/display: Add fullscreen only sharpening policy

Alex Hung alex.hung at amd.com
Wed Sep 11 16:20:55 UTC 2024


From: Relja Vojvodic <Relja.Vojvodic at amd.com>

[WHAT & HOW]
Disable sharpening if not in fullscreen if this policy is selected

Reviewed-by: Samson Tam <samson.tam at amd.com>
Signed-off-by: Relja Vojvodic <Relja.Vojvodic at amd.com>
Signed-off-by: Alex Hung <alex.hung at amd.com>
---
 drivers/gpu/drm/amd/display/dc/spl/dc_spl.c       | 3 +++
 drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c
index f7a654b3a092..014e8a296f0c 100644
--- a/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c
+++ b/drivers/gpu/drm/amd/display/dc/spl/dc_spl.c
@@ -853,6 +853,9 @@ static bool spl_get_isharp_en(struct spl_in *spl_in,
 	else if ((spl_is_yuv420(spl_in->basic_in.format) && !fullscreen) &&
 		(spl_in->debug.sharpen_policy == SHARPEN_RGB_FULLSCREEN_YUV))
 		return enable_isharp;
+	else if (!spl_in->is_fullscreen &&
+			spl_in->debug.sharpen_policy == SHARPEN_FULLSCREEN_ALL)
+		return enable_isharp;
 
 	/*
 	 * Apply sharpness if supports horizontal taps 4,6 AND
diff --git a/drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h b/drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h
index 425d4a282c7a..2a74ff5fdfdb 100644
--- a/drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h
+++ b/drivers/gpu/drm/amd/display/dc/spl/dc_spl_types.h
@@ -490,7 +490,8 @@ enum linear_light_scaling	{	// convert it in translation logic
 enum sharpen_policy {
 	SHARPEN_ALWAYS = 0,
 	SHARPEN_YUV = 1,
-	SHARPEN_RGB_FULLSCREEN_YUV = 2
+	SHARPEN_RGB_FULLSCREEN_YUV = 2,
+	SHARPEN_FULLSCREEN_ALL = 3
 };
 enum scale_to_sharpness_policy {
 	NO_SCALE_TO_SHARPNESS_ADJ = 0,
-- 
2.34.1



More information about the amd-gfx mailing list