Skip to contentSkip to conversation

drm/i915: Don't complain when there is no workaround.

PATCH In review Rodrigo Vivi 6 participants 6 messages Dec 17, 2014 – Dec 18, 2014

Subsystems (2)
lore
Share & tools
lore

Rodrigo Vivi

author maintainer
#0 lore raw

PATCH 1/1 drm/i915: Don't complain when there is no workaround.

When we don't have any workaround to emit we should celebrate, not bother.

---
 drivers/gpu/drm/i915/intel_lrc.c        | 2 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 7670a0f..0bb50f6 100644
@@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_workarounds *w = &dev_priv->workarounds;
 
-	if (WARN_ON_ONCE(w->count == 0))
+	if (w->count == 0)
 		return 0;
 
 	ring->gpu_caches_dirty = true;
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
index 12a36f0..3d99bb1 100644
@@ -682,7 +682,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_workarounds *w = &dev_priv->workarounds;
 
-	if (WARN_ON_ONCE(w->count == 0))
+	if (w->count == 0)
 		return 0;
 
 	ring->gpu_caches_dirty = true;
Signature · 6 lines
1.9.3

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

-------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 364/364 364/364
ILK +1-3 364/366 362/366
SNB -1 448/450 447/450

IVB                                  497/498              497/498
BYT                                  289/289              289/289
HSW                                  563/564              563/564
BDW                                  416/417              416/417
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 ILK  igt_kms_flip_bcs-flip-vs-modeset-interruptible      DMESG_WARN(1, M26)PASS(3, M37M26)      PASS(1, M26)
*ILK  igt_kms_flip_busy-flip-interruptible      PASS(2, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_flip_wf_vblank-ts-check      PASS(2, M26)      DMESG_WARN(1, M26)
*ILK  igt_kms_flip_wf_vblank-vs-modeset-interruptible      PASS(2, M26)      DMESG_WARN(1, M26)
*SNB  igt_gem_concurrent_blit_gtt-rcs-early-read-forked      PASS(2, M35M22)      FAIL(1, M22)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#2 lore raw
In reply to Rodrigo Vivi
Quoted 1 line · Rodrigo Vivi

When we don't have any workaround to emit we should celebrate, not bother.

Well except that on the platforms where this fires we really should have some, most likely. This is in a way similar to all the other WARN_ON cases we have to make sure nothing gets lost in platform enabling. -Daniel

Quoted 40 lines
---
 drivers/gpu/drm/i915/intel_lrc.c        | 2 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 7670a0f..0bb50f6 100644
@@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_workarounds *w = &dev_priv->workarounds;
 
-	if (WARN_ON_ONCE(w->count == 0))
+	if (w->count == 0)
 		return 0;
 
 	ring->gpu_caches_dirty = true;
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
index 12a36f0..3d99bb1 100644
@@ -682,7 +682,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_workarounds *w = &dev_priv->workarounds;
 
-	if (WARN_ON_ONCE(w->count == 0))
+	if (w->count == 0)
 		return 0;
 
 	ring->gpu_caches_dirty = true;
Signature · 6 lines
1.9.3

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi

When we don't have any workaround to emit we should celebrate, not bother.

Well except that on the platforms where this fires we really should have some, most likely. This is in a way similar to all the other WARN_ON cases we have to make sure nothing gets lost in platform enabling. -Daniel

You could have a convention that

	(count == 0)
means "I haven't filled this in yet" (and generates a warning), whereas
	(count == I915_NO_WORKAROUNDS_REQUIRED)

(which can be defined as (~0)) means "I haven't forgotten, there really aren't any workarounds" and suppresses the warning.

Of course, any /other/ value > I915_MAX_WA_REGS should definitely give a warning, preferably at compile time!

.Dave

Quoted 32 lines
Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_lrc.c        | 2 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 7670a0f..0bb50f6 100644
@@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_workarounds *w = &dev_priv->workarounds;
 
-	if (WARN_ON_ONCE(w->count == 0))
+	if (w->count == 0)
 		return 0;
 
 	ring->gpu_caches_dirty = true;
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
index 12a36f0..3d99bb1 100644
@@ -682,7 +682,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_workarounds *w = &dev_priv->workarounds;
 
-	if (WARN_ON_ONCE(w->count == 0))
+	if (w->count == 0)
 		return 0;
 
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -0
 	ring->gpu_caches_dirty = true;
Signature · 6 lines
1.9.3

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

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

#4 lore raw

Yeah, but Skylake is running and we didn't need any W/A here yet. The warning is just disturbing dmesg with 3 ops and not forcing uns to hunt for missing workarouinds.

We add W/A based on specific needs, not based on counts.

Quoted 67 lines · Dave Gordon
Quoted 7 lines · Daniel Vetter
Quoted 1 line · Rodrigo Vivi

When we don't have any workaround to emit we should celebrate, not bother.

Well except that on the platforms where this fires we really should have some, most likely. This is in a way similar to all the other WARN_ON cases we have to make sure nothing gets lost in platform enabling. -Daniel

You could have a convention that

        (count == 0)
means "I haven't filled this in yet" (and generates a warning), whereas
        (count == I915_NO_WORKAROUNDS_REQUIRED)

(which can be defined as (~0)) means "I haven't forgotten, there really aren't any workarounds" and suppresses the warning.

Of course, any /other/ value > I915_MAX_WA_REGS should definitely give a warning, preferably at compile time!

.Dave

Quoted 32 lines
Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_lrc.c        | 2 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 7670a0f..0bb50f6 100644
@@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
     struct drm_i915_private *dev_priv = dev->dev_private;
     struct i915_workarounds *w = &dev_priv->workarounds;
 
-    if (WARN_ON_ONCE(w->count == 0))
+    if (w->count == 0)
             return 0;
 
     ring->gpu_caches_dirty = true;
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
index 12a36f0..3d99bb1 100644
@@ -682,7 +682,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
     struct drm_i915_private *dev_priv = dev->dev_private;
     struct i915_workarounds *w = &dev_priv->workarounds;
 
-    if (WARN_ON_ONCE(w->count == 0))
+    if (w->count == 0)
             return 0;
 
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -1
     ring->gpu_caches_dirty = true;
--

1.9.3

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

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

Signature · 6 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw
Quoted 5 lines · Rodrigo Vivi

Yeah, but Skylake is running and we didn't need any W/A here yet. The warning is just disturbing dmesg with 3 ops and not forcing uns to hunt for missing workarouinds.

We add W/A based on specific needs, not based on counts.

I can immediately see two w/as in gen9_init_clock_gating() that need to be moved over to the new way of doing things.

Quoted 79 lines · Dave Gordon
Quoted 67 lines · Daniel Vetter
Quoted 7 lines · Rodrigo Vivi
Quoted 1 line

When we don't have any workaround to emit we should celebrate, not bother.

Well except that on the platforms where this fires we really should have some, most likely. This is in a way similar to all the other WARN_ON cases we have to make sure nothing gets lost in platform enabling. -Daniel

You could have a convention that

        (count == 0)
means "I haven't filled this in yet" (and generates a warning), whereas
        (count == I915_NO_WORKAROUNDS_REQUIRED)

(which can be defined as (~0)) means "I haven't forgotten, there really aren't any workarounds" and suppresses the warning.

Of course, any /other/ value > I915_MAX_WA_REGS should definitely give a warning, preferably at compile time!

.Dave

Quoted 32 lines
Quoted 32 lines
---
 drivers/gpu/drm/i915/intel_lrc.c        | 2 +-
 drivers/gpu/drm/i915/intel_ringbuffer.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +1 -1
index 7670a0f..0bb50f6 100644
@@ -1096,7 +1096,7 @@ static int intel_logical_ring_workarounds_emit(struct intel_engine_cs *ring,
     struct drm_i915_private *dev_priv = dev->dev_private;
     struct i915_workarounds *w = &dev_priv->workarounds;
 
-    if (WARN_ON_ONCE(w->count == 0))
+    if (w->count == 0)
             return 0;
 
     ring->gpu_caches_dirty = true;
drivers/gpu/drm/i915/intel_ringbuffer.c +1 -1
index 12a36f0..3d99bb1 100644
@@ -682,7 +682,7 @@ static int intel_ring_workarounds_emit(struct intel_engine_cs *ring,
     struct drm_i915_private *dev_priv = dev->dev_private;
     struct i915_workarounds *w = &dev_priv->workarounds;
 
-    if (WARN_ON_ONCE(w->count == 0))
+    if (w->count == 0)
             return 0;
 
Quoted 9 lines
Quoted 8 lines
drivers/gpu/drm/i915/intel_ringbuffer.c +0 -1
     ring->gpu_caches_dirty = true;
--

1.9.3

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

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

Signature · 6 lines
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx