From: Ray Wu <ray.wu@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Harry Wentland <harry.wentland@amd.com>,
Leo Li <sunpeng.li@amd.com>,
Aurabindo Pillai <aurabindo.pillai@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>,
Alex Hung <alex.hung@amd.com>, Jesse Agate <jesse.agate@amd.com>,
Samson Tam <samson.tam@amd.com>, Ray Wu <ray.wu@amd.com>
Subject: [PATCH 04/28] drm/amd/display: Always Scale Flag
Date: Mon, 28 Apr 2025 21:50:34 +0800 [thread overview]
Message-ID: <20250428135514.20775-5-ray.wu@amd.com> (raw)
In-Reply-To: <20250428135514.20775-1-ray.wu@amd.com>
From: Jesse Agate <jesse.agate@amd.com>
[Why & How]
When always scale flag is set at the API level, the number of taps
should not be overridden to zero in the identity scaling ratio case,
and luma scale should not be set to bypass regardless of luma scale
ratio
Reviewed-by: Samson Tam <samson.tam@amd.com>
Signed-off-by: Jesse Agate <jesse.agate@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
---
drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c | 25 +++++++++++---------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c b/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c
index 28348734d900..002eb926cca4 100644
--- a/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c
+++ b/drivers/gpu/drm/amd/display/dc/sspl/dc_spl.c
@@ -776,7 +776,7 @@ static enum scl_mode spl_get_dscl_mode(const struct spl_in *spl_in,
* Do not bypass UV at 1:1 for cositing to be applied
*/
if (!enable_isharp) {
- if (data->ratios.horz.value == one && data->ratios.vert.value == one)
+ if (data->ratios.horz.value == one && data->ratios.vert.value == one && !spl_in->basic_out.always_scale)
return SCL_MODE_SCALING_420_LUMA_BYPASS;
}
@@ -884,7 +884,7 @@ static bool spl_get_isharp_en(struct spl_in *spl_in,
/* Calculate number of tap with adaptive scaling off */
static void spl_get_taps_non_adaptive_scaler(
- struct spl_scratch *spl_scratch, const struct spl_taps *in_taps)
+ struct spl_scratch *spl_scratch, const struct spl_taps *in_taps, bool always_scale)
{
bool check_max_downscale = false;
@@ -944,15 +944,15 @@ static void spl_get_taps_non_adaptive_scaler(
spl_fixpt_from_fraction(6, 1));
SPL_ASSERT(check_max_downscale);
- if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz))
+
+ if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz) && !always_scale)
spl_scratch->scl_data.taps.h_taps = 1;
- if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert))
+ if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert) && !always_scale)
spl_scratch->scl_data.taps.v_taps = 1;
- if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz_c))
+ if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.horz_c) && !always_scale)
spl_scratch->scl_data.taps.h_taps_c = 1;
- if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert_c))
+ if (IDENTITY_RATIO(spl_scratch->scl_data.ratios.vert_c) && !always_scale)
spl_scratch->scl_data.taps.v_taps_c = 1;
-
}
/* Calculate optimal number of taps */
@@ -965,13 +965,15 @@ static bool spl_get_optimal_number_of_taps(
unsigned int max_taps_y, max_taps_c;
unsigned int min_taps_y, min_taps_c;
enum lb_memory_config lb_config;
- bool skip_easf = false;
+ bool skip_easf = false;
+ bool always_scale = spl_in->basic_out.always_scale;
bool is_subsampled = spl_is_subsampled_format(spl_in->basic_in.format);
+
if (spl_scratch->scl_data.viewport.width > spl_scratch->scl_data.h_active &&
max_downscale_src_width != 0 &&
spl_scratch->scl_data.viewport.width > max_downscale_src_width) {
- spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps);
+ spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps, always_scale);
*enable_easf_v = false;
*enable_easf_h = false;
*enable_isharp = false;
@@ -980,7 +982,7 @@ static bool spl_get_optimal_number_of_taps(
/* Disable adaptive scaler and sharpener when integer scaling is enabled */
if (spl_in->scaling_quality.integer_scaling) {
- spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps);
+ spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps, always_scale);
*enable_easf_v = false;
*enable_easf_h = false;
*enable_isharp = false;
@@ -996,7 +998,7 @@ static bool spl_get_optimal_number_of_taps(
* taps = 4 for upscaling
*/
if (skip_easf)
- spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps);
+ spl_get_taps_non_adaptive_scaler(spl_scratch, in_taps, always_scale);
else {
if (spl_is_video_format(spl_in->basic_in.format)) {
spl_scratch->scl_data.taps.h_taps = 6;
@@ -1898,3 +1900,4 @@ bool SPL_NAMESPACE(spl_get_number_of_taps(struct spl_in *spl_in, struct spl_out
spl_set_taps_data(dscl_prog_data, data);
return res;
}
+
--
2.43.0
next prev parent reply other threads:[~2025-04-28 13:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-28 13:50 [PATCH 00/28] DC Patches May 05 2025 Ray Wu
2025-04-28 13:50 ` [PATCH 01/28] drm/amd/display: Update IPS sequential_ono requirement checks Ray Wu
2025-04-28 13:50 ` [PATCH 02/28] drm/amd/display: Refactoring DSC enum dsc_bits_per_comp Ray Wu
2025-04-28 13:50 ` [PATCH 03/28] drm/amd/display: Promote DAL to 3.2.330 Ray Wu
2025-04-28 13:50 ` Ray Wu [this message]
2025-04-28 13:50 ` [PATCH 05/28] drm/amd/display: Remove redundant null check Ray Wu
2025-04-28 13:50 ` [PATCH 06/28] drm/amd/display: Fix invalid context error in dml helper Ray Wu
2025-04-28 13:50 ` [PATCH 07/28] drm/amd/display: Prepare for Fused I2C-over-AUX Ray Wu
2025-04-28 13:50 ` [PATCH 08/28] Revert "drm/amd/display: Refactor SubVP cursor limiting logic" Ray Wu
2025-04-28 13:50 ` [PATCH 09/28] drm/amd/display: allow dscclk disable Ray Wu
2025-04-28 13:50 ` [PATCH 10/28] drm/amd/display: more liberal vmin/vmax update for freesync Ray Wu
2025-04-28 13:50 ` [PATCH 11/28] drm/amd/display: disable DPP RCG before DPP CLK enable Ray Wu
2025-04-28 13:50 ` [PATCH 12/28] drm/amd/display: [FW Promotion] Release 0.1.8.0 Ray Wu
2025-04-28 13:50 ` [PATCH 13/28] drm/amd/display: Promote DAL to 3.2.331 Ray Wu
2025-04-28 13:50 ` [PATCH 14/28] drm/amd/display: Allow 0 dtbclk for DCN35 and above Ray Wu
2025-04-28 13:50 ` [PATCH 15/28] Revert "drm/amd/display: turn off eDP lcdvdd and backlight if not required" Ray Wu
2025-04-28 13:50 ` [PATCH 16/28] drm/amd/display: Add skip rIOMMU dc config option Ray Wu
2025-04-28 13:50 ` [PATCH 17/28] drm/amd/display: Send IPSExit unconditionally Ray Wu
2025-04-28 13:50 ` [PATCH 18/28] drm/amd/display: Remove unnecessary DC_FP_START/DC_FP_END Ray Wu
2025-04-29 15:04 ` Alex Deucher
2025-04-29 16:01 ` Alex Hung
2025-04-29 16:03 ` Alex Deucher
2025-04-28 13:50 ` [PATCH 19/28] drm/amd/display: Call FP Protect Before Mode Programming/Mode Support Ray Wu
2025-04-28 13:50 ` [PATCH 20/28] drm/amd/display: DML21 Fixes Ray Wu
2025-04-28 13:50 ` [PATCH 21/28] drm/amd/display: Refactor SubVP cursor limiting logic Ray Wu
2025-04-28 13:50 ` [PATCH 22/28] drm/amd/display: Shift DMUB AUX reply command if necessary Ray Wu
2025-04-28 13:50 ` [PATCH 23/28] drm/amd/display: Fix the checking condition in dmub aux handling Ray Wu
2025-04-28 13:50 ` [PATCH 24/28] drm/amd/display: Remove incorrect checking in dmub aux handler Ray Wu
2025-04-28 13:50 ` [PATCH 25/28] drm/amd/display: Copy AUX read reply data whenever length > 0 Ray Wu
2025-04-28 13:50 ` [PATCH 26/28] drm/amd/display: Fix wrong handling for AUX_DEFER case Ray Wu
2025-04-28 13:50 ` [PATCH 27/28] drm/amd/display: Assign preferred stream encoder instance to dpia Ray Wu
2025-04-28 13:50 ` [PATCH 28/28] drm/amd/display: Only wait for required free space in DMUB mailbox Ray Wu
2025-05-05 13:13 ` [PATCH 00/28] DC Patches May 05 2025 Wheeler, Daniel
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=20250428135514.20775-5-ray.wu@amd.com \
--to=ray.wu@amd.com \
--cc=alex.hung@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=jesse.agate@amd.com \
--cc=roman.li@amd.com \
--cc=samson.tam@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.