All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()
@ 2017-04-10 10:22 Michal Wajdeczko
  2017-04-10 10:38 ` ✓ Fi.CI.BAT: success for drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() (rev2) Patchwork
  2017-04-10 11:41 ` [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Chris Wilson
  0 siblings, 2 replies; 6+ messages in thread
From: Michal Wajdeczko @ 2017-04-10 10:22 UTC (permalink / raw)
  To: intel-gfx; +Cc: Paulo Zanoni

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)

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_display.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index b6b40cd..eeb828c 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -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");
 }
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* ✓ Fi.CI.BAT: success for drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() (rev2)
  2017-04-10 10:22 [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Michal Wajdeczko
@ 2017-04-10 10:38 ` Patchwork
  2017-04-10 11:41 ` [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Chris Wilson
  1 sibling, 0 replies; 6+ messages in thread
From: Patchwork @ 2017-04-10 10:38 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx

== 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
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()
  2017-04-10 10:22 [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Michal Wajdeczko
  2017-04-10 10:38 ` ✓ Fi.CI.BAT: success for drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() (rev2) Patchwork
@ 2017-04-10 11:41 ` Chris Wilson
  2017-04-10 12:56   ` Chris Wilson
  1 sibling, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2017-04-10 11:41 UTC (permalink / raw)
  To: Michal Wajdeczko; +Cc: intel-gfx, Paulo Zanoni

On Mon, Apr 10, 2017 at 10:22:00AM +0000, Michal Wajdeczko wrote:
> 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)
> 
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()
  2017-04-10 11:41 ` [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Chris Wilson
@ 2017-04-10 12:56   ` Chris Wilson
  2017-04-10 13:34     ` Ville Syrjälä
  0 siblings, 1 reply; 6+ messages in thread
From: Chris Wilson @ 2017-04-10 12:56 UTC (permalink / raw)
  To: Michal Wajdeczko, intel-gfx, Paulo Zanoni

On Mon, Apr 10, 2017 at 12:41:30PM +0100, Chris Wilson wrote:
> On Mon, Apr 10, 2017 at 10:22:00AM +0000, Michal Wajdeczko wrote:
> > 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)
> > 
> > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

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

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()
  2017-04-10 12:56   ` Chris Wilson
@ 2017-04-10 13:34     ` Ville Syrjälä
  2017-04-10 13:50       ` Chris Wilson
  0 siblings, 1 reply; 6+ messages in thread
From: Ville Syrjälä @ 2017-04-10 13:34 UTC (permalink / raw)
  To: Chris Wilson, Michal Wajdeczko, intel-gfx, Paulo Zanoni

On Mon, Apr 10, 2017 at 01:56:31PM +0100, Chris Wilson wrote:
> On Mon, Apr 10, 2017 at 12:41:30PM +0100, Chris Wilson wrote:
> > On Mon, Apr 10, 2017 at 10:22:00AM +0000, Michal Wajdeczko wrote:
> > > 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)
> > > 
> > > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> 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?

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy()
  2017-04-10 13:34     ` Ville Syrjälä
@ 2017-04-10 13:50       ` Chris Wilson
  0 siblings, 0 replies; 6+ messages in thread
From: Chris Wilson @ 2017-04-10 13:50 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: intel-gfx, Paulo Zanoni

On Mon, Apr 10, 2017 at 04:34:30PM +0300, Ville Syrjälä wrote:
> On Mon, Apr 10, 2017 at 01:56:31PM +0100, Chris Wilson wrote:
> > On Mon, Apr 10, 2017 at 12:41:30PM +0100, Chris Wilson wrote:
> > > On Mon, Apr 10, 2017 at 10:22:00AM +0000, Michal Wajdeczko wrote:
> > > > 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)
> > > > 
> > > > Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> > > > Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
> > > > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> > 
> > 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

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-04-10 13:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-10 10:22 [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Michal Wajdeczko
2017-04-10 10:38 ` ✓ Fi.CI.BAT: success for drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() (rev2) Patchwork
2017-04-10 11:41 ` [PATCH v2] drm/i915: Use wait_for_register in lpt_reset_fdi_mphy() Chris Wilson
2017-04-10 12:56   ` Chris Wilson
2017-04-10 13:34     ` Ville Syrjälä
2017-04-10 13:50       ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.