Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>,
	<intel-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 08/10] drm/i915/display: Set and get the casf config
Date: Mon, 7 Apr 2025 12:00:09 +0530	[thread overview]
Message-ID: <c7bc31f0-f4d0-4ace-aa68-12c2d45cef7c@intel.com> (raw)
In-Reply-To: <20250402125647.361295-9-nemesa.garg@intel.com>


On 4/2/2025 6:26 PM, Nemesa Garg wrote:
> Set the configuration for CASF and capture it
> in crtc_state and get the configuration by
> reading back. Add the support to compare the
> software and hardware state of CASF.
>
> v2: Update subject[Ankit]
> v3: Add the state compare[Ankit]
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>

LGTM.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

> ---
>   drivers/gpu/drm/i915/display/intel_display.c |  7 +++++++
>   drivers/gpu/drm/i915/display/skl_scaler.c    | 18 ++++++++++++------
>   2 files changed, 19 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> index 4e84ee149fa2..db82da523323 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -4240,6 +4240,10 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
>   		return ret;
>   	}
>   
> +	ret = intel_casf_compute_config(crtc_state);
> +	if (ret)
> +		return ret;
> +
>   	if (DISPLAY_VER(display) >= 9) {
>   		if (intel_crtc_needs_modeset(crtc_state) ||
>   		    intel_crtc_needs_fastset(crtc_state) ||
> @@ -5292,6 +5296,9 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,
>   
>   		PIPE_CONF_CHECK_I(scaler_state.scaler_id);
>   		PIPE_CONF_CHECK_I(pixel_rate);
> +		PIPE_CONF_CHECK_BOOL(hw.casf_params.casf_enable);
> +		PIPE_CONF_CHECK_I(hw.casf_params.win_size);
> +		PIPE_CONF_CHECK_I(hw.casf_params.strength);
>   
>   		PIPE_CONF_CHECK_X(gamma_mode);
>   		if (display->platform.cherryview)
> diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
> index d816dae9cec4..c22f067207af 100644
> --- a/drivers/gpu/drm/i915/display/skl_scaler.c
> +++ b/drivers/gpu/drm/i915/display/skl_scaler.c
> @@ -961,16 +961,22 @@ void skl_scaler_get_config(struct intel_crtc_state *crtc_state)
>   			continue;
>   
>   		id = i;
> -		crtc_state->pch_pfit.enabled = true;
> +
> +		if (HAS_CASF(display) && id == 1)
> +			intel_casf_sharpness_get_config(crtc_state);
> +
> +		if (!crtc_state->hw.casf_params.casf_enable)
> +			crtc_state->pch_pfit.enabled = true;
>   
>   		pos = intel_de_read(display, SKL_PS_WIN_POS(crtc->pipe, i));
>   		size = intel_de_read(display, SKL_PS_WIN_SZ(crtc->pipe, i));
>   
> -		drm_rect_init(&crtc_state->pch_pfit.dst,
> -			      REG_FIELD_GET(PS_WIN_XPOS_MASK, pos),
> -			      REG_FIELD_GET(PS_WIN_YPOS_MASK, pos),
> -			      REG_FIELD_GET(PS_WIN_XSIZE_MASK, size),
> -			      REG_FIELD_GET(PS_WIN_YSIZE_MASK, size));
> +		if (!crtc_state->hw.casf_params.casf_enable)
> +			drm_rect_init(&crtc_state->pch_pfit.dst,
> +				      REG_FIELD_GET(PS_WIN_XPOS_MASK, pos),
> +				      REG_FIELD_GET(PS_WIN_YPOS_MASK, pos),
> +				      REG_FIELD_GET(PS_WIN_XSIZE_MASK, size),
> +				      REG_FIELD_GET(PS_WIN_YSIZE_MASK, size));
>   
>   		scaler_state->scalers[i].in_use = true;
>   		break;

  reply	other threads:[~2025-04-07  6:30 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-02 12:56 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-04-02 12:56 ` [PATCH 01/10] drm/i915/display: Introduce sharpness strength property Nemesa Garg
2025-04-02 12:56 ` [PATCH 02/10] drm/i915/display: Introduce HAS_CASF for sharpness support Nemesa Garg
2025-04-02 12:56 ` [PATCH 03/10] drm/i915/display: Add strength and winsize register Nemesa Garg
2025-04-08  9:27   ` Nautiyal, Ankit K
2025-04-02 12:56 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-04-02 12:56 ` [PATCH 05/10] drm/i915/display: Compute the scaler coefficients Nemesa Garg
2025-04-02 12:56 ` [PATCH 06/10] drm/i915/display: Add and compute scaler parameter Nemesa Garg
2025-04-02 12:56 ` [PATCH 07/10] drm/i915/display: Configure the second scaler Nemesa Garg
2025-04-07  6:26   ` Nautiyal, Ankit K
2025-04-02 12:56 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-04-07  6:30   ` Nautiyal, Ankit K [this message]
2025-04-02 12:56 ` [PATCH 09/10] drm/i915/display: Enable/disable casf Nemesa Garg
2025-04-08  9:25   ` Nautiyal, Ankit K
2025-04-02 12:56 ` [PATCH 10/10] drm/i915/display: Expose sharpness strength property Nemesa Garg
2025-04-02 13:32 ` ✗ Fi.CI.CHECKPATCH: warning for Introduce drm sharpness property (rev12) Patchwork
2025-04-02 13:33 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-04-02 13:52 ` ✓ i915.CI.BAT: success " Patchwork
2025-04-02 16:01 ` ✓ i915.CI.Full: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-04-08 10:24 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-04-08 10:25 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-05-19 12:26 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-05-19 12:26 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-07-24 13:45 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-07-24 13:45 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-08-07  9:28 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-08-07  9:28 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-09-26 11:37 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-09-26 11:37 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-10-01  6:34 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-10-01  6:34 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-10-26 17:26 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-10-26 17:26 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg

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=c7bc31f0-f4d0-4ace-aa68-12c2d45cef7c@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --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