Skip to contentSkip to conversation

drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()

PATCH In review Michal Wajdeczko 4 participants 6 messages Apr 10, 2017

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

PATCH v2 1/1 drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()

There is no need to use macros as we can use generic function. And we can save ~2000 bytes in driver footprint.

v2: drop ret var, add 10ms fallback (Chris)

Cc Paulo Zanoni <[email protected]>
Cc Chris Wilson <[email protected]>
---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/intel_display.c +10 -5
index b6b40cd..eeb828c 100644
@@ -7703,16 +7703,21 @@ static void lpt_reset_fdi_mphy(struct drm_i915_private *dev_priv)
 	tmp |= FDI_MPHY_IOSFSB_RESET_CTL;
 	I915_WRITE(SOUTH_CHICKEN2, tmp);
 
-	if (wait_for_us(I915_READ(SOUTH_CHICKEN2) &
-			FDI_MPHY_IOSFSB_RESET_STATUS, 100))
+	if (__intel_wait_for_register_fw(dev_priv,
+					 SOUTH_CHICKEN2,
+					 FDI_MPHY_IOSFSB_RESET_STATUS,
+					 FDI_MPHY_IOSFSB_RESET_STATUS,
+					 100, 10, &tmp))
 		DRM_ERROR("FDI mPHY reset assert timeout\n");
 
-	tmp = I915_READ(SOUTH_CHICKEN2);
 	tmp &= ~FDI_MPHY_IOSFSB_RESET_CTL;
 	I915_WRITE(SOUTH_CHICKEN2, tmp);
 
-	if (wait_for_us((I915_READ(SOUTH_CHICKEN2) &
-			 FDI_MPHY_IOSFSB_RESET_STATUS) == 0, 100))
+	if (__intel_wait_for_register_fw(dev_priv,
+					 SOUTH_CHICKEN2,
+					 FDI_MPHY_IOSFSB_RESET_STATUS,
+					 0,
+					 100, 10, NULL))
 		DRM_ERROR("FDI mPHY reset de-assert timeout\n");
 }
 
Signature · 6 lines
2.7.4

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

✓ Fi.CI.BAT: success for drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() (rev2)

== Series Details ==

== Series Details ==

Series: drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() (rev2)
URL : https://patchwork.freedesktop.org/series/22758/
State : success

== Summary ==

Series 22758v2 drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()
https://patchwork.freedesktop.org/api/1.0/series/22758/revisions/2/mbox/

fi-bdw-5557u     total:278  pass:267  dwarn:0   dfail:0   fail:0   skip:11  time:438s
fi-bdw-gvtdvm    total:278  pass:256  dwarn:8   dfail:0   fail:0   skip:14  time:431s
fi-bsw-n3050     total:278  pass:242  dwarn:0   dfail:0   fail:0   skip:36  time:576s
fi-bxt-j4205     total:278  pass:259  dwarn:0   dfail:0   fail:0   skip:19  time:507s
fi-bxt-t5700     total:278  pass:258  dwarn:0   dfail:0   fail:0   skip:20  time:536s
fi-byt-j1900     total:278  pass:254  dwarn:0   dfail:0   fail:0   skip:24  time:484s
fi-byt-n2820     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:482s
fi-hsw-4770      total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:407s
fi-hsw-4770r     total:278  pass:262  dwarn:0   dfail:0   fail:0   skip:16  time:405s
fi-ilk-650       total:278  pass:228  dwarn:0   dfail:0   fail:0   skip:50  time:420s
fi-ivb-3520m     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:490s
fi-ivb-3770      total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:491s
fi-kbl-7500u     total:278  pass:260  dwarn:0   dfail:0   fail:0   skip:18  time:457s
fi-kbl-7560u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:567s
fi-skl-6260u     total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:451s
fi-skl-6700hq    total:278  pass:261  dwarn:0   dfail:0   fail:0   skip:17  time:571s
fi-skl-6700k     total:278  pass:256  dwarn:4   dfail:0   fail:0   skip:18  time:459s
fi-skl-6770hq    total:278  pass:268  dwarn:0   dfail:0   fail:0   skip:10  time:493s
fi-skl-gvtdvm    total:278  pass:265  dwarn:0   dfail:0   fail:0   skip:13  time:434s
fi-snb-2520m     total:278  pass:250  dwarn:0   dfail:0   fail:0   skip:28  time:526s
fi-snb-2600      total:278  pass:249  dwarn:0   dfail:0   fail:0   skip:29  time:403s

d86f5fa557fdf089bdb5b51f625a7f5967f11015 drm-tip: 2017y-04m-10d-06h-38m-49s UTC integration manifest 8ea821b drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4457/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by on v2 1/1
#2 lore raw
In reply to Michal Wajdeczko
Quoted 8 lines · Michal Wajdeczko

There is no need to use macros as we can use generic function. And we can save ~2000 bytes in driver footprint.

v2: drop ret var, add 10ms fallback (Chris)

Cc Paulo Zanoni <[email protected]>
Cc Chris Wilson <[email protected]>

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 10 lines · Chris Wilson
Quoted 8 lines · Michal Wajdeczko

There is no need to use macros as we can use generic function. And we can save ~2000 bytes in driver footprint.

v2: drop ret var, add 10ms fallback (Chris)

Cc Paulo Zanoni <[email protected]>
Cc Chris Wilson <[email protected]>

Hmm, forgot the convesion from I915_READ to I915_READ_FW. That should be safe here as this gen doesn't have the concurrent cacheline issue, iirc? -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw
Quoted 7 lines · Chris Wilson
Quoted 6 lines · Chris Wilson
Quoted 5 lines · Michal Wajdeczko

There is no need to use macros as we can use generic function. And we can save ~2000 bytes in driver footprint.

v2: drop ret var, add 10ms fallback (Chris)

Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Cc Paulo Zanoni <[email protected]>
Cc Chris Wilson <[email protected]>

Hmm, forgot the convesion from I915_READ to I915_READ_FW. That should be safe here as this gen doesn't have the concurrent cacheline issue, iirc?

Isn't HSW exactly the platform where it happens very easily?

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 11 lines · Ville Syrjälä
Quoted 10 lines · Chris Wilson
Quoted 9 lines · Chris Wilson
Quoted 8 lines · Michal Wajdeczko

There is no need to use macros as we can use generic function. And we can save ~2000 bytes in driver footprint.

v2: drop ret var, add 10ms fallback (Chris)

Cc Paulo Zanoni <[email protected]>
Cc Chris Wilson <[email protected]>
Quoted 6 lines
Quoted 4 lines
Quoted 1 line

Hmm, forgot the convesion from I915_READ to I915_READ_FW. That should be safe here as this gen doesn't have the concurrent cacheline issue, iirc?

Isn't HSW exactly the platform where it happens very easily?

I thought lpt was later, or rather I just assume that any codename I don't recognise is postmodern.
-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx