drm/i915: Nuke intel_dp->channel_eq_status

intel_dp->channel_eq_status is used in exactly one function, and we
don't need it to persist between calls. So just go back to using a
local variable instead.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180117192149.17760-4-ville.syrjala@linux.intel.com
This commit is contained in:
Ville Syrjälä 2018-01-17 21:21:48 +02:00 committed by Lyude Paul
parent c85d200e83
commit 2fed7955bf
2 changed files with 3 additions and 4 deletions

View file

@ -248,6 +248,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
int tries; int tries;
u32 training_pattern; u32 training_pattern;
uint8_t link_status[DP_LINK_STATUS_SIZE]; uint8_t link_status[DP_LINK_STATUS_SIZE];
bool channel_eq = false;
training_pattern = intel_dp_training_pattern(intel_dp); training_pattern = intel_dp_training_pattern(intel_dp);
@ -259,7 +260,6 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
return false; return false;
} }
intel_dp->channel_eq_status = false;
for (tries = 0; tries < 5; tries++) { for (tries = 0; tries < 5; tries++) {
drm_dp_link_train_channel_eq_delay(intel_dp->dpcd); drm_dp_link_train_channel_eq_delay(intel_dp->dpcd);
@ -279,7 +279,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
if (drm_dp_channel_eq_ok(link_status, if (drm_dp_channel_eq_ok(link_status,
intel_dp->lane_count)) { intel_dp->lane_count)) {
intel_dp->channel_eq_status = true; channel_eq = true;
DRM_DEBUG_KMS("Channel EQ done. DP Training " DRM_DEBUG_KMS("Channel EQ done. DP Training "
"successful\n"); "successful\n");
break; break;
@ -301,7 +301,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
intel_dp_set_idle_link_train(intel_dp); intel_dp_set_idle_link_train(intel_dp);
return intel_dp->channel_eq_status; return channel_eq;
} }

View file

@ -1050,7 +1050,6 @@ struct intel_dp {
bool link_mst; bool link_mst;
bool has_audio; bool has_audio;
bool detect_done; bool detect_done;
bool channel_eq_status;
bool reset_link_params; bool reset_link_params;
enum aux_ch aux_ch; enum aux_ch aux_ch;
uint8_t dpcd[DP_RECEIVER_CAP_SIZE]; uint8_t dpcd[DP_RECEIVER_CAP_SIZE];