Skip to contentSkip to conversation

drm/i915: GMBUS fixes and whatnot

PATCH In review [email protected] 5 participants 15 messages Mar 7, 2016 – Apr 12, 2016

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

cover drm/i915: GMBUS fixes and whatnot

From: Ville Syrjälä <[email protected]>

While I was frobbing around with DP++ dongles I noticed that out GMBUS bit-banging fallbacks weren't working as I was expecting, so after a bit of digging around I came up wit these patches.

Ville Syrjälä (4):
drm/i915: Actually retry with bit-banging after GMBUS timeout drm/i915: Protect force_bit with gmbus_mutex
drm/i915: Restore GMBUS operation after a failed bit-banging fallback drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS

 drivers/gpu/drm/i915/i915_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_i2c.c | 25 ++++++++++++++++++++-----
 2 files changed, 21 insertions(+), 5 deletions(-)
Signature · 6 lines
2.4.10

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

PATCH 1/4 drm/i915: Actually retry with bit-banging after GMBUS timeout

From: Ville Syrjälä <[email protected]>

After the GMBUS transfer times out, we set force_bit=1 and return -EAGAIN expecting the i2c core to call the .master_xfer hook again so that we will retry the same transfer via bit-banging. This is in case the gmbus hardware is somehow faulty.

Unfortunately we left adapter->retries to 0, meaning the i2c core didn't actually do the retry. Let's tell the core we want one retry when we return -EAGAIN.

Note that i2c-algo-bit also uses this retry count for some internal retries, so we'll end up increasing those a bit as well.

Cc Jani Nikula <[email protected]>
Fixes bffce907d640 ("drm/i915: abstract i2c bit banging fallback in gmbus xfer")
---
 drivers/gpu/drm/i915/intel_i2c.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_i2c.c +6 -0
index deb8282c26d8..52fbe530fc9e 100644
@@ -664,6 +664,12 @@ int intel_setup_gmbus(struct drm_device *dev)
 
 		bus->adapter.algo = &gmbus_algorithm;
 
+		/*
+		 * We wish to retry with bit banging
+		 * after a timed out GMBUS attempt.
+		 */
+		bus->adapter.retries = 1;
+
 		/* By default use a conservative clock rate */
 		bus->reg0 = pin | GMBUS_RATE_100KHZ;
 
Signature · 6 lines
2.4.10

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

Re: [PATCH 1/4] drm/i915: Actually retry with bit-banging after GMBUS timeout

Quoted 7 lines · On Mon, 07 Mar 2016, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

After the GMBUS transfer times out, we set force_bit=1 and return -EAGAIN expecting the i2c core to call the .master_xfer hook again so that we will retry the same transfer via bit-banging. This is in case the gmbus hardware is somehow faulty.

Quoted 6 lines

Unfortunately we left adapter->retries to 0, meaning the i2c core didn't actually do the retry. Let's tell the core we want one retry when we return -EAGAIN.

Note that i2c-algo-bit also uses this retry count for some internal retries, so we'll end up increasing those a bit as well.

I think I must have confused this with the dp aux i2c adapter retries which does get initialized to 3. Meh.

Quoted 25 lines
Cc Jani Nikula <[email protected]>
Fixes bffce907d640 ("drm/i915: abstract i2c bit banging fallback in gmbus xfer")
---
 drivers/gpu/drm/i915/intel_i2c.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_i2c.c +6 -0
index deb8282c26d8..52fbe530fc9e 100644
@@ -664,6 +664,12 @@ int intel_setup_gmbus(struct drm_device *dev)
 
 		bus->adapter.algo = &gmbus_algorithm;
 
+		/*
+		 * We wish to retry with bit banging
+		 * after a timed out GMBUS attempt.
+		 */
+		bus->adapter.retries = 1;
+
 		/* By default use a conservative clock rate */
 		bus->reg0 = pin | GMBUS_RATE_100KHZ;
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

Re: [PATCH 1/4] drm/i915: Actually retry with bit-banging after GMBUS timeout

