Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915/dp: Rename intel_dp::link_trained to link.active

The intel_dp::link_trained flag indicates whether the link is active,
regardless of whether the link training passed or failed. For clarity
rename the flag to 'active'. While at it move the flag under
intel_dp::link.

Suggested-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Link: https://lore.kernel.org/r/20250404150310.1156696-2-imre.deak@intel.com

+12 -12
+1 -1
drivers/gpu/drm/i915/display/g4x_dp.c
··· 519 519 { 520 520 struct intel_dp *intel_dp = enc_to_intel_dp(encoder); 521 521 522 - intel_dp->link_trained = false; 522 + intel_dp->link.active = false; 523 523 524 524 /* 525 525 * Make sure the panel is off before trying to change the mode.
+1 -1
drivers/gpu/drm/i915/display/intel_ddi.c
··· 3550 3550 struct intel_connector *connector = 3551 3551 to_intel_connector(old_conn_state->connector); 3552 3552 3553 - intel_dp->link_trained = false; 3553 + intel_dp->link.active = false; 3554 3554 3555 3555 intel_psr_disable(intel_dp, old_crtc_state); 3556 3556 intel_edp_backlight_off(old_conn_state);
+1 -1
drivers/gpu/drm/i915/display/intel_display_types.h
··· 1658 1658 int link_rate; 1659 1659 u8 lane_count; 1660 1660 u8 sink_count; 1661 - bool link_trained; 1662 1661 bool needs_modeset_retry; 1663 1662 bool use_max_params; 1664 1663 u8 dpcd[DP_RECEIVER_CAP_SIZE]; ··· 1682 1683 int common_rates[DP_MAX_SUPPORTED_RATES]; 1683 1684 struct { 1684 1685 /* TODO: move the rest of link specific fields to here */ 1686 + bool active; 1685 1687 /* common rate,lane_count configs in bw order */ 1686 1688 int num_configs; 1687 1689 #define INTEL_DP_MAX_LANE_COUNT 4
+3 -3
drivers/gpu/drm/i915/display/intel_dp.c
··· 3222 3222 int link_rate, int lane_count) 3223 3223 { 3224 3224 memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set)); 3225 - intel_dp->link_trained = false; 3225 + intel_dp->link.active = false; 3226 3226 intel_dp->needs_modeset_retry = false; 3227 3227 intel_dp->link_rate = link_rate; 3228 3228 intel_dp->lane_count = lane_count; ··· 3586 3586 if (crtc_state) { 3587 3587 intel_dp_reset_link_params(intel_dp); 3588 3588 intel_dp_set_link_params(intel_dp, crtc_state->port_clock, crtc_state->lane_count); 3589 - intel_dp->link_trained = true; 3589 + intel_dp->link.active = true; 3590 3590 } 3591 3591 } 3592 3592 ··· 5081 5081 { 5082 5082 u8 link_status[DP_LINK_STATUS_SIZE]; 5083 5083 5084 - if (!intel_dp->link_trained) 5084 + if (!intel_dp->link.active) 5085 5085 return false; 5086 5086 5087 5087 /*
+2 -2
drivers/gpu/drm/i915/display/intel_dp_mst.c
··· 1004 1004 intel_dp->mst.active_links); 1005 1005 1006 1006 if (intel_dp->mst.active_links == 1) 1007 - intel_dp->link_trained = false; 1007 + intel_dp->link.active = false; 1008 1008 1009 1009 intel_hdcp_disable(intel_mst->connector); 1010 1010 ··· 2108 2108 u8 rate_select; 2109 2109 u8 link_bw; 2110 2110 2111 - if (intel_dp->link_trained) 2111 + if (intel_dp->link.active) 2112 2112 return; 2113 2113 2114 2114 if (intel_mst_probed_link_params_valid(intel_dp, link_rate, lane_count))