drm/i915/alpm: Make crtc_state as const in intel_alpm_compute_params
authorJouni Högander <jouni.hogander@intel.com>
Wed, 19 Jun 2024 06:21:27 +0000 (09:21 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Tue, 25 Jun 2024 05:28:43 +0000 (08:28 +0300)
Intel_alpm_compute_params doesn't change crtc_state. Let's convert it as
const.

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Animesh Manna <animesh.manna@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240619062131.4021196-8-jouni.hogander@intel.com
drivers/gpu/drm/i915/display/intel_alpm.c
drivers/gpu/drm/i915/display/intel_alpm.h

index c7092af7da3398181ea9f4fd049f416f2d0b9b7e..866b3b409c4d540f5c44c4c8caa77e32c9c40634 100644 (file)
@@ -135,8 +135,9 @@ static int _lnl_compute_aux_less_wake_time(int port_clock)
                            t1 + tcds, 1000);
 }
 
-static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp,
-                                            struct intel_crtc_state *crtc_state)
+static int
+_lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp,
+                                 const struct intel_crtc_state *crtc_state)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
        int aux_less_wake_time, aux_less_wake_lines, silence_period,
@@ -168,7 +169,7 @@ static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp,
 }
 
 static bool _lnl_compute_alpm_params(struct intel_dp *intel_dp,
-                                    struct intel_crtc_state *crtc_state)
+                                    const struct intel_crtc_state *crtc_state)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
        int check_entry_lines;
@@ -220,7 +221,7 @@ static int io_buffer_wake_time(const struct intel_crtc_state *crtc_state)
 }
 
 bool intel_alpm_compute_params(struct intel_dp *intel_dp,
-                                     struct intel_crtc_state *crtc_state)
+                              const struct intel_crtc_state *crtc_state)
 {
        struct drm_i915_private *i915 = dp_to_i915(intel_dp);
        int io_wake_lines, io_wake_time, fast_wake_lines, fast_wake_time;
index d4fb60393c91be7d014984bfca290040d06f2ab4..8c409b10dce6cba1a1530533615aa9a0740e029c 100644 (file)
@@ -15,7 +15,7 @@ struct intel_connector;
 
 void intel_alpm_init_dpcd(struct intel_dp *intel_dp);
 bool intel_alpm_compute_params(struct intel_dp *intel_dp,
-                              struct intel_crtc_state *crtc_state);
+                              const struct intel_crtc_state *crtc_state);
 void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp,
                                    struct intel_crtc_state *crtc_state,
                                    struct drm_connector_state *conn_state);