[PATCH 027/108] drm/i915/dp: Rename intel_dp_link_config to intel_dp_link_config_entry

Imre Deak
2026-04-28T12:53:38Z

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 <imre.deak@intel.com>
---
.../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 dd61d958d5b6c..e591bca15e4eb 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -1831,7 +1831,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 3dc27dbf2bce8..4f016adef93be 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -688,18 +688,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);
}

-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));
@@ -708,8 +708,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);

@@ -723,7 +723,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;
@@ -758,7 +758,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;
@@ -777,7 +777,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