From: Jani Nikula <jani.nikula@linux.intel.com>
To: Nemesa Garg <nemesa.garg@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Cc: Nemesa Garg <nemesa.garg@intel.com>,
Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Subject: Re: [PATCH 04/10] drm/i915/display: Add filter lut values
Date: Mon, 19 May 2025 15:45:11 +0300 [thread overview]
Message-ID: <87ecwkvkfc.fsf@intel.com> (raw)
In-Reply-To: <20250519122644.3685679-5-nemesa.garg@intel.com>
On Mon, 19 May 2025, Nemesa Garg <nemesa.garg@intel.com> wrote:
> Add the register bits related to filter lut values.
> These values are golden values and these value has
> to be loaded one time while enabling the casf.
>
> v2: update commit message[Ankit]
>
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_casf.c | 22 +++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_casf.h | 3 +++
> .../gpu/drm/i915/display/intel_casf_regs.h | 11 ++++++++++
> 3 files changed, 36 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_casf.c b/drivers/gpu/drm/i915/display/intel_casf.c
> index 314d3fe19884..6dab67eb77ab 100644
> --- a/drivers/gpu/drm/i915/display/intel_casf.c
> +++ b/drivers/gpu/drm/i915/display/intel_casf.c
> @@ -30,6 +30,28 @@
> * original image.
> */
>
> +/* Default LUT values to be loaded one time. */
> +static const u16 sharpness_lut[] = {
> + 4095, 2047, 1364, 1022, 816, 678, 579,
> + 504, 444, 397, 357, 323, 293, 268, 244, 224,
> + 204, 187, 170, 154, 139, 125, 111, 98, 85,
> + 73, 60, 48, 36, 24, 12, 0
> +};
> +
> +void intel_filter_lut_load(struct intel_crtc *crtc,
> + const struct intel_crtc_state *crtc_state)
Everything else in the file is prefixed intel_casf_, why is this called
intel_filter_lut_load()?
> +{
> + struct intel_display *display = to_intel_display(crtc_state);
> + int i;
> +
> + intel_de_write(display, SHRPLUT_INDEX(crtc->pipe),
> + INDEX_AUTO_INCR | INDEX_VALUE(0));
> +
> + for (i = 0; i < ARRAY_SIZE(sharpness_lut); i++)
> + intel_de_write(display, SHRPLUT_DATA(crtc->pipe),
> + sharpness_lut[i]);
> +}
> +
> void intel_casf_update_strength(struct intel_crtc_state *crtc_state)
> {
> struct intel_display *display = to_intel_display(crtc_state);
> diff --git a/drivers/gpu/drm/i915/display/intel_casf.h b/drivers/gpu/drm/i915/display/intel_casf.h
> index 83523fe66c48..80642809c08b 100644
> --- a/drivers/gpu/drm/i915/display/intel_casf.h
> +++ b/drivers/gpu/drm/i915/display/intel_casf.h
> @@ -9,9 +9,12 @@
> #include <linux/types.h>
>
> struct intel_crtc_state;
> +struct intel_crtc;
>
> int intel_casf_compute_config(struct intel_crtc_state *crtc_state);
> void intel_casf_update_strength(struct intel_crtc_state *new_crtc_state);
> void intel_casf_sharpness_get_config(struct intel_crtc_state *crtc_state);
> +void intel_filter_lut_load(struct intel_crtc *crtc,
> + const struct intel_crtc_state *crtc_state);
>
> #endif /* __INTEL_CASF_H__ */
> diff --git a/drivers/gpu/drm/i915/display/intel_casf_regs.h b/drivers/gpu/drm/i915/display/intel_casf_regs.h
> index c24ba281ae37..b96950a48335 100644
> --- a/drivers/gpu/drm/i915/display/intel_casf_regs.h
> +++ b/drivers/gpu/drm/i915/display/intel_casf_regs.h
> @@ -19,4 +19,15 @@
> #define SHARPNESS_FILTER_SIZE_5X5 REG_FIELD_PREP(FILTER_SIZE_MASK, 1)
> #define SHARPNESS_FILTER_SIZE_7X7 REG_FIELD_PREP(FILTER_SIZE_MASK, 2)
>
> +#define _SHRPLUT_DATA_A 0x682B8
> +#define _SHRPLUT_DATA_B 0x68AB8
> +#define SHRPLUT_DATA(pipe) _MMIO_PIPE(pipe, _SHRPLUT_DATA_A, _SHRPLUT_DATA_B)
> +
> +#define _SHRPLUT_INDEX_A 0x682B4
> +#define _SHRPLUT_INDEX_B 0x68AB4
> +#define SHRPLUT_INDEX(pipe) _MMIO_PIPE(pipe, _SHRPLUT_INDEX_A, _SHRPLUT_INDEX_B)
> +#define INDEX_AUTO_INCR REG_BIT(10)
> +#define INDEX_VALUE_MASK REG_GENMASK(4, 0)
> +#define INDEX_VALUE(x) REG_FIELD_PREP(INDEX_VALUE_MASK, (x))
> +
> #endif /* __INTEL_CASF_REGS__ */
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-05-19 12:45 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-19 12:26 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-05-19 12:26 ` [PATCH 01/10] drm/i915/display: Introduce sharpness strength property Nemesa Garg
2025-05-19 12:26 ` [PATCH 02/10] drm/i915/display: Introduce HAS_CASF for sharpness support Nemesa Garg
2025-05-19 12:26 ` [PATCH 03/10] drm/i915/display: Add strength and winsize register Nemesa Garg
2025-05-20 10:23 ` kernel test robot
2025-05-22 18:22 ` kernel test robot
2025-05-19 12:26 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-05-19 12:45 ` Jani Nikula [this message]
2025-05-27 3:26 ` Garg, Nemesa
2025-05-19 12:26 ` [PATCH 05/10] drm/i915/display: Compute the scaler coefficients Nemesa Garg
2025-05-19 12:52 ` Jani Nikula
2025-05-27 4:56 ` Garg, Nemesa
2025-05-19 12:26 ` [PATCH 06/10] drm/i915/display: Add and compute scaler parameter Nemesa Garg
2025-05-19 12:26 ` [PATCH 07/10] drm/i915/display: Configure the second scaler Nemesa Garg
2025-05-19 12:26 ` [PATCH 08/10] drm/i915/display: Set and get the casf config Nemesa Garg
2025-05-19 12:26 ` [PATCH 09/10] drm/i915/display: Enable/disable casf Nemesa Garg
2025-05-19 12:26 ` [PATCH 10/10] drm/i915/display: Expose sharpness strength property Nemesa Garg
2025-05-19 13:40 ` ✗ Fi.CI.CHECKPATCH: warning for Introduce drm sharpness property (rev14) Patchwork
2025-05-19 13:40 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-05-19 14:02 ` ✓ i915.CI.BAT: success " Patchwork
2025-05-19 17:34 ` ✓ i915.CI.Full: " Patchwork
2025-07-23 15:25 ` [PATCH 00/10] Introduce drm sharpness property Xaver Hugl
2025-07-24 13:59 ` Garg, Nemesa
2025-08-11 10:23 ` Shankar, Uma
-- strict thread matches above, loose matches on Subject: below --
2025-10-26 17:26 Nemesa Garg
2025-10-26 17:26 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-10-01 6:34 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-10-01 6:34 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-10-09 10:51 ` Nautiyal, Ankit K
2025-09-26 11:37 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-09-26 11:37 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-10-01 5:31 ` Nautiyal, Ankit K
2025-08-07 9:28 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-08-07 9:28 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-07-24 13:45 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-07-24 13:45 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-04-08 10:24 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-04-08 10:25 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-04-02 12:56 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-04-02 12:56 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-03-04 10:28 [PATCH 00/10] Introduce drm sharpness property Nemesa Garg
2025-03-04 10:28 ` [PATCH 04/10] drm/i915/display: Add filter lut values Nemesa Garg
2025-03-11 12:00 ` Nautiyal, Ankit K
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=87ecwkvkfc.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=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