Skip to contentSkip to conversation

drm/i915: use for_each_port_masked in bxt phy init for clarity

PATCH In review Jani Nikula 4 participants 4 messages Apr 1, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: use for_each_port_masked in bxt phy init for clarity

Make it easier to see which ports are configured for each phy. No functional changes.

---
 drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +7 -3
index 1e083853c70d..7049086b1b27 100644
@@ -1726,7 +1726,7 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv,
 			     enum dpio_phy phy)
 {
 	enum port port;
-	uint32_t val;
+	u32 ports, val;
 
 	val = I915_READ(BXT_P_CR_GT_DISP_PWRON);
 	val |= GT_DISPLAY_POWER_ON(phy);
@@ -1736,8 +1736,12 @@ static void broxton_phy_init(struct drm_i915_private *dev_priv,
 	if (wait_for(I915_READ(BXT_PORT_CL1CM_DW0(phy)) & PHY_POWER_GOOD, 10))
 		DRM_ERROR("timeout during PHY%d power on\n", phy);
 
-	for (port =  (phy == DPIO_PHY0 ? PORT_B : PORT_A);
-	     port <= (phy == DPIO_PHY0 ? PORT_C : PORT_A); port++) {
+	if (phy == DPIO_PHY0)
+		ports = BIT(PORT_B) | BIT(PORT_C);
+	else
+		ports = BIT(PORT_A);
+
+	for_each_port_masked(port, ports) {
 		int lane;
 
 		for (lane = 0; lane < 4; lane++) {
Signature · 6 lines
2.1.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jani Nikula

Make it easier to see which ports are configured for each phy. No functional changes.

Quoted 35 lines
---
 drivers/gpu/drm/i915/intel_ddi.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_ddi.c +1 -1
index 1e083853c70d..7049086b1b27 100644
@@ -1726,7 +1726,7 @@ static void broxton_phy_init(struct drm_i915_private
 *dev_priv,
 			     enum dpio_phy phy)
 {
 	enum port port;
-	uint32_t val;
+	u32 ports, val;
 
 	val = I915_READ(BXT_P_CR_GT_DISP_PWRON);
drivers/gpu/drm/i915/intel_ddi.c +6 -2
 	val |= GT_DISPLAY_POWER_ON(phy);
@@ -1736,8 +1736,12 @@ static void broxton_phy_init(struct drm_i915_private
 *dev_priv,
 	if (wait_for(I915_READ(BXT_PORT_CL1CM_DW0(phy)) & PHY_POWER_GOOD,
 10))
 		DRM_ERROR("timeout during PHY%d power on\n", phy);
 
-	for (port =  (phy == DPIO_PHY0 ? PORT_B : PORT_A);
-	     port <= (phy == DPIO_PHY0 ? PORT_C : PORT_A); port++) {
+	if (phy == DPIO_PHY0)
+		ports = BIT(PORT_B) | BIT(PORT_C);
+	else
+		ports = BIT(PORT_A);
+
+	for_each_port_masked(port, ports) {
 		int lane;
Quoted 1 line

for (lane = 0; lane < 4; lane++) {

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw

✗ Fi.CI.BAT: failure for drm/i915: use for_each_port_masked in bxt phy init for clarity

In reply to Jani Nikula
== Series Details ==

== Series Details ==

Series: drm/i915: use for_each_port_masked in bxt phy init for clarity
URL : https://patchwork.freedesktop.org/series/5165/
State : failure

== Summary ==

Series 5165v1 drm/i915: use for_each_port_masked in bxt phy init for clarity
http://patchwork.freedesktop.org/api/1.0/series/5165/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (bsw-nuc-2)
bdw-ultra        total:196  pass:175  dwarn:0   dfail:0   fail:0   skip:21 
bsw-nuc-2        total:196  pass:158  dwarn:0   dfail:0   fail:1   skip:37 
byt-nuc          total:196  pass:161  dwarn:0   dfail:0   fail:0   skip:35 
hsw-brixbox      total:196  pass:174  dwarn:0   dfail:0   fail:0   skip:22 
skl-i7k-2        total:196  pass:173  dwarn:0   dfail:0   fail:0   skip:23 
skl-nuci5        total:196  pass:184  dwarn:0   dfail:0   fail:0   skip:12 
snb-dellxps      total:22   pass:20   dwarn:0   dfail:0   fail:0   skip:1  

BOOT FAILED for hsw-gt2

Results at /archive/results/CI_IGT_test/Patchwork_1772/

e8d1e8123ef907fc23b53554af9cb99c7f380fb9 drm-intel-nightly: 2016y-04m-01d-07h-26m-00s UTC integration manifest b4c2b9bc0a36ea977a62cdcc3f1e252e119e0249 drm/i915: use for_each_port_masked in bxt phy init for clarity

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#3 lore raw

Re: ✗ Fi.CI.BAT: failure for drm/i915: use for_each_port_masked in bxt phy init for clarity

Quoted 9 lines · Patchwork

== Series Details ==

Series: drm/i915: use for_each_port_masked in bxt phy init for clarity
URL   : https://patchwork.freedesktop.org/series/5165/
State : failure

== Summary ==

Quoted 8 lines

Series 5165v1 drm/i915: use for_each_port_masked in bxt phy init for clarity
http://patchwork.freedesktop.org/api/1.0/series/5165/revisions/1/mbox
/

Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> FAIL       (bsw-nuc-2)

Known 1 frame inter-flip jitter issue with seq_step=10:
https://bugs.freedesktop.org/show_bug.cgi?id=94294

Another known failure is snb-dellxps/kms_pipe_crc_basic/suspend-read-crc-pipe-c according to Tomi it's been failing previously.

Thanks for the patch and review, I pushed the patch to -dinq.

--Imre

Quoted 28 lines

bdw-
ultra        total:196  pass:175  dwarn:0   dfail:0   fail:0   skip:2 1
bsw-nuc-
2        total:196  pass:158  dwarn:0   dfail:0   fail:1   skip:37 byt-
nuc          total:196  pass:161  dwarn:0   dfail:0   fail:0   skip:3 5
hsw-
brixbox      total:196  pass:174  dwarn:0   dfail:0   fail:0   skip:2 2
skl-i7k-
2        total:196  pass:173  dwarn:0   dfail:0   fail:0   skip:23 skl-
nuci5        total:196  pass:184  dwarn:0   dfail:0   fail:0   skip:1 2
snb-
dellxps      total:22   pass:20   dwarn:0   dfail:0   fail:0   skip:1
BOOT FAILED for hsw-gt2

Results at /archive/results/CI_IGT_test/Patchwork_1772/

e8d1e8123ef907fc23b53554af9cb99c7f380fb9 drm-intel-nightly: 2016y- 04m-01d-07h-26m-00s UTC integration manifest b4c2b9bc0a36ea977a62cdcc3f1e252e119e0249 drm/i915: use for_each_port_masked in bxt phy init for clarity

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx