Re: [PATCH] drm/i915: Wait old forcewake ack to clear on vlv

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/5/2014 2:23 PM, Ville Syrjälä wrote:
On Wed, Nov 05, 2014 at 10:18:46AM +0200, Mika Kuoppala wrote:
Don't rush into getting new fw until the clearing
of old one has been acked.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85684
Tested-by: lu hua <huax.lu@xxxxxxxxx>
Signed-off-by: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
This is just a revert of
  commit 5cb13c07dae73380d8b3ddc792740487b8742938
  Author: Deepak S <deepak.s@xxxxxxxxxxxxxxx>
  Date:   Thu Sep 18 18:51:50 2014 +0530

     drm/i915/vlv: Remove check for Old Ack during forcewake

except you left the comment behind.

Would be nice to have some kind of real explanation what is going on
here. Deepak, any ideas?
Hi Ville,

This is strange :(. Expectation from HW team is not to wait for old ack. Let me go thought my mail and I will send you the explanation i got from HW team. Sorry, I was working some other task and i will check this issue on my system & update the thread.

Thanks
Deepak

---
  drivers/gpu/drm/i915/intel_uncore.c | 9 +++++++++
  1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 9427641..5259b38 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -204,6 +204,10 @@ static void __vlv_force_wake_get(struct drm_i915_private *dev_priv,
  	/* Check for Render Engine */
  	if (FORCEWAKE_RENDER & fw_engine) {
+ if (wait_for_atomic((__raw_i915_read32(dev_priv, FORCEWAKE_ACK_VLV) &
+				     FORCEWAKE_KERNEL) == 0, FORCEWAKE_ACK_TIMEOUT_MS))
+			DRM_ERROR("Timed out: waiting for old Render ack to clear.\n");
+
  		__raw_i915_write32(dev_priv, FORCEWAKE_VLV,
  				   _MASKED_BIT_ENABLE(FORCEWAKE_KERNEL));
@@ -217,6 +221,11 @@ static void __vlv_force_wake_get(struct drm_i915_private *dev_priv,
  	/* Check for Media Engine */
  	if (FORCEWAKE_MEDIA & fw_engine) {
+ if (wait_for_atomic((__raw_i915_read32(dev_priv, FORCEWAKE_ACK_MEDIA_VLV) &
+				     FORCEWAKE_KERNEL) == 0, FORCEWAKE_ACK_TIMEOUT_MS))
+			DRM_ERROR("Timed out: waiting for old media ack to clear.\n");
+
+
  		__raw_i915_write32(dev_priv, FORCEWAKE_MEDIA_VLV,
  				   _MASKED_BIT_ENABLE(FORCEWAKE_KERNEL));
--
1.9.1

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

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





[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux