Skip to content

Commit 5d81c29

Browse files
committed
drm/i915/alpm: Make crtc_state as const in intel_alpm_compute_params
Intel_alpm_compute_params doesn't change crtc_state. Let's convert it as const. Signed-off-by: Jouni Högander <[email protected]> Reviewed-by: Animesh Manna <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0bc96a4 commit 5d81c29

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,9 @@ static int _lnl_compute_aux_less_wake_time(int port_clock)
135135
t1 + tcds, 1000);
136136
}
137137

138-
static int _lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp,
139-
struct intel_crtc_state *crtc_state)
138+
static int
139+
_lnl_compute_aux_less_alpm_params(struct intel_dp *intel_dp,
140+
const struct intel_crtc_state *crtc_state)
140141
{
141142
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
142143
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,
168169
}
169170

170171
static bool _lnl_compute_alpm_params(struct intel_dp *intel_dp,
171-
struct intel_crtc_state *crtc_state)
172+
const struct intel_crtc_state *crtc_state)
172173
{
173174
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
174175
int check_entry_lines;
@@ -220,7 +221,7 @@ static int io_buffer_wake_time(const struct intel_crtc_state *crtc_state)
220221
}
221222

222223
bool intel_alpm_compute_params(struct intel_dp *intel_dp,
223-
struct intel_crtc_state *crtc_state)
224+
const struct intel_crtc_state *crtc_state)
224225
{
225226
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
226227
int io_wake_lines, io_wake_time, fast_wake_lines, fast_wake_time;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ struct intel_connector;
1515

1616
void intel_alpm_init_dpcd(struct intel_dp *intel_dp);
1717
bool intel_alpm_compute_params(struct intel_dp *intel_dp,
18-
struct intel_crtc_state *crtc_state);
18+
const struct intel_crtc_state *crtc_state);
1919
void intel_alpm_lobf_compute_config(struct intel_dp *intel_dp,
2020
struct intel_crtc_state *crtc_state,
2121
struct drm_connector_state *conn_state);

0 commit comments

Comments
 (0)