On Mon, Jun 22, 2026 at 11:53:04PM +0200, Michał Grzelak wrote: > On Tue, 16 Jun 2026, Imre Deak wrote: > > Rename intel_dp_link_config to intel_dp_link_config_entry to prepare > > for tracking a link configuration in both an internal packed and a > > public unpacked format. A follow-up change will add > > struct intel_dp_link_config representing the public unpacked format. > > > > Signed-off-by: Imre Deak <[email protected]> > > --- > > .../gpu/drm/i915/display/intel_display_types.h | 2 +- > > drivers/gpu/drm/i915/display/intel_dp.c | 16 ++++++++-------- > > 2 files changed, 9 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h > > b/drivers/gpu/drm/i915/display/intel_display_types.h > > index 6cd102a3b610c..c71edea145878 100644 > > --- a/drivers/gpu/drm/i915/display/intel_display_types.h > > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h > > @@ -1840,7 +1840,7 @@ struct intel_dp { > > #define INTEL_DP_LINK_RATE_IDX_BITS (BITS_PER_TYPE(u8) - > > INTEL_DP_LANE_COUNT_EXP_BITS) > > #define INTEL_DP_MAX_LINK_CONFIGS (DP_MAX_SUPPORTED_RATES * \ > > > > INTEL_DP_MAX_SUPPORTED_LANE_CONFIGS) > > - struct intel_dp_link_config { > > + struct intel_dp_link_config_entry { > > u8 link_rate_idx:INTEL_DP_LINK_RATE_IDX_BITS; > > u8 lane_count_exp:INTEL_DP_LANE_COUNT_EXP_BITS; > > } configs[INTEL_DP_MAX_LINK_CONFIGS]; > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c > > b/drivers/gpu/drm/i915/display/intel_dp.c > > index 3569e61e7feea..00eb3f5103383 100644 > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > @@ -699,18 +699,18 @@ int intel_dp_rate_index(const int *rates, int len, > > int rate) > > } > > > > static int intel_dp_link_config_rate(struct intel_dp *intel_dp, > > - const struct intel_dp_link_config *lc) > > + const struct intel_dp_link_config_entry > > *lc) > > { > > return intel_dp_common_rate(intel_dp, lc->link_rate_idx); > > I'm wondering about s/lc/lce/ and s/lc_/lce_/ since I assume the var > name derives from link_config, and now it will be changed. This could be > beneficial given that next patch introduces back struct > intel_dp_link_config.
Yes, this makes sense, but it's simpler to do that as a follow-up. > Whether it applies or not: > > Reviewed-by: Michał Grzelak <[email protected]> Thanks. > > BR, > Michał > > > } > > > > -static int intel_dp_link_config_lane_count(const struct > > intel_dp_link_config *lc) > > +static int intel_dp_link_config_lane_count(const struct > > intel_dp_link_config_entry *lc) > > { > > return 1 << lc->lane_count_exp; > > } > > > > static int intel_dp_link_config_bw(struct intel_dp *intel_dp, > > - const struct intel_dp_link_config *lc) > > + const struct intel_dp_link_config_entry *lc) > > { > > return drm_dp_max_dprx_data_rate(intel_dp_link_config_rate(intel_dp, > > lc), > > intel_dp_link_config_lane_count(lc)); > > @@ -719,8 +719,8 @@ static int intel_dp_link_config_bw(struct intel_dp > > *intel_dp, > > static int link_config_cmp_by_bw(const void *a, const void *b, const void > > *p) > > { > > struct intel_dp *intel_dp = (struct intel_dp *)p; /* remove const > > */ > > - const struct intel_dp_link_config *lc_a = a; > > - const struct intel_dp_link_config *lc_b = b; > > + const struct intel_dp_link_config_entry *lc_a = a; > > + const struct intel_dp_link_config_entry *lc_b = b; > > int bw_a = intel_dp_link_config_bw(intel_dp, lc_a); > > int bw_b = intel_dp_link_config_bw(intel_dp, lc_b); > > > > @@ -734,7 +734,7 @@ static int link_config_cmp_by_bw(const void *a, const > > void *b, const void *p) > > static void intel_dp_link_config_init(struct intel_dp *intel_dp) > > { > > struct intel_display *display = to_intel_display(intel_dp); > > - struct intel_dp_link_config *lc; > > + struct intel_dp_link_config_entry *lc; > > int num_common_lane_configs; > > int i; > > int j; > > @@ -769,7 +769,7 @@ static void intel_dp_link_config_init(struct intel_dp > > *intel_dp) > > void intel_dp_link_config_get(struct intel_dp *intel_dp, int idx, int > > *link_rate, int *lane_count) > > { > > struct intel_display *display = to_intel_display(intel_dp); > > - const struct intel_dp_link_config *lc; > > + const struct intel_dp_link_config_entry *lc; > > > > if (drm_WARN_ON(display->drm, idx < 0 || idx >= > > intel_dp->link.num_configs)) > > idx = 0; > > @@ -788,7 +788,7 @@ int intel_dp_link_config_index(struct intel_dp > > *intel_dp, int link_rate, int lan > > int i; > > > > for (i = 0; i < intel_dp->link.num_configs; i++) { > > - const struct intel_dp_link_config *lc = > > &intel_dp->link.configs[i]; > > + const struct intel_dp_link_config_entry *lc = > > &intel_dp->link.configs[i]; > > > > if (lc->lane_count_exp == lane_count_exp && > > lc->link_rate_idx == link_rate_idx) > > -- > > 2.49.1 > > > >
