All of 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>,
	<intel-xe@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 3/6] drm/i915/display: Enable the second scaler
Date: Tue, 25 Feb 2025 14:09:12 +0530	[thread overview]
Message-ID: <cbdecafc-ee72-4fd9-bcc6-d57209def008@intel.com> (raw)
In-Reply-To: <20250219115359.2320992-4-nemesa.garg@intel.com>


On 2/19/2025 5:23 PM, Nemesa Garg wrote:
> Write the scaler registers for sharpness.
>
> v1: Rename the title of patch [Ankit]
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_casf.c |  2 +
>   drivers/gpu/drm/i915/display/skl_scaler.c | 45 +++++++++++++++++++++++
>   drivers/gpu/drm/i915/display/skl_scaler.h |  1 +
>   3 files changed, 48 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_casf.c b/drivers/gpu/drm/i915/display/intel_casf.c
> index 1526bebae1b6..989219e698c6 100644
> --- a/drivers/gpu/drm/i915/display/intel_casf.c
> +++ b/drivers/gpu/drm/i915/display/intel_casf.c
> @@ -109,6 +109,8 @@ static void intel_casf_write_coeff(struct intel_crtc_state *crtc_state)
>   void intel_casf_enable(struct intel_crtc_state *crtc_state)
>   {
>   	intel_casf_write_coeff(crtc_state);
> +
> +	skl_scaler_setup_casf(crtc_state);
>   }
>   
>   static void convert_sharpness_coef_binary(struct scaler_filter_coeff *coeff,
> diff --git a/drivers/gpu/drm/i915/display/skl_scaler.c b/drivers/gpu/drm/i915/display/skl_scaler.c
> index 3d24fa773094..9c6259ed971c 100644
> --- a/drivers/gpu/drm/i915/display/skl_scaler.c
> +++ b/drivers/gpu/drm/i915/display/skl_scaler.c
> @@ -132,6 +132,13 @@ static void skl_scaler_max_dst_size(struct intel_crtc *crtc,
>   	}
>   }
>   
> +#define SCALER_FILTER_SELECT \
> +	(PS_FILTER_PROGRAMMED | \
> +	PS_Y_VERT_FILTER_SELECT(1) | \
> +	PS_Y_HORZ_FILTER_SELECT(0) | \
> +	PS_UV_VERT_FILTER_SELECT(1) | \
> +	PS_UV_HORZ_FILTER_SELECT(0))
> +

Perhaps CASF_SCALER_FILTER_SELECT?


