From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: intel-xe@lists.freedesktop.org,
"Michał Grzelak" <michal.grzelak@intel.com>,
"Nemesa Garg" <nemesa.garg@intel.com>
Subject: [PATCH v2 5/9] drm/i915/casf: Handle CASF in skl_scaler_get_filter_select()
Date: Tue, 7 Apr 2026 20:52:39 +0300 [thread overview]
Message-ID: <20260407175244.19654-6-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20260407175244.19654-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Nuke the duplicate CASF_SCALER_FILTER_SELECT and just have
skl_scaler_get_filter_select() return the proper value for
sharpness filter use. It is the same "use programmable coefficients"
value we already use for the nearest neighbor filtering.
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com>
Reviewed-by: Nemesa Garg <nemesa.garg@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/skl_scaler.c | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
index 525afd736195..d8bf65c6b4a7 100644
--- a/drivers/gpu/drm/i915/display/skl_scaler.c
+++ b/drivers/gpu/drm/i915/display/skl_scaler.c
@@ -730,9 +730,9 @@ static void glk_program_nearest_filter_coefs(struct intel_display *display,
GLK_PS_COEF_INDEX_SET(pipe, id, set), 0);
}
-static u32 skl_scaler_get_filter_select(enum drm_scaling_filter filter)
+static u32 skl_scaler_get_filter_select(enum drm_scaling_filter filter, bool casf)
{
- if (filter == DRM_SCALING_FILTER_NEAREST_NEIGHBOR)
+ if (filter == DRM_SCALING_FILTER_NEAREST_NEIGHBOR || casf)
return (PS_FILTER_PROGRAMMED |
PS_Y_VERT_FILTER_SELECT(0) |
PS_Y_HORZ_FILTER_SELECT(0) |
@@ -757,13 +757,6 @@ static void skl_scaler_setup_filter(struct intel_display *display,
}
}
-#define CASF_SCALER_FILTER_SELECT \
- (PS_FILTER_PROGRAMMED | \
- PS_Y_VERT_FILTER_SELECT(0) | \
- PS_Y_HORZ_FILTER_SELECT(0) | \
- PS_UV_VERT_FILTER_SELECT(0) | \
- PS_UV_HORZ_FILTER_SELECT(0))
-
void skl_scaler_setup_casf(struct intel_crtc_state *crtc_state)
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
@@ -794,7 +787,7 @@ void skl_scaler_setup_casf(struct intel_crtc_state *crtc_state)
trace_intel_pipe_scaler_update_arm(crtc, id, x, y, width, height);
ps_ctrl = PS_SCALER_EN | PS_BINDING_PIPE | scaler_state->scalers[id].mode |
- CASF_SCALER_FILTER_SELECT;
+ skl_scaler_get_filter_select(crtc_state->hw.scaling_filter, true);
intel_de_write_fw(display, SKL_PS_CTRL(pipe, id), ps_ctrl);
intel_de_write_fw(display, SKL_PS_WIN_POS(pipe, id),
@@ -844,7 +837,7 @@ void skl_pfit_enable(const struct intel_crtc_state *crtc_state)
id = scaler_state->scaler_id;
ps_ctrl = PS_SCALER_EN | PS_BINDING_PIPE | scaler_state->scalers[id].mode |
- skl_scaler_get_filter_select(crtc_state->hw.scaling_filter);
+ skl_scaler_get_filter_select(crtc_state->hw.scaling_filter, false);
trace_intel_pipe_scaler_update_arm(crtc, id, x, y, width, height);
@@ -910,7 +903,7 @@ skl_program_plane_scaler(struct intel_dsb *dsb,
}
ps_ctrl = PS_SCALER_EN | PS_BINDING_PLANE(plane->id) | scaler->mode |
- skl_scaler_get_filter_select(plane_state->hw.scaling_filter);
+ skl_scaler_get_filter_select(plane_state->hw.scaling_filter, false);
trace_intel_plane_scaler_update_arm(plane, scaler_id,
crtc_x, crtc_y, crtc_w, crtc_h);
--
2.52.0
next prev parent reply other threads:[~2026-04-07 17:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-07 17:52 [PATCH v2 0/9] drm/i915/casf: Integrate the sharpness filter properly into the scaler code Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 1/9] drm/i915/casf: s/casf_enable/enable/ Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 2/9] drm/i915/casf: Make a proper hw state copy of the sharpness_strength Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 3/9] drm/i915/casf: Move the casf state to better place Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 4/9] drm/i915/casf: Extract scaler_has_casf() Ville Syrjala
2026-04-07 17:52 ` Ville Syrjala [this message]
2026-04-07 17:52 ` [PATCH v2 6/9] drm/i915/casf: Constify crtc_state Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 7/9] drm/i915/casf: Remove redundant argument from intel_casf_filter_lut_load() Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 8/9] drm/i915/pfit: Call intel_pfit_compute_config() unconditionally on (e)DP/HDMI Ville Syrjala
2026-04-07 17:52 ` [PATCH v2 9/9] drm/i915/casf: Integrate the sharpness filter properly into the scaler code Ville Syrjala
2026-04-07 18:05 ` ✓ CI.KUnit: success for drm/i915/casf: Integrate the sharpness filter properly into the scaler code (rev2) Patchwork
2026-04-07 18:54 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-07 21:32 ` ✓ Xe.CI.FULL: " Patchwork
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=20260407175244.19654-6-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=michal.grzelak@intel.com \
--cc=nemesa.garg@intel.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