public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Sharma, Swati2" <swati2.sharma@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>,
	Nemesa Garg <nemesa.garg@intel.com>, <ankit.k.nautiyal@intel.com>
Subject: Re: [PATCH 0/9] drm/i915/casf: Integrate the sharpness filter properly into the scaler code
Date: Wed, 1 Apr 2026 11:32:30 +0530	[thread overview]
Message-ID: <3af4af49-5575-4109-8a5a-58c8de5e2c99@intel.com> (raw)
In-Reply-To: <acu_T8mBOpfZIJN2@intel.com>

Hi Ville,

On 31-03-2026 06:04 pm, Ville Syrjälä wrote:
> On Tue, Mar 31, 2026 at 05:10:42PM +0530, Sharma, Swati2 wrote:
>> Hi Ville,
>>
>> On 27-03-2026 04:01 am, Ville Syrjala wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> The sharpness filter isn't anything special. It's just another
>>> mode of the pipe scaler, so treat is as such.
>>>
>>> This gets rid of tons of special casing all over the place,
>>> and will allow me to finally land the pending pipe prefill
>>> series: https://patchwork.freedesktop.org/series/156137/
>>>
>>> Note that this will fail some kms_sharpness_filter tests,
>>> because those tests are basically incorrect. But I couldn't
>>> decide yet how much of that entire test should be nuked. It
>>> seems to be doing a *lot* of things, most of which have
>>> nothing to do with the sharpness filter...
>> With your series I could see only 1 negative test failing -
>> invalid-filter-with-scaling-mode-center
>>
>> https://intel-gfx-ci.01.org/tree/intel-xe/xe-pw-163952v1/shards-all.html?testfilter=sharpness
>>
>> Is it sharpness and scaling-mode-center can work together? Since
>> scaler-mode-center doesn't require
>>
>> scaler.
>>
>> You rightly said, all tests are not related to sharpness but covering
>> valid scenarios for scaler + sharpness.
>>
>> Apart from invalid-filter-with-scaling-mode-center, which other tests do
>> you think are incorrect? We tried covering all valid scenarios as per HAS.
> I would probably nuke all these:
>
> Nothing to do with the sharpness filter since
> it's on the pipe scaler, not plane scaler:
> - filter-modifiers
> - filter-rotations
> - filter-formats
Ack.
>
> Doesn't seem to test anything at all:
> - filter-tap

Intention of this test is to validate different taps. As per spec,

different TAPS will be selected based on different resolution selected.


TAP 3: mode->hdisplay <= 1920 && mode->vdisplay <= 1080
TAP 5: (mode->hdisplay > 1920 && mode->hdisplay < 3840) && 
(mode->vdisplay > 1080 && mode->vdisplay < 2160)
TAP 7: mode->hdisplay >= 3840 && mode->vdisplay >= 2160

>
> Maybe a decent idea, but really wasteful to have these kinds
> of things for every little feature, as opposed to just
> some generic "did we restore everything after dpms/suspend
> correctly" test:
> - filter-suspend
> - filter-dpms

True, but we did caught an issue during local testing with this test 
where we were not able

to retain sharpness after S/R.

>
> And I guess we're missing a test for sharpness filter vs.
> scaling filter.
Can you please little bit elaborate more?
>
> And the CRC stuff is really limited, so we have no idea if
> the thing even works from these tests. But I guess we don't
> really know the secret sauce algorithm, so generating a
> reference image is hard :/

Yes, right. For this we created chamelium specific test

tests/chamelium/kms_chamelium_sharpness_filter.c

where we are comparing frame dumps with and w/o sharpness enabled

and you can clearly see difference when sharpness is applied. Though we 
can't check

degree of sharpness but can check if there was some change wrt reference.

Test summary:

     This test validates the content adaptive sharpness filter functionality
     by toggling the sharpness property on the CRTC and capturing frames
     using Chamelium. It ensures that the filter visually alters the 
output as
     expected.

         step 1. Display a test image with no sharpness filter.
         step 2. Capture output (Frame 0).
         step 3. Enable sharpness filter at mid strength.
         step 4. Capture output (Frame 1).
         step 5. Disable the filter again.
         step 6. Capture output (Frame 2).
         step 7. Re-enable filter with same strength.
         step 8. Capture output (Frame 3).
         step 9. Compare frame pairs:
                     - Frame 0 vs Frame 1 → should differ
                     - Frame 1 vs Frame 2 → should differ
                     - Frame 0 vs Frame 2 → should match
                     - Frame 1 vs Frame 3 → should match

> If/when we get writeback we should be able vary the sharpness
> strength and do a diff on the resulting images, and based on
> that confirm that it actually did something that looks
> reasonable.

Sure, we do have plans to verify sharpness and colorops once WB is enabled.

So, for time being we are relying on chamelium with frame dumps.

>
>>> Cc: Nemesa Garg <nemesa.garg@intel.com>
>>>
>>> Ville Syrjälä (9):
>>>     drm/i915/casf: s/casf_enable/enable/
>>>     drm/i915/casf: Make a proper hw state copy of the sharpness_strength
>>>     drm/i915/casf: Move the casf state to better place
>>>     drm/i915/casf: Extract scaler_has_casf()
>>>     drm/i915/casf: Handle CASF in skl_scaler_get_filter_select()
>>>     drm/i915/casf: Constify crtc_state
>>>     drn/i915/casf: Remove redundant argument from
>>>       intel_casf_filter_lut_load()
>>>     drm/i915/pfit: Call intel_pfit_compute_config() unconditionally on
>>>       (e)DP/HDMI
>>>     drm/i915/casf: Integrate the sharpness filter properly into the scaler
>>>       code
>>>
>>>    drivers/gpu/drm/i915/display/intel_casf.c     | 102 +++++-----------
>>>    drivers/gpu/drm/i915/display/intel_casf.h     |   6 +-
>>>    .../drm/i915/display/intel_crtc_state_dump.c  |  11 +-
>>>    drivers/gpu/drm/i915/display/intel_display.c  |  46 ++------
>>>    .../drm/i915/display/intel_display_debugfs.c  |   5 +-
>>>    .../drm/i915/display/intel_display_types.h    |   5 +-
>>>    drivers/gpu/drm/i915/display/intel_dp.c       |   9 +-
>>>    drivers/gpu/drm/i915/display/intel_hdmi.c     |   8 +-
>>>    .../drm/i915/display/intel_modeset_setup.c    |   1 +
>>>    drivers/gpu/drm/i915/display/intel_pfit.c     |  13 ++-
>>>    drivers/gpu/drm/i915/display/skl_scaler.c     | 110 +++++++-----------
>>>    drivers/gpu/drm/i915/display/skl_scaler.h     |   2 -
>>>    12 files changed, 112 insertions(+), 206 deletions(-)
>>>

  reply	other threads:[~2026-04-01  6:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 22:31 [PATCH 0/9] drm/i915/casf: Integrate the sharpness filter properly into the scaler code Ville Syrjala
2026-03-26 22:31 ` [PATCH 1/9] drm/i915/casf: s/casf_enable/enable/ Ville Syrjala
2026-03-27  8:41   ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 2/9] drm/i915/casf: Make a proper hw state copy of the sharpness_strength Ville Syrjala
2026-03-27  8:46   ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 3/9] drm/i915/casf: Move the casf state to better place Ville Syrjala
2026-03-27  9:10   ` Michał Grzelak
2026-03-27 10:30     ` Ville Syrjälä
2026-03-28 15:34       ` Michał Grzelak
2026-04-01 10:02         ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 4/9] drm/i915/casf: Extract scaler_has_casf() Ville Syrjala
2026-03-27  9:33   ` Michał Grzelak
2026-03-27 10:06     ` Michał Grzelak
2026-03-27 10:41       ` Ville Syrjälä
2026-03-28 14:52         ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 5/9] drm/i915/casf: Handle CASF in skl_scaler_get_filter_select() Ville Syrjala
2026-03-27  9:35   ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 6/9] drm/i915/casf: Constify crtc_state Ville Syrjala
2026-03-27  9:44   ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 7/9] drn/i915/casf: Remove redundant argument from intel_casf_filter_lut_load() Ville Syrjala
2026-03-27  9:46   ` Michał Grzelak
2026-03-28 16:04     ` Michał Grzelak
2026-03-26 22:31 ` [PATCH 8/9] drm/i915/pfit: Call intel_pfit_compute_config() unconditionally on (e)DP/HDMI Ville Syrjala
2026-03-27  9:48   ` Michał Grzelak
2026-03-27 10:31     ` Ville Syrjälä
2026-03-26 22:31 ` [PATCH 9/9] drm/i915/casf: Integrate the sharpness filter properly into the scaler code Ville Syrjala
2026-03-31  8:11   ` Garg, Nemesa
2026-03-31  9:40     ` Ville Syrjälä
2026-03-31  9:48   ` Ville Syrjälä
2026-03-31 13:33     ` Garg, Nemesa
2026-03-26 23:27 ` ✓ CI.KUnit: success for " Patchwork
2026-03-27  0:02 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-27 18:27 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-31 11:40 ` [PATCH 0/9] " Sharma, Swati2
2026-03-31 12:34   ` Ville Syrjälä
2026-04-01  6:02     ` Sharma, Swati2 [this message]
2026-04-01 11:54       ` Ville Syrjälä
2026-04-02  6:04         ` Sharma, Swati2
2026-03-31 16:44 ` Garg, Nemesa

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=3af4af49-5575-4109-8a5a-58c8de5e2c99@intel.com \
    --to=swati2.sharma@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=nemesa.garg@intel.com \
    --cc=ville.syrjala@linux.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