Skip to content

Commit ba07c3e

Browse files
committed
drm/i915/dpio: s/ddi/dpio/ for bxt/glk PHY stuff
Since all of this lives in intel_dpio_phy.c let's rename the bxt/glk functions to have bxt_dpio_phy_ namespace. Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Jani Nikula <[email protected]>
1 parent b575007 commit ba07c3e

File tree

5 files changed

+102
-102
lines changed

5 files changed

+102
-102
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3522,8 +3522,8 @@ intel_ddi_pre_pll_enable(struct intel_atomic_state *state,
35223522
*/
35233523
intel_tc_port_set_fia_lane_count(dig_port, crtc_state->lane_count);
35243524
else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
3525-
bxt_ddi_phy_set_lane_optim_mask(encoder,
3526-
crtc_state->lane_lat_optim_mask);
3525+
bxt_dpio_phy_set_lane_optim_mask(encoder,
3526+
crtc_state->lane_lat_optim_mask);
35273527
}
35283528

35293529
static void adlp_tbt_to_dp_alt_switch_wa(struct intel_encoder *encoder)
@@ -3955,7 +3955,7 @@ static void intel_ddi_get_config(struct intel_encoder *encoder,
39553955

39563956
if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
39573957
pipe_config->lane_lat_optim_mask =
3958-
bxt_ddi_phy_get_lane_lat_optim_mask(encoder);
3958+
bxt_dpio_phy_get_lane_lat_optim_mask(encoder);
39593959

39603960
intel_ddi_compute_min_voltage_level(pipe_config);
39613961

@@ -4232,7 +4232,7 @@ static int intel_ddi_compute_config(struct intel_encoder *encoder,
42324232

42334233
if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
42344234
pipe_config->lane_lat_optim_mask =
4235-
bxt_ddi_phy_calc_lane_lat_optim_mask(pipe_config->lane_count);
4235+
bxt_dpio_phy_calc_lane_lat_optim_mask(pipe_config->lane_count);
42364236

42374237
intel_ddi_compute_min_voltage_level(pipe_config);
42384238

@@ -5084,7 +5084,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv,
50845084
else
50855085
encoder->set_signal_levels = icl_mg_phy_set_signal_levels;
50865086
} else if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv)) {
5087-
encoder->set_signal_levels = bxt_ddi_phy_set_signal_levels;
5087+
encoder->set_signal_levels = bxt_dpio_phy_set_signal_levels;
50885088
} else {
50895089
encoder->set_signal_levels = hsw_set_signal_levels;
50905090
}

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -905,39 +905,39 @@ static void hsw_power_well_sync_hw(struct drm_i915_private *dev_priv,
905905
static void bxt_dpio_cmn_power_well_enable(struct drm_i915_private *dev_priv,
906906
struct i915_power_well *power_well)
907907
{
908-
bxt_ddi_phy_init(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
908+
bxt_dpio_phy_init(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
909909
}
910910

911911
static void bxt_dpio_cmn_power_well_disable(struct drm_i915_private *dev_priv,
912912
struct i915_power_well *power_well)
913913
{
914-
bxt_ddi_phy_uninit(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
914+
bxt_dpio_phy_uninit(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
915915
}
916916

917917
static bool bxt_dpio_cmn_power_well_enabled(struct drm_i915_private *dev_priv,
918918
struct i915_power_well *power_well)
919919
{
920-
return bxt_ddi_phy_is_enabled(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
920+
return bxt_dpio_phy_is_enabled(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
921921
}
922922

923-
static void bxt_verify_ddi_phy_power_wells(struct drm_i915_private *dev_priv)
923+
static void bxt_verify_dpio_phy_power_wells(struct drm_i915_private *dev_priv)
924924
{
925925
struct i915_power_well *power_well;
926926

927927
power_well = lookup_power_well(dev_priv, BXT_DISP_PW_DPIO_CMN_A);
928928
if (intel_power_well_refcount(power_well) > 0)
929-
bxt_ddi_phy_verify_state(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
929+
bxt_dpio_phy_verify_state(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
930930

931931
power_well = lookup_power_well(dev_priv, VLV_DISP_PW_DPIO_CMN_BC);
932932
if (intel_power_well_refcount(power_well) > 0)
933-
bxt_ddi_phy_verify_state(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
933+
bxt_dpio_phy_verify_state(dev_priv, i915_power_well_instance(power_well)->bxt.phy);
934934

935935
if (IS_GEMINILAKE(dev_priv)) {
936936
power_well = lookup_power_well(dev_priv,
937937
GLK_DISP_PW_DPIO_CMN_C);
938938
if (intel_power_well_refcount(power_well) > 0)
939-
bxt_ddi_phy_verify_state(dev_priv,
940-
i915_power_well_instance(power_well)->bxt.phy);
939+
bxt_dpio_phy_verify_state(dev_priv,
940+
i915_power_well_instance(power_well)->bxt.phy);
941941
}
942942
}
943943

@@ -986,7 +986,7 @@ void gen9_disable_dc_states(struct drm_i915_private *dev_priv)
986986
gen9_assert_dbuf_enabled(dev_priv);
987987

988988
if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
989-
bxt_verify_ddi_phy_power_wells(dev_priv);
989+
bxt_verify_dpio_phy_power_wells(dev_priv);
990990

991991
if (DISPLAY_VER(dev_priv) >= 11)
992992
/*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ static int intel_dp_mst_compute_config(struct intel_encoder *encoder,
645645

646646
if (IS_GEMINILAKE(dev_priv) || IS_BROXTON(dev_priv))
647647
pipe_config->lane_lat_optim_mask =
648-
bxt_ddi_phy_calc_lane_lat_optim_mask(pipe_config->lane_count);
648+
bxt_dpio_phy_calc_lane_lat_optim_mask(pipe_config->lane_count);
649649

650650
intel_dp_audio_compute_config(encoder, pipe_config, conn_state);
651651

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

Lines changed: 63 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,9 @@
124124
*/
125125

126126
/**
127-
* struct bxt_ddi_phy_info - Hold info for a broxton DDI phy
127+
* struct bxt_dpio_phy_info - Hold info for a broxton DDI phy
128128
*/
129-
struct bxt_ddi_phy_info {
129+
struct bxt_dpio_phy_info {
130130
/**
131131
* @dual_channel: true if this phy has a second channel.
132132
*/
@@ -162,7 +162,7 @@ struct bxt_ddi_phy_info {
162162
} channel[2];
163163
};
164164

165-
static const struct bxt_ddi_phy_info bxt_ddi_phy_info[] = {
165+
static const struct bxt_dpio_phy_info bxt_dpio_phy_info[] = {
166166
[DPIO_PHY0] = {
167167
.dual_channel = true,
168168
.rcomp_phy = DPIO_PHY1,
@@ -184,7 +184,7 @@ static const struct bxt_ddi_phy_info bxt_ddi_phy_info[] = {
184184
},
185185
};
186186

187-
static const struct bxt_ddi_phy_info glk_ddi_phy_info[] = {
187+
static const struct bxt_dpio_phy_info glk_dpio_phy_info[] = {
188188
[DPIO_PHY0] = {
189189
.dual_channel = false,
190190
.rcomp_phy = DPIO_PHY1,
@@ -217,23 +217,23 @@ static const struct bxt_ddi_phy_info glk_ddi_phy_info[] = {
217217
},
218218
};
219219

220-
static const struct bxt_ddi_phy_info *
220+
static const struct bxt_dpio_phy_info *
221221
bxt_get_phy_list(struct drm_i915_private *dev_priv, int *count)
222222
{
223223
if (IS_GEMINILAKE(dev_priv)) {
224-
*count = ARRAY_SIZE(glk_ddi_phy_info);
225-
return glk_ddi_phy_info;
224+
*count = ARRAY_SIZE(glk_dpio_phy_info);
225+
return glk_dpio_phy_info;
226226
} else {
227-
*count = ARRAY_SIZE(bxt_ddi_phy_info);
228-
return bxt_ddi_phy_info;
227+
*count = ARRAY_SIZE(bxt_dpio_phy_info);
228+
return bxt_dpio_phy_info;
229229
}
230230
}
231231

232-
static const struct bxt_ddi_phy_info *
232+
static const struct bxt_dpio_phy_info *
233233
bxt_get_phy_info(struct drm_i915_private *dev_priv, enum dpio_phy phy)
234234
{
235235
int count;
236-
const struct bxt_ddi_phy_info *phy_list =
236+
const struct bxt_dpio_phy_info *phy_list =
237237
bxt_get_phy_list(dev_priv, &count);
238238

239239
return &phy_list[phy];
@@ -242,7 +242,7 @@ bxt_get_phy_info(struct drm_i915_private *dev_priv, enum dpio_phy phy)
242242
void bxt_port_to_phy_channel(struct drm_i915_private *dev_priv, enum port port,
243243
enum dpio_phy *phy, enum dpio_channel *ch)
244244
{
245-
const struct bxt_ddi_phy_info *phy_info, *phys;
245+
const struct bxt_dpio_phy_info *phy_info, *phys;
246246
int i, count;
247247

248248
phys = bxt_get_phy_list(dev_priv, &count);
@@ -274,10 +274,10 @@ void bxt_port_to_phy_channel(struct drm_i915_private *dev_priv, enum port port,
274274
* Like intel_de_rmw() but reads from a single per-lane register and
275275
* writes to the group register to write the same value to all the lanes.
276276
*/
277-
static u32 bxt_ddi_phy_rmw_grp(struct drm_i915_private *i915,
278-
i915_reg_t reg_single,
279-
i915_reg_t reg_group,
280-
u32 clear, u32 set)
277+
static u32 bxt_dpio_phy_rmw_grp(struct drm_i915_private *i915,
278+
i915_reg_t reg_single,
279+
i915_reg_t reg_group,
280+
u32 clear, u32 set)
281281
{
282282
u32 old, val;
283283

@@ -288,8 +288,8 @@ static u32 bxt_ddi_phy_rmw_grp(struct drm_i915_private *i915,
288288
return old;
289289
}
290290

291-
void bxt_ddi_phy_set_signal_levels(struct intel_encoder *encoder,
292-
const struct intel_crtc_state *crtc_state)
291+
void bxt_dpio_phy_set_signal_levels(struct intel_encoder *encoder,
292+
const struct intel_crtc_state *crtc_state)
293293
{
294294
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
295295
int level = intel_ddi_level(encoder, crtc_state, 0);
@@ -309,40 +309,40 @@ void bxt_ddi_phy_set_signal_levels(struct intel_encoder *encoder,
309309
* While we write to the group register to program all lanes at once we
310310
* can read only lane registers and we pick lanes 0/1 for that.
311311
*/
312-
bxt_ddi_phy_rmw_grp(dev_priv, BXT_PORT_PCS_DW10_LN01(phy, ch),
313-
BXT_PORT_PCS_DW10_GRP(phy, ch),
314-
TX2_SWING_CALC_INIT | TX1_SWING_CALC_INIT, 0);
315-
316-
bxt_ddi_phy_rmw_grp(dev_priv, BXT_PORT_TX_DW2_LN(phy, ch, 0),
317-
BXT_PORT_TX_DW2_GRP(phy, ch),
318-
MARGIN_000_MASK | UNIQ_TRANS_SCALE_MASK,
319-
MARGIN_000(trans->entries[level].bxt.margin) |
320-
UNIQ_TRANS_SCALE(trans->entries[level].bxt.scale));
321-
322-
bxt_ddi_phy_rmw_grp(dev_priv, BXT_PORT_TX_DW3_LN(phy, ch, 0),
323-
BXT_PORT_TX_DW3_GRP(phy, ch),
324-
SCALE_DCOMP_METHOD,
325-
trans->entries[level].bxt.enable ?
326-
SCALE_DCOMP_METHOD : 0);
312+
bxt_dpio_phy_rmw_grp(dev_priv, BXT_PORT_PCS_DW10_LN01(phy, ch),
313+
BXT_PORT_PCS_DW10_GRP(phy, ch),
314+
TX2_SWING_CALC_INIT | TX1_SWING_CALC_INIT, 0);
315+
316+
bxt_dpio_phy_rmw_grp(dev_priv, BXT_PORT_TX_DW2_LN(phy, ch, 0),
317+
BXT_PORT_TX_DW2_GRP(phy, ch),
318+
MARGIN_000_MASK | UNIQ_TRANS_SCALE_MASK,
319+
MARGIN_000(trans->entries[level].bxt.margin) |
320+
UNIQ_TRANS_SCALE(trans->entries[level].bxt.scale));
321+
322+
bxt_dpio_phy_rmw_grp(dev_priv, BXT_PORT_TX_DW3_LN(phy, ch, 0),
323+
BXT_PORT_TX_DW3_GRP(phy, ch),
324+
SCALE_DCOMP_METHOD,
325+
trans->entries[level].bxt.enable ?
326+
SCALE_DCOMP_METHOD : 0);
327327

328328
val = intel_de_read(dev_priv, BXT_PORT_TX_DW3_LN(phy, ch, 0));
329329
if ((val & UNIQUE_TRANGE_EN_METHOD) && !(val & SCALE_DCOMP_METHOD))
330330
drm_err(&dev_priv->drm,
331331
"Disabled scaling while ouniqetrangenmethod was set");
332332

333-
bxt_ddi_phy_rmw_grp(dev_priv, BXT_PORT_TX_DW4_LN(phy, ch, 0),
334-
BXT_PORT_TX_DW4_GRP(phy, ch), DE_EMPHASIS_MASK,
335-
DE_EMPHASIS(trans->entries[level].bxt.deemphasis));
333+
bxt_dpio_phy_rmw_grp(dev_priv, BXT_PORT_TX_DW4_LN(phy, ch, 0),
334+
BXT_PORT_TX_DW4_GRP(phy, ch), DE_EMPHASIS_MASK,
335+
DE_EMPHASIS(trans->entries[level].bxt.deemphasis));
336336

337-
bxt_ddi_phy_rmw_grp(dev_priv, BXT_PORT_PCS_DW10_LN01(phy, ch),
338-
BXT_PORT_PCS_DW10_GRP(phy, ch),
339-
0, TX2_SWING_CALC_INIT | TX1_SWING_CALC_INIT);
337+
bxt_dpio_phy_rmw_grp(dev_priv, BXT_PORT_PCS_DW10_LN01(phy, ch),
338+
BXT_PORT_PCS_DW10_GRP(phy, ch),
339+
0, TX2_SWING_CALC_INIT | TX1_SWING_CALC_INIT);
340340
}
341341

342-
bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv,
343-
enum dpio_phy phy)
342+
bool bxt_dpio_phy_is_enabled(struct drm_i915_private *dev_priv,
343+
enum dpio_phy phy)
344344
{
345-
const struct bxt_ddi_phy_info *phy_info;
345+
const struct bxt_dpio_phy_info *phy_info;
346346

347347
phy_info = bxt_get_phy_info(dev_priv, phy);
348348

@@ -383,20 +383,20 @@ static void bxt_phy_wait_grc_done(struct drm_i915_private *dev_priv,
383383
phy);
384384
}
385385

386-
static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
387-
enum dpio_phy phy)
386+
static void _bxt_dpio_phy_init(struct drm_i915_private *dev_priv,
387+
enum dpio_phy phy)
388388
{
389-
const struct bxt_ddi_phy_info *phy_info;
389+
const struct bxt_dpio_phy_info *phy_info;
390390
u32 val;
391391

392392
phy_info = bxt_get_phy_info(dev_priv, phy);
393393

394-
if (bxt_ddi_phy_is_enabled(dev_priv, phy)) {
394+
if (bxt_dpio_phy_is_enabled(dev_priv, phy)) {
395395
/* Still read out the GRC value for state verification */
396396
if (phy_info->rcomp_phy != -1)
397397
dev_priv->display.state.bxt_phy_grc = bxt_get_grc(dev_priv, phy);
398398

399-
if (bxt_ddi_phy_verify_state(dev_priv, phy)) {
399+
if (bxt_dpio_phy_verify_state(dev_priv, phy)) {
400400
drm_dbg(&dev_priv->drm, "DDI PHY %d already enabled, "
401401
"won't reprogram it\n", phy);
402402
return;
@@ -464,9 +464,9 @@ static void _bxt_ddi_phy_init(struct drm_i915_private *dev_priv,
464464
intel_de_rmw(dev_priv, BXT_PHY_CTL_FAMILY(phy), 0, COMMON_RESET_DIS);
465465
}
466466

467-
void bxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
467+
void bxt_dpio_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
468468
{
469-
const struct bxt_ddi_phy_info *phy_info;
469+
const struct bxt_dpio_phy_info *phy_info;
470470

471471
phy_info = bxt_get_phy_info(dev_priv, phy);
472472

@@ -475,9 +475,9 @@ void bxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy)
475475
intel_de_rmw(dev_priv, BXT_P_CR_GT_DISP_PWRON, phy_info->pwron_mask, 0);
476476
}
477477

478-
void bxt_ddi_phy_init(struct drm_i915_private *dev_priv, enum dpio_phy phy)
478+
void bxt_dpio_phy_init(struct drm_i915_private *dev_priv, enum dpio_phy phy)
479479
{
480-
const struct bxt_ddi_phy_info *phy_info =
480+
const struct bxt_dpio_phy_info *phy_info =
481481
bxt_get_phy_info(dev_priv, phy);
482482
enum dpio_phy rcomp_phy = phy_info->rcomp_phy;
483483
bool was_enabled;
@@ -486,19 +486,19 @@ void bxt_ddi_phy_init(struct drm_i915_private *dev_priv, enum dpio_phy phy)
486486

487487
was_enabled = true;
488488
if (rcomp_phy != -1)
489-
was_enabled = bxt_ddi_phy_is_enabled(dev_priv, rcomp_phy);
489+
was_enabled = bxt_dpio_phy_is_enabled(dev_priv, rcomp_phy);
490490

491491
/*
492492
* We need to copy the GRC calibration value from rcomp_phy,
493493
* so make sure it's powered up.
494494
*/
495495
if (!was_enabled)
496-
_bxt_ddi_phy_init(dev_priv, rcomp_phy);
496+
_bxt_dpio_phy_init(dev_priv, rcomp_phy);
497497

498-
_bxt_ddi_phy_init(dev_priv, phy);
498+
_bxt_dpio_phy_init(dev_priv, phy);
499499

500500
if (!was_enabled)
501-
bxt_ddi_phy_uninit(dev_priv, rcomp_phy);
501+
bxt_dpio_phy_uninit(dev_priv, rcomp_phy);
502502
}
503503

504504
static bool __printf(6, 7)
@@ -528,10 +528,10 @@ __phy_reg_verify_state(struct drm_i915_private *dev_priv, enum dpio_phy phy,
528528
return false;
529529
}
530530

531-
bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
532-
enum dpio_phy phy)
531+
bool bxt_dpio_phy_verify_state(struct drm_i915_private *dev_priv,
532+
enum dpio_phy phy)
533533
{
534-
const struct bxt_ddi_phy_info *phy_info;
534+
const struct bxt_dpio_phy_info *phy_info;
535535
u32 mask;
536536
bool ok;
537537

@@ -541,7 +541,7 @@ bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
541541
__phy_reg_verify_state(dev_priv, phy, reg, mask, exp, fmt, \
542542
## __VA_ARGS__)
543543

544-
if (!bxt_ddi_phy_is_enabled(dev_priv, phy))
544+
if (!bxt_dpio_phy_is_enabled(dev_priv, phy))
545545
return false;
546546

547547
ok = true;
@@ -585,7 +585,7 @@ bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv,
585585
}
586586

587587
u8
588-
bxt_ddi_phy_calc_lane_lat_optim_mask(u8 lane_count)
588+
bxt_dpio_phy_calc_lane_lat_optim_mask(u8 lane_count)
589589
{
590590
switch (lane_count) {
591591
case 1:
@@ -601,8 +601,8 @@ bxt_ddi_phy_calc_lane_lat_optim_mask(u8 lane_count)
601601
}
602602
}
603603

604-
void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder *encoder,
605-
u8 lane_lat_optim_mask)
604+
void bxt_dpio_phy_set_lane_optim_mask(struct intel_encoder *encoder,
605+
u8 lane_lat_optim_mask)
606606
{
607607
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
608608
enum port port = encoder->port;
@@ -624,7 +624,7 @@ void bxt_ddi_phy_set_lane_optim_mask(struct intel_encoder *encoder,
624624
}
625625

626626
u8
627-
bxt_ddi_phy_get_lane_lat_optim_mask(struct intel_encoder *encoder)
627+
bxt_dpio_phy_get_lane_lat_optim_mask(struct intel_encoder *encoder)
628628
{
629629
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
630630
enum port port = encoder->port;

0 commit comments

Comments
 (0)