Skip to content

Commit c788479

Browse files
committed
drm/i915: Constify the snps/c10x PLL state checkers
State checkers should never modify the crtc states, so make them const. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20231004155607.7719-8-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
1 parent 8f0994d commit c788479

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/gpu/drm/i915/display/intel_cx0_phy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3005,11 +3005,11 @@ intel_mtl_port_pll_type(struct intel_encoder *encoder,
30053005
}
30063006

30073007
void intel_c10pll_state_verify(struct intel_atomic_state *state,
3008-
struct intel_crtc_state *new_crtc_state)
3008+
const struct intel_crtc_state *new_crtc_state)
30093009
{
30103010
struct drm_i915_private *i915 = to_i915(state->base.dev);
30113011
struct intel_c10pll_state mpllb_hw_state = { 0 };
3012-
struct intel_c10pll_state *mpllb_sw_state = &new_crtc_state->cx0pll_state.c10;
3012+
const struct intel_c10pll_state *mpllb_sw_state = &new_crtc_state->cx0pll_state.c10;
30133013
struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
30143014
struct intel_encoder *encoder;
30153015
enum phy phy;

drivers/gpu/drm/i915/display/intel_cx0_phy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void intel_c10pll_dump_hw_state(struct drm_i915_private *dev_priv,
3434
int intel_c10pll_calc_port_clock(struct intel_encoder *encoder,
3535
const struct intel_c10pll_state *pll_state);
3636
void intel_c10pll_state_verify(struct intel_atomic_state *state,
37-
struct intel_crtc_state *new_crtc_state);
37+
const struct intel_crtc_state *new_crtc_state);
3838
void intel_c20pll_readout_hw_state(struct intel_encoder *encoder,
3939
struct intel_c20pll_state *pll_state);
4040
void intel_c20pll_dump_hw_state(struct drm_i915_private *i915,

drivers/gpu/drm/i915/display/intel_snps_phy.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,11 +1993,11 @@ int intel_snps_phy_check_hdmi_link_rate(int clock)
19931993
}
19941994

19951995
void intel_mpllb_state_verify(struct intel_atomic_state *state,
1996-
struct intel_crtc_state *new_crtc_state)
1996+
const struct intel_crtc_state *new_crtc_state)
19971997
{
19981998
struct drm_i915_private *i915 = to_i915(state->base.dev);
19991999
struct intel_mpllb_state mpllb_hw_state = { 0 };
2000-
struct intel_mpllb_state *mpllb_sw_state = &new_crtc_state->mpllb_state;
2000+
const struct intel_mpllb_state *mpllb_sw_state = &new_crtc_state->mpllb_state;
20012001
struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->uapi.crtc);
20022002
struct intel_encoder *encoder;
20032003

drivers/gpu/drm/i915/display/intel_snps_phy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ int intel_snps_phy_check_hdmi_link_rate(int clock);
3333
void intel_snps_phy_set_signal_levels(struct intel_encoder *encoder,
3434
const struct intel_crtc_state *crtc_state);
3535
void intel_mpllb_state_verify(struct intel_atomic_state *state,
36-
struct intel_crtc_state *new_crtc_state);
36+
const struct intel_crtc_state *new_crtc_state);
3737

3838
#endif /* __INTEL_SNPS_PHY_H__ */

0 commit comments

Comments
 (0)