Quoted 12 lines · Jani Nikula
Quoted 11 lines · On Mon, 07 Mar 2016, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

After the GMBUS transfer times out, we set force_bit=1 and return -EAGAIN expecting the i2c core to call the .master_xfer hook again so that we will retry the same transfer via bit-banging. This is in case the gmbus hardware is somehow faulty.

Unfortunately we left adapter->retries to 0, meaning the i2c core didn't actually do the retry. Let's tell the core we want one retry when we return -EAGAIN.

Quoted 7 lines
Quoted 2 lines

Note that i2c-algo-bit also uses this retry count for some internal retries, so we'll end up increasing those a bit as well.

I think I must have confused this with the dp aux i2c adapter retries which does get initialized to 3. Meh.

Patch pushed to dinq. Thanks for the review.

Quoted 29 lines
Quoted 26 lines
Cc Jani Nikula <[email protected]>
Fixes bffce907d640 ("drm/i915: abstract i2c bit banging fallback in gmbus xfer")
---
 drivers/gpu/drm/i915/intel_i2c.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/gpu/drm/i915/intel_i2c.c +6 -0
index deb8282c26d8..52fbe530fc9e 100644
@@ -664,6 +664,12 @@ int intel_setup_gmbus(struct drm_device *dev)
 
 		bus->adapter.algo = &gmbus_algorithm;
 
+		/*
+		 * We wish to retry with bit banging
+		 * after a timed out GMBUS attempt.
+		 */
+		bus->adapter.retries = 1;
+
 		/* By default use a conservative clock rate */
 		bus->reg0 = pin | GMBUS_RATE_100KHZ;
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH 2/4 drm/i915: Protect force_bit with gmbus_mutex

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

Extend the protection of gmbus_mutex around the force_bit RMW in intel_gmbus_force_bit(), in case someone gets the idea of calling it from a separate thread while there's other stuff happening on the same bus.

---
 drivers/gpu/drm/i915/intel_i2c.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_i2c.c +5 -0
index 52fbe530fc9e..7bf8a485e18f 100644
@@ -718,11 +718,16 @@ void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed)
 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
 {
 	struct intel_gmbus *bus = to_intel_gmbus(adapter);
+	struct drm_i915_private *dev_priv = bus->dev_priv;
+
+	mutex_lock(&dev_priv->gmbus_mutex);
 
 	bus->force_bit += force_bit ? 1 : -1;
 	DRM_DEBUG_KMS("%sabling bit-banging on %s. force bit now %d\n",
 		      force_bit ? "en" : "dis", adapter->name,
 		      bus->force_bit);
+
+	mutex_unlock(&dev_priv->gmbus_mutex);
 }
 
 void intel_teardown_gmbus(struct drm_device *dev)
Signature · 6 lines
2.4.10

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v1 2/4
#5 lore raw

Re: [PATCH 2/4] drm/i915: Protect force_bit with gmbus_mutex

Quoted 8 lines · On Mon, 07 Mar 2016, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

Extend the protection of gmbus_mutex around the force_bit RMW in intel_gmbus_force_bit(), in case someone gets the idea of calling it from a separate thread while there's other stuff happening on the same bus.

intel_gmbus_is_forced_bit() usage in intel_crt_get_edid() seems a bit suspect still, but this is a step forward.

Quoted 25 lines
---
 drivers/gpu/drm/i915/intel_i2c.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/i915/intel_i2c.c +5 -0
index 52fbe530fc9e..7bf8a485e18f 100644
@@ -718,11 +718,16 @@ void intel_gmbus_set_speed(struct i2c_adapter *adapter, int speed)
 void intel_gmbus_force_bit(struct i2c_adapter *adapter, bool force_bit)
 {
 	struct intel_gmbus *bus = to_intel_gmbus(adapter);
+	struct drm_i915_private *dev_priv = bus->dev_priv;
+
+	mutex_lock(&dev_priv->gmbus_mutex);
 
 	bus->force_bit += force_bit ? 1 : -1;
 	DRM_DEBUG_KMS("%sabling bit-banging on %s. force bit now %d\n",
 		      force_bit ? "en" : "dis", adapter->name,
 		      bus->force_bit);
+
+	mutex_unlock(&dev_priv->gmbus_mutex);
 }
 
 void intel_teardown_gmbus(struct drm_device *dev)
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH 3/4 drm/i915: Restore GMBUS operation after a failed bit-banging fallback

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

