Skip to content

Commit 61f73e8

Browse files
committed
drm/i915/dpio: Rename a few CHV DPIO PHY registers
Drop the leading underscore from the CHV PHY common lane register definitions. We use these directly from actual code so the underscore here is misleading as usually it indicates an intermediate define that shouldn't be used directly. 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 263ed34 commit 61f73e8

File tree

3 files changed

+23
-24
lines changed

3 files changed

+23
-24
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1442,9 +1442,9 @@ static void chv_dpio_cmn_power_well_enable(struct drm_i915_private *dev_priv,
14421442
vlv_dpio_write(dev_priv, phy, CHV_CMN_DW28, tmp);
14431443

14441444
if (id == VLV_DISP_PW_DPIO_CMN_BC) {
1445-
tmp = vlv_dpio_read(dev_priv, phy, _CHV_CMN_DW6_CH1);
1445+
tmp = vlv_dpio_read(dev_priv, phy, CHV_CMN_DW6_CH1);
14461446
tmp |= DPIO_DYNPWRDOWNEN_CH1;
1447-
vlv_dpio_write(dev_priv, phy, _CHV_CMN_DW6_CH1, tmp);
1447+
vlv_dpio_write(dev_priv, phy, CHV_CMN_DW6_CH1, tmp);
14481448
} else {
14491449
/*
14501450
* Force the non-existing CL2 off. BXT does this
@@ -1520,9 +1520,9 @@ static void assert_chv_phy_powergate(struct drm_i915_private *dev_priv, enum dpi
15201520
return;
15211521

15221522
if (ch == DPIO_CH0)
1523-
reg = _CHV_CMN_DW0_CH0;
1523+
reg = CHV_CMN_DW0_CH0;
15241524
else
1525-
reg = _CHV_CMN_DW6_CH1;
1525+
reg = CHV_CMN_DW6_CH1;
15261526

15271527
vlv_dpio_get(dev_priv);
15281528
val = vlv_dpio_read(dev_priv, phy, reg);

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -883,21 +883,21 @@ void chv_phy_pre_pll_enable(struct intel_encoder *encoder,
883883

884884
/* program left/right clock distribution */
885885
if (pipe != PIPE_B) {
886-
val = vlv_dpio_read(dev_priv, phy, _CHV_CMN_DW5_CH0);
886+
val = vlv_dpio_read(dev_priv, phy, CHV_CMN_DW5_CH0);
887887
val &= ~(CHV_BUFLEFTENA1_MASK | CHV_BUFRIGHTENA1_MASK);
888888
if (ch == DPIO_CH0)
889889
val |= CHV_BUFLEFTENA1_FORCE;
890890
if (ch == DPIO_CH1)
891891
val |= CHV_BUFRIGHTENA1_FORCE;
892-
vlv_dpio_write(dev_priv, phy, _CHV_CMN_DW5_CH0, val);
892+
vlv_dpio_write(dev_priv, phy, CHV_CMN_DW5_CH0, val);
893893
} else {
894-
val = vlv_dpio_read(dev_priv, phy, _CHV_CMN_DW1_CH1);
894+
val = vlv_dpio_read(dev_priv, phy, CHV_CMN_DW1_CH1);
895895
val &= ~(CHV_BUFLEFTENA2_MASK | CHV_BUFRIGHTENA2_MASK);
896896
if (ch == DPIO_CH0)
897897
val |= CHV_BUFLEFTENA2_FORCE;
898898
if (ch == DPIO_CH1)
899899
val |= CHV_BUFRIGHTENA2_FORCE;
900-
vlv_dpio_write(dev_priv, phy, _CHV_CMN_DW1_CH1, val);
900+
vlv_dpio_write(dev_priv, phy, CHV_CMN_DW1_CH1, val);
901901
}
902902

903903
/* program clock channel usage */
@@ -1036,13 +1036,13 @@ void chv_phy_post_pll_disable(struct intel_encoder *encoder,
10361036

10371037
/* disable left/right clock distribution */
10381038
if (pipe != PIPE_B) {
1039-
val = vlv_dpio_read(dev_priv, phy, _CHV_CMN_DW5_CH0);
1039+
val = vlv_dpio_read(dev_priv, phy, CHV_CMN_DW5_CH0);
10401040
val &= ~(CHV_BUFLEFTENA1_MASK | CHV_BUFRIGHTENA1_MASK);
1041-
vlv_dpio_write(dev_priv, phy, _CHV_CMN_DW5_CH0, val);
1041+
vlv_dpio_write(dev_priv, phy, CHV_CMN_DW5_CH0, val);
10421042
} else {
1043-
val = vlv_dpio_read(dev_priv, phy, _CHV_CMN_DW1_CH1);
1043+
val = vlv_dpio_read(dev_priv, phy, CHV_CMN_DW1_CH1);
10441044
val &= ~(CHV_BUFLEFTENA2_MASK | CHV_BUFRIGHTENA2_MASK);
1045-
vlv_dpio_write(dev_priv, phy, _CHV_CMN_DW1_CH1, val);
1045+
vlv_dpio_write(dev_priv, phy, CHV_CMN_DW1_CH1, val);
10461046
}
10471047

10481048
vlv_dpio_put(dev_priv);

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -459,13 +459,13 @@
459459
#define DPIO_CHV_INT_LOCK_THRESHOLD_SEL_COARSE 1 /* 1: coarse & 0 : fine */
460460
#define CHV_PLL_DW9(ch) _PIPE(ch, _CHV_PLL_DW9_CH0, _CHV_PLL_DW9_CH1)
461461

462-
#define _CHV_CMN_DW0_CH0 0x8100
462+
#define CHV_CMN_DW0_CH0 0x8100
463463
#define DPIO_ALLDL_POWERDOWN_SHIFT_CH0 19
464464
#define DPIO_ANYDL_POWERDOWN_SHIFT_CH0 18
465465
#define DPIO_ALLDL_POWERDOWN (1 << 1)
466466
#define DPIO_ANYDL_POWERDOWN (1 << 0)
467467

468-
#define _CHV_CMN_DW5_CH0 0x8114
468+
#define CHV_CMN_DW5_CH0 0x8114
469469
#define CHV_BUFRIGHTENA1_DISABLE (0 << 20)
470470
#define CHV_BUFRIGHTENA1_NORMAL (1 << 20)
471471
#define CHV_BUFRIGHTENA1_FORCE (3 << 20)
@@ -475,18 +475,18 @@
475475
#define CHV_BUFLEFTENA1_FORCE (3 << 22)
476476
#define CHV_BUFLEFTENA1_MASK (3 << 22)
477477

478-
#define _CHV_CMN_DW13_CH0 0x8134
479-
#define _CHV_CMN_DW0_CH1 0x8080
478+
#define CHV_CMN_DW13_CH0 0x8134
479+
#define CHV_CMN_DW0_CH1 0x8080
480480
#define DPIO_CHV_S1_DIV_SHIFT 21
481481
#define DPIO_CHV_P1_DIV_SHIFT 13 /* 3 bits */
482482
#define DPIO_CHV_P2_DIV_SHIFT 8 /* 5 bits */
483483
#define DPIO_CHV_K_DIV_SHIFT 4
484484
#define DPIO_PLL_FREQLOCK (1 << 1)
485485
#define DPIO_PLL_LOCK (1 << 0)
486-
#define CHV_CMN_DW13(ch) _PIPE(ch, _CHV_CMN_DW13_CH0, _CHV_CMN_DW0_CH1)
486+
#define CHV_CMN_DW13(ch) _PIPE(ch, CHV_CMN_DW13_CH0, CHV_CMN_DW0_CH1)
487487

488-
#define _CHV_CMN_DW14_CH0 0x8138
489-
#define _CHV_CMN_DW1_CH1 0x8084
488+
#define CHV_CMN_DW14_CH0 0x8138
489+
#define CHV_CMN_DW1_CH1 0x8084
490490
#define DPIO_AFC_RECAL (1 << 14)
491491
#define DPIO_DCLKP_EN (1 << 13)
492492
#define CHV_BUFLEFTENA2_DISABLE (0 << 17) /* CL2 DW1 only */
@@ -497,16 +497,15 @@
497497
#define CHV_BUFRIGHTENA2_NORMAL (1 << 19) /* CL2 DW1 only */
498498
#define CHV_BUFRIGHTENA2_FORCE (3 << 19) /* CL2 DW1 only */
499499
#define CHV_BUFRIGHTENA2_MASK (3 << 19) /* CL2 DW1 only */
500-
#define CHV_CMN_DW14(ch) _PIPE(ch, _CHV_CMN_DW14_CH0, _CHV_CMN_DW1_CH1)
500+
#define CHV_CMN_DW14(ch) _PIPE(ch, CHV_CMN_DW14_CH0, CHV_CMN_DW1_CH1)
501501

502-
#define _CHV_CMN_DW19_CH0 0x814c
503-
#define _CHV_CMN_DW6_CH1 0x8098
502+
#define CHV_CMN_DW19_CH0 0x814c
503+
#define CHV_CMN_DW6_CH1 0x8098
504504
#define DPIO_ALLDL_POWERDOWN_SHIFT_CH1 30 /* CL2 DW6 only */
505505
#define DPIO_ANYDL_POWERDOWN_SHIFT_CH1 29 /* CL2 DW6 only */
506506
#define DPIO_DYNPWRDOWNEN_CH1 (1 << 28) /* CL2 DW6 only */
507507
#define CHV_CMN_USEDCLKCHANNEL (1 << 13)
508-
509-
#define CHV_CMN_DW19(ch) _PIPE(ch, _CHV_CMN_DW19_CH0, _CHV_CMN_DW6_CH1)
508+
#define CHV_CMN_DW19(ch) _PIPE(ch, CHV_CMN_DW19_CH0, CHV_CMN_DW6_CH1)
510509

511510
#define CHV_CMN_DW28 0x8170
512511
#define DPIO_CL1POWERDOWNEN (1 << 23)

0 commit comments

Comments
 (0)