mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
drm/i915/casf: Constify crtc_state
Make the crtc_state const everywhere in the sharpness filter code where it doesn't need to be mutated. Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Reviewed-by: Nemesa Garg <nemesa.garg@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/20260407175244.19654-7-ville.syrjala@linux.intel.com
This commit is contained in:
parent
7583232af1
commit
114a836384
|
|
@ -75,7 +75,7 @@ static void intel_casf_filter_lut_load(struct intel_crtc *crtc,
|
|||
sharpness_lut[i]);
|
||||
}
|
||||
|
||||
void intel_casf_update_strength(struct intel_crtc_state *crtc_state)
|
||||
void intel_casf_update_strength(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
|
|
@ -174,7 +174,7 @@ static int casf_coeff_tap(int i)
|
|||
return i % SCALER_FILTER_NUM_TAPS;
|
||||
}
|
||||
|
||||
static u32 casf_coeff(struct intel_crtc_state *crtc_state, int t)
|
||||
static u32 casf_coeff(const struct intel_crtc_state *crtc_state, int t)
|
||||
{
|
||||
struct scaler_filter_coeff value;
|
||||
u32 coeff;
|
||||
|
|
@ -192,7 +192,7 @@ static u32 casf_coeff(struct intel_crtc_state *crtc_state, int t)
|
|||
* that are calculated and stored in pch_pfit.casf.coeff as per
|
||||
* SCALER_COEFFICIENT_FORMAT
|
||||
*/
|
||||
static void intel_casf_write_coeff(struct intel_crtc_state *crtc_state)
|
||||
static void intel_casf_write_coeff(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
|
|
@ -264,7 +264,7 @@ void intel_casf_scaler_compute_config(struct intel_crtc_state *crtc_state)
|
|||
}
|
||||
}
|
||||
|
||||
void intel_casf_enable(struct intel_crtc_state *crtc_state)
|
||||
void intel_casf_enable(const struct intel_crtc_state *crtc_state)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc_state);
|
||||
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@
|
|||
struct intel_crtc_state;
|
||||
|
||||
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_update_strength(const struct intel_crtc_state *new_crtc_state);
|
||||
void intel_casf_sharpness_get_config(struct intel_crtc_state *crtc_state);
|
||||
void intel_casf_enable(struct intel_crtc_state *crtc_state);
|
||||
void intel_casf_enable(const struct intel_crtc_state *crtc_state);
|
||||
void intel_casf_disable(const struct intel_crtc_state *crtc_state);
|
||||
void intel_casf_scaler_compute_config(struct intel_crtc_state *crtc_state);
|
||||
bool intel_casf_needs_scaler(const struct intel_crtc_state *crtc_state);
|
||||
|
|
|
|||
|
|
@ -757,13 +757,13 @@ static void skl_scaler_setup_filter(struct intel_display *display,
|
|||
}
|
||||
}
|
||||
|
||||
void skl_scaler_setup_casf(struct intel_crtc_state *crtc_state)
|
||||
void skl_scaler_setup_casf(const 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 =
|
||||
const struct drm_display_mode *adjusted_mode =
|
||||
&crtc_state->hw.adjusted_mode;
|
||||
const struct intel_crtc_scaler_state *scaler_state =
|
||||
&crtc_state->scaler_state;
|
||||
struct drm_rect src, dest;
|
||||
int id, width, height;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ 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);
|
||||
void skl_scaler_setup_casf(const struct intel_crtc_state *crtc_state);
|
||||
|
||||
enum drm_mode_status
|
||||
skl_scaler_mode_valid(struct intel_display *display,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user