When the GMBUS based i2c transfer times out, we try to fall back to bit-banging and retry the operation that way. However if the bit-banging attempt also fails, we should probably go back to the GMBUS method for the next attempt. Maybe there simply wasn't anyone one the bus at this time.

There's also a bit of a mess going on with the force_bit handling. It's supposed to be a ref count actually, and it is as far as intel_gmbus_force_bit() is concerned. But it's treated as just a flag by the timeout based bit-banging fallback. I suppose that's fine since we should never end up in the timeout fallback case if force_bit was already non-zero. However now that we want to restore things back to where they were after the bit-banging attempt failed, we're going to have to do things a bit differently to avoid clobbering the force_bit count as set up by intel_gmbus_force_bit(). So let's dedicate the high bit as a flag for the low level timeout based fallback and treat the rest of the bits as a ref count just as before.

---
 drivers/gpu/drm/i915/i915_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_i2c.c | 10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index f37ac120a29d..2348fea59592 100644
@@ -1043,6 +1043,7 @@ struct intel_fbc_work;
 
 struct intel_gmbus {
 	struct i2c_adapter adapter;
+#define GMBUS_FORCE_BIT_RETRY (1U << 31)
 	u32 force_bit;
 	u32 reg0;
 	i915_reg_t gpio_reg;
drivers/gpu/drm/i915/intel_i2c.c +7 -3
index 7bf8a485e18f..5d4b3604afd2 100644
@@ -579,7 +579,6 @@ timeout:
 	 * Hardware may not support GMBUS over these pins? Try GPIO bitbanging
 	 * instead. Use EAGAIN to have i2c core retry.
 	 */
-	bus->force_bit = 1;
 	ret = -EAGAIN;
 
 out:
@@ -597,10 +596,15 @@ gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
 	intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 	mutex_lock(&dev_priv->gmbus_mutex);
 
-	if (bus->force_bit)
+	if (bus->force_bit) {
 		ret = i2c_bit_algo.master_xfer(adapter, msgs, num);
-	else
+		if (ret < 0)
+			bus->force_bit &= ~GMBUS_FORCE_BIT_RETRY;
+	} else {
 		ret = do_gmbus_xfer(adapter, msgs, num);
+		if (ret == -EAGAIN)
+			bus->force_bit |= GMBUS_FORCE_BIT_RETRY;
+	}
 
 	mutex_unlock(&dev_priv->gmbus_mutex);
 	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
Signature · 6 lines
2.4.10

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
maintainer Reviewed-by on v1 3/4
#7 lore raw

Re: [PATCH 3/4] drm/i915: Restore GMBUS operation after a failed bit-banging fallback

Quoted 54 lines · On Mon, 07 Mar 2016, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

When the GMBUS based i2c transfer times out, we try to fall back to bit-banging and retry the operation that way. However if the bit-banging attempt also fails, we should probably go back to the GMBUS method for the next attempt. Maybe there simply wasn't anyone one the bus at this time.

There's also a bit of a mess going on with the force_bit handling. It's supposed to be a ref count actually, and it is as far as intel_gmbus_force_bit() is concerned. But it's treated as just a flag by the timeout based bit-banging fallback. I suppose that's fine since we should never end up in the timeout fallback case if force_bit was already non-zero. However now that we want to restore things back to where they were after the bit-banging attempt failed, we're going to have to do things a bit differently to avoid clobbering the force_bit count as set up by intel_gmbus_force_bit(). So let's dedicate the high bit as a flag for the low level timeout based fallback and treat the rest of the bits as a ref count just as before.

---
 drivers/gpu/drm/i915/i915_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_i2c.c | 10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index f37ac120a29d..2348fea59592 100644
@@ -1043,6 +1043,7 @@ struct intel_fbc_work;
 
 struct intel_gmbus {
 	struct i2c_adapter adapter;
+#define GMBUS_FORCE_BIT_RETRY (1U << 31)
 	u32 force_bit;
 	u32 reg0;
 	i915_reg_t gpio_reg;
drivers/gpu/drm/i915/intel_i2c.c +0 -1
index 7bf8a485e18f..5d4b3604afd2 100644
@@ -579,7 +579,6 @@ timeout:
 	 * Hardware may not support GMBUS over these pins? Try GPIO bitbanging
 	 * instead. Use EAGAIN to have i2c core retry.
 	 */
-	bus->force_bit = 1;
 	ret = -EAGAIN;
 
 out:
@@ -597,10 +596,15 @@ gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
 	intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 	mutex_lock(&dev_priv->gmbus_mutex);
 

drivers/gpu/drm/i915/intel_i2c.c gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num) · line 606

Quoted 10 lines
drivers/gpu/drm/i915/intel_i2c.c +6 -2
-	if (bus->force_bit)
+	if (bus->force_bit) {
 		ret = i2c_bit_algo.master_xfer(adapter, msgs, num);
-	else
+		if (ret < 0)
+			bus->force_bit &= ~GMBUS_FORCE_BIT_RETRY;
+	} else {
 		ret = do_gmbus_xfer(adapter, msgs, num);
+		if (ret == -EAGAIN)
+			bus->force_bit |= GMBUS_FORCE_BIT_RETRY;

Hmm, would this all be simpler if we did the first bit-banging retry here ourselves after all, and set ->force_bit only if bit-banging succeeds after gmbus -EAGAIN? I think moving the retry out of do_gmbus_xfer() was the right thing to do to, but maybe I went too far by pushing it all the way to i2c core?

Anyway, this patch looks good, but it's just a bit subtle with the -EAGAIN and one retry and all.

Up to you.

Quoted 4 lines
drivers/gpu/drm/i915/intel_i2c.c +1 -0
+	}
 
 	mutex_unlock(&dev_priv->gmbus_mutex);
 	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

Re: [PATCH 3/4] drm/i915: Restore GMBUS operation after a failed bit-banging fallback

Quoted 72 lines · Jani Nikula
Quoted 54 lines · On Mon, 07 Mar 2016, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

When the GMBUS based i2c transfer times out, we try to fall back to bit-banging and retry the operation that way. However if the bit-banging attempt also fails, we should probably go back to the GMBUS method for the next attempt. Maybe there simply wasn't anyone one the bus at this time.

There's also a bit of a mess going on with the force_bit handling. It's supposed to be a ref count actually, and it is as far as intel_gmbus_force_bit() is concerned. But it's treated as just a flag by the timeout based bit-banging fallback. I suppose that's fine since we should never end up in the timeout fallback case if force_bit was already non-zero. However now that we want to restore things back to where they were after the bit-banging attempt failed, we're going to have to do things a bit differently to avoid clobbering the force_bit count as set up by intel_gmbus_force_bit(). So let's dedicate the high bit as a flag for the low level timeout based fallback and treat the rest of the bits as a ref count just as before.

---
 drivers/gpu/drm/i915/i915_drv.h  |  1 +
 drivers/gpu/drm/i915/intel_i2c.c | 10 +++++++---
 2 files changed, 8 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index f37ac120a29d..2348fea59592 100644
@@ -1043,6 +1043,7 @@ struct intel_fbc_work;
 
 struct intel_gmbus {
 	struct i2c_adapter adapter;
+#define GMBUS_FORCE_BIT_RETRY (1U << 31)
 	u32 force_bit;
 	u32 reg0;
 	i915_reg_t gpio_reg;
drivers/gpu/drm/i915/intel_i2c.c +0 -1
index 7bf8a485e18f..5d4b3604afd2 100644
@@ -579,7 +579,6 @@ timeout:
 	 * Hardware may not support GMBUS over these pins? Try GPIO bitbanging
 	 * instead. Use EAGAIN to have i2c core retry.
 	 */
-	bus->force_bit = 1;
 	ret = -EAGAIN;
 
 out:
@@ -597,10 +596,15 @@ gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num)
 	intel_display_power_get(dev_priv, POWER_DOMAIN_GMBUS);
 	mutex_lock(&dev_priv->gmbus_mutex);
 

drivers/gpu/drm/i915/intel_i2c.c gmbus_xfer(struct i2c_adapter *adapter, struct i2c_msg *msgs, int num) · line 606

Quoted 10 lines
drivers/gpu/drm/i915/intel_i2c.c +6 -2
-	if (bus->force_bit)
+	if (bus->force_bit) {
 		ret = i2c_bit_algo.master_xfer(adapter, msgs, num);
-	else
+		if (ret < 0)
+			bus->force_bit &= ~GMBUS_FORCE_BIT_RETRY;
+	} else {
 		ret = do_gmbus_xfer(adapter, msgs, num);
+		if (ret == -EAGAIN)
+			bus->force_bit |= GMBUS_FORCE_BIT_RETRY;

Hmm, would this all be simpler if we did the first bit-banging retry here ourselves after all, and set ->force_bit only if bit-banging succeeds after gmbus -EAGAIN? I think moving the retry out of do_gmbus_xfer() was the right thing to do to, but maybe I went too far by pushing it all the way to i2c core?

Quoted 6 lines

Anyway, this patch looks good, but it's just a bit subtle with the -EAGAIN and one retry and all.

Up to you.

I left it alone for now, if for no other reason than to avoid having to redo any testing right now. We can always revisit it later.

Rest of the series pushed to dinq. Thanks for the reviews.

Quoted 8 lines
Quoted 5 lines
drivers/gpu/drm/i915/intel_i2c.c +1 -0
+	}
 
 	mutex_unlock(&dev_priv->gmbus_mutex);
 	intel_display_power_put(dev_priv, POWER_DOMAIN_GMBUS);
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#9 lore raw

PATCH 4/4 drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS

In reply to [email protected]

From: Ville Syrjälä <[email protected]>

There's no real reason the user should care that we're about to fall back to bitbanging, so let's change the message from DRM_INFO to DRM_DEBUG_KMS.

---
 drivers/gpu/drm/i915/intel_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_i2c.c +2 -2
index 5d4b3604afd2..edeb74c94d88 100644
@@ -571,8 +571,8 @@ clear_err:
 	goto out;
 
 timeout:
-	DRM_INFO("GMBUS [%s] timed out, falling back to bit banging on pin %d\n",
-		 bus->adapter.name, bus->reg0 & 0xff);
+	DRM_DEBUG_KMS("GMBUS [%s] timed out, falling back to bit banging on pin %d\n",
+		      bus->adapter.name, bus->reg0 & 0xff);
 	I915_WRITE(GMBUS0, 0);
 
 	/*
Signature · 6 lines
2.4.10

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

Re: [PATCH 4/4] drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS

Quoted 7 lines · On Mon, Mar 07, 2016 at 05:57:00PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

There's no real reason the user should care that we're about to fall back to bitbanging, so let's change the message from DRM_INFO to DRM_DEBUG_KMS.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94890

Quoted 21 lines
---
 drivers/gpu/drm/i915/intel_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_i2c.c +2 -2
index 5d4b3604afd2..edeb74c94d88 100644
@@ -571,8 +571,8 @@ clear_err:
 	goto out;
 
 timeout:
-	DRM_INFO("GMBUS [%s] timed out, falling back to bit banging on pin %d\n",
-		 bus->adapter.name, bus->reg0 & 0xff);
+	DRM_DEBUG_KMS("GMBUS [%s] timed out, falling back to bit banging on pin %d\n",
+		      bus->adapter.name, bus->reg0 & 0xff);
 	I915_WRITE(GMBUS0, 0);
 
 	/*
Signature · 1 line
2.4.10
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by
#11 lore raw

Re: [PATCH 4/4] drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS

Quoted 10 lines · Ville Syrjälä
Quoted 7 lines · On Mon, Mar 07, 2016 at 05:57:00PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

There's no real reason the user should care that we're about to fall back to bitbanging, so let's change the message from DRM_INFO to DRM_DEBUG_KMS.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94890

KMS or DRIVER though? GMBUS is now independent of KMS, so probably worth keeping it separate.
-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
#12 lore raw

Re: [PATCH 4/4] drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS

Quoted 8 lines · Chris Wilson
Quoted 7 lines · Ville Syrjälä
Quoted 6 lines · On Mon, Mar 07, 2016 at 05:57:00PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

There's no real reason the user should care that we're about to fall back to bitbanging, so let's change the message from DRM_INFO to DRM_DEBUG_KMS.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94890

KMS or DRIVER though? GMBUS is now independent of KMS, so probably worth keeping it separate.

All the other debug message in the gmbus code are KMS. Keeping to the party line seems best to me.

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#13 lore raw

✗ Fi.CI.BAT: warning for drm/i915: GMBUS fixes and whatnot

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: drm/i915: GMBUS fixes and whatnot
URL : https://patchwork.freedesktop.org/series/4178/
State : warning

== Summary ==

Series 4178v1 drm/i915: GMBUS fixes and whatnot
http://patchwork.freedesktop.org/api/1.0/series/4178/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (hsw-gt2)
                fail       -> PASS       (hsw-brixbox)
        Subgroup basic-plain-flip:
                dmesg-warn -> PASS       (hsw-gt2)
                pass       -> DMESG-WARN (hsw-brixbox)
Test kms_frontbuffer_tracking:
        Subgroup basic:
                pass       -> DMESG-WARN (snb-x220t)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (hsw-brixbox)
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                dmesg-fail -> FAIL       (snb-x220t)
        Subgroup basic-rte:
                dmesg-warn -> PASS       (snb-x220t)
bdw-nuci7        total:183  pass:172  dwarn:0   dfail:0   fail:0   skip:11 
bsw-nuc-2        total:183  pass:149  dwarn:0   dfail:0   fail:0   skip:34 
byt-nuc          total:183  pass:152  dwarn:0   dfail:0   fail:0   skip:31 
hsw-brixbox      total:183  pass:162  dwarn:2   dfail:0   fail:0   skip:19 
hsw-gt2          total:183  pass:169  dwarn:0   dfail:0   fail:0   skip:14 
ivb-t430s        total:183  pass:162  dwarn:0   dfail:0   fail:0   skip:21 
skl-i5k-2        total:183  pass:163  dwarn:0   dfail:0   fail:0   skip:20 
snb-dellxps      total:183  pass:153  dwarn:1   dfail:0   fail:0   skip:29 
snb-x220t        total:183  pass:153  dwarn:1   dfail:0   fail:1   skip:28 

Results at /archive/results/CI_IGT_test/Patchwork_1537/

dd7b01270c8b2048c35b3c336431c50c05a07718 drm-intel-nightly: 2016y-03m-07d-18h-03m-57s UTC integration manifest 52f3fbed204983eeefcfd2e6bcdfd95bcfd6a324 drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS 3a2a906288c099bc6a8ddf81092da3423b6065c9 drm/i915: Restore GMBUS operation after a failed bit-banging fallback 770fe6a15dbf7330b964ddd3db44c6068b607669 drm/i915: Protect force_bit with gmbus_mutex 4aa7bf0b8885ef5bd55280c51bd0d48822d02c2e drm/i915: Actually retry with bit-banging after GMBUS timeout

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

#14 lore raw

Re: ✗ Fi.CI.BAT: warning for drm/i915: GMBUS fixes and whatnot

Quoted 11 lines · Patchwork

== Series Details ==

Series: drm/i915: GMBUS fixes and whatnot
URL : https://patchwork.freedesktop.org/series/4178/
State : warning

== Summary ==

Series 4178v1 drm/i915: GMBUS fixes and whatnot
http://patchwork.freedesktop.org/api/1.0/series/4178/revisions/1/mbox/

Quoted 7 lines

Test kms_flip:

        Subgroup basic-flip-vs-wf_vblank:
                fail       -> PASS       (hsw-gt2)
                fail       -> PASS       (hsw-brixbox)
        Subgroup basic-plain-flip:
                dmesg-warn -> PASS       (hsw-gt2)
                pass       -> DMESG-WARN (hsw-brixbox)
[  276.675359]  [<ffffffffa0193a8c>] hsw_write32+0x1dc/0x270 [i915]
[  276.675387]  [<ffffffffa013cb88>] _ilk_disable_lp_wm+0x98/0xd0 [i915]
Quoted 3 lines

Test kms_frontbuffer_tracking:

        Subgroup basic:
                pass       -> DMESG-WARN (snb-x220t)
[  209.900547]  [<ffffffffa037d0cc>] gen6_write32+0x1dc/0x270 [i915]
[  209.900584]  [<ffffffffa0326b88>] _ilk_disable_lp_wm+0x98/0xd0 [i915]
Quoted 3 lines

Test kms_pipe_crc_basic:

        Subgroup nonblocking-crc-pipe-b:
                pass       -> DMESG-WARN (hsw-brixbox)
[  301.672605]  [<ffffffffa0193acb>] hsw_write32+0x21b/0x270 [i915]
[  301.672614]  [<ffffffffa013cb88>] _ilk_disable_lp_wm+0x98/0xd0 [i915]
Quoted 5 lines
        Subgroup suspend-read-crc-pipe-c:
                dmesg-warn -> PASS       (bsw-nuc-2)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                dmesg-fail -> FAIL       (snb-x220t)

dmesg ping pong

[   89.058704]  [<ffffffffa022a0cc>] gen6_write32+0x1dc/0x270 [i915]
[   89.058777]  [<ffffffffa01d3b88>] _ilk_disable_lp_wm+0x98/0xd0 [i915]

So all are
https://bugs.freedesktop.org/show_bug.cgi?id=94349

Quoted 20 lines
        Subgroup basic-rte:
                dmesg-warn -> PASS       (snb-x220t)
bdw-nuci7        total:183  pass:172  dwarn:0   dfail:0   fail:0   skip:11 
bsw-nuc-2        total:183  pass:149  dwarn:0   dfail:0   fail:0   skip:34 
byt-nuc          total:183  pass:152  dwarn:0   dfail:0   fail:0   skip:31 
hsw-brixbox      total:183  pass:162  dwarn:2   dfail:0   fail:0   skip:19 
hsw-gt2          total:183  pass:169  dwarn:0   dfail:0   fail:0   skip:14 
ivb-t430s        total:183  pass:162  dwarn:0   dfail:0   fail:0   skip:21 
skl-i5k-2        total:183  pass:163  dwarn:0   dfail:0   fail:0   skip:20 
snb-dellxps      total:183  pass:153  dwarn:1   dfail:0   fail:0   skip:29 
snb-x220t        total:183  pass:153  dwarn:1   dfail:0   fail:1   skip:28 

Results at /archive/results/CI_IGT_test/Patchwork_1537/

dd7b01270c8b2048c35b3c336431c50c05a07718 drm-intel-nightly: 2016y-03m-07d-18h-03m-57s UTC integration manifest 52f3fbed204983eeefcfd2e6bcdfd95bcfd6a324 drm/i915: Make GMBUS timeout message DRM_DEBUG_KMS 3a2a906288c099bc6a8ddf81092da3423b6065c9 drm/i915: Restore GMBUS operation after a failed bit-banging fallback 770fe6a15dbf7330b964ddd3db44c6068b607669 drm/i915: Protect force_bit with gmbus_mutex 4aa7bf0b8885ef5bd55280c51bd0d48822d02c2e drm/i915: Actually retry with bit-banging after GMBUS timeout

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx