]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/display: Compute the scaler coefficients
authorNemesa Garg <nemesa.garg@intel.com>
Tue, 28 Oct 2025 12:07:41 +0000 (17:37 +0530)
committerJani Nikula <jani.nikula@intel.com>
Thu, 30 Oct 2025 13:42:59 +0000 (15:42 +0200)
commit76f51cdc5d45a5497f7f2578ff81fd3efcabb3bd
tree7aedce7be12b28faa59d9015aff0c4e80650905c
parent515d1c895ffcd168b7b8b7bec1d6a2ec6edfe915
drm/i915/display: Compute the scaler coefficients

The sharpness property requires the use of one of the scaler
so need to set the sharpness scaler coefficient values.
These values are based on experiments and vary for different
tap value/win size. These values are normalized by taking the
sum of all values and then dividing each value with a sum.

Add helper to compute and set the scaler coefficients.

v2: Fix ifndef header naming issue reported by kernel test robot
v3: Rename file name[Arun]
    Replace array size number with macro[Arun]
v4: Correct the register format[Jani]
    Add brief comment and expalin about file[Jani]
    Remove coefficient value from crtc_state[Jani]
v5: Fix build issue
v6: Add new function for writing coefficients[Ankit]
v7: Add cooments and add a scaler id check [Ankit]
v8: Remove casf_enable from here[Ankit]
v9: Removed REG and use shift operator[Jani]
v10: Remove filter macros
v11: Add casf_write_coeff function to casf_enable

Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Link: https://patch.msgid.link/20251028120747.3027332-6-ankit.k.nautiyal@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_casf.c
drivers/gpu/drm/i915/display/intel_casf.h
drivers/gpu/drm/i915/display/intel_display_types.h