>   static int
>   skl_update_scaler(struct intel_crtc_state *crtc_state, bool force_detach,
>   		  unsigned int scaler_user, int *scaler_id,
> @@ -717,6 +724,44 @@ static void skl_scaler_setup_filter(struct intel_display *display, enum pipe pip
>   	}
>   }
>   
> +void skl_scaler_setup_casf(struct intel_crtc_state *crtc_state)
> +{
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +	struct intel_display *display = to_intel_display(crtc);
> +	struct drm_display_mode *adjusted_mode =
> +	&crtc_state->hw.adjusted_mode;
> +	struct intel_crtc_scaler_state *scaler_state =
> +		&crtc_state->scaler_state;
> +	struct drm_rect src, dest;
> +	int id, width, height;
> +	int x, y;
Can be initialized here to 0.
> +	enum pipe pipe = crtc->pipe;
> +	u32 ps_ctrl;
> +
> +	width = adjusted_mode->crtc_hdisplay;
> +	height = adjusted_mode->crtc_vdisplay;
> +
> +	x = y = 0;
> +	drm_rect_init(&dest, x, y, width, height);
> +
> +	width = drm_rect_width(&dest);
> +	height = drm_rect_height(&dest);
> +	id = scaler_state->scaler_id;
> +
> +	drm_rect_init(&src, 0, 0,
> +		      drm_rect_width(&crtc_state->pipe_src) << 16,
> +		      drm_rect_height(&crtc_state->pipe_src) << 16);
> +
> +	ps_ctrl = PS_SCALER_EN | PS_BINDING_PIPE | scaler_state->scalers[id].mode |
> +		  SCALER_FILTER_SELECT;
> +
> +	intel_de_write_fw(display, SKL_PS_CTRL(pipe, id), ps_ctrl);
> +	intel_de_write_fw(display, SKL_PS_WIN_POS(pipe, id),
> +			  PS_WIN_XPOS(x) | PS_WIN_YPOS(y));
> +	intel_de_write_fw(display, SKL_PS_WIN_SZ(pipe, id),
> +			  PS_WIN_XSIZE(width) | PS_WIN_YSIZE(height));

I think we need to add  trace_intel_pipe_scaler_update_arm(crtc, id, x, 
y, width, height);


Regards,

Ankit


> +}
> +
>   void skl_pfit_enable(const struct intel_crtc_state *crtc_state)
>   {
>   	struct intel_display *display = to_intel_display(crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/skl_scaler.h b/drivers/gpu/drm/i915/display/skl_scaler.h
> index 4d2e2dbb1666..e1fe6a2d6c32 100644
> --- a/drivers/gpu/drm/i915/display/skl_scaler.h
> +++ b/drivers/gpu/drm/i915/display/skl_scaler.h
> @@ -28,5 +28,6 @@ void skl_detach_scalers(const struct intel_crtc_state *crtc_state);
>   void skl_scaler_disable(const struct intel_crtc_state *old_crtc_state);
>   
>   void skl_scaler_get_config(struct intel_crtc_state *crtc_state);
> +void skl_scaler_setup_casf(struct intel_crtc_state *crtc_state);
>   
>   #endif

  reply	other threads:[~2025-02-25  8:39 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 11:53 [PATCH 0/6] Introduce drm sharpness property Nemesa Garg
2025-02-19 11:53 ` [PATCH 1/6] drm: Introduce sharpness strength property Nemesa Garg
2025-02-20  8:20   ` kernel test robot
2025-02-19 11:53 ` [PATCH v7 2/6] drm/i915/display: Compute the scaler filter coefficients Nemesa Garg
2025-02-24  6:06   ` Nautiyal, Ankit K
2025-02-19 11:53 ` [PATCH 3/6] drm/i915/display: Enable the second scaler Nemesa Garg
2025-02-25  8:39   ` Nautiyal, Ankit K [this message]
2025-02-19 11:53 ` [PATCH 4/6] drm/i915/display: Configure the second scaler for sharpness Nemesa Garg
2025-02-25  8:56   ` Nautiyal, Ankit K
2025-02-19 11:53 ` [PATCH v8 5/6] drm/i915/display: Add registers and compute the strength Nemesa Garg
2025-02-20  0:43   ` kernel test robot
2025-02-25  9:10   ` Nautiyal, Ankit K
2025-02-19 11:53 ` [PATCH v6 6/6] drm/i915/display: Load the lut values and enable sharpness Nemesa Garg
2025-02-25 10:03   ` Nautiyal, Ankit K
2025-02-19 12:09 ` ✓ CI.Patch_applied: success for Introduce drm sharpness property (rev8) Patchwork
2025-02-19 12:10 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-19 12:11 ` ✓ CI.KUnit: success " Patchwork
2025-02-19 12:28 ` ✓ CI.Build: " Patchwork
2025-02-19 12:30 ` ✓ CI.Hooks: " Patchwork
2025-02-19 12:32 ` ✗ CI.checksparse: warning " Patchwork
2025-02-19 15:29 ` ✗ Fi.CI.CHECKPATCH: warning for Introduce drm sharpness property (rev9) Patchwork
2025-02-19 15:29 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-19 15:39 ` ✗ i915.CI.BAT: failure " Patchwork
2025-02-20  7:26 ` ✓ CI.Patch_applied: success " Patchwork
2025-02-20  7:27 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-20  7:28 ` ✓ CI.KUnit: success " Patchwork
2025-02-20  7:44 ` ✓ CI.Build: " Patchwork
2025-02-20  7:47 ` ✓ CI.Hooks: " Patchwork
2025-02-20  7:48 ` ✗ CI.checksparse: warning " Patchwork
2025-02-20  8:09 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-02-20 11:12 ` ✗ Xe.CI.Full: failure for Introduce drm sharpness property (rev8) Patchwork
2025-02-21  2:09 ` ✗ Xe.CI.Full: failure for Introduce drm sharpness property (rev9) Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-02-14 15:11 [PATCH 0/6] Introduce drm sharpness property Nemesa Garg
2025-02-14 15:11 ` [PATCH 3/6] drm/i915/display: Enable the second scaler Nemesa Garg
2025-02-14 15:09 [PATCH 0/6] Introduce drm sharpness property Nemesa Garg
2025-02-14 15:09 ` [PATCH 3/6] drm/i915/display: Enable the second scaler 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=cbdecafc-ee72-4fd9-bcc6-d57209def008@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 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.