Skip to contentSkip to conversation

drm/amdgpu/dc: Use WARN_ON_ONCE for ASSERT

PATCH Applied Michel Dänzer 2 participants 4 messages Apr 29, 2020 – Apr 30, 2020

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

PATCH 1/1 drm/amdgpu/dc: Use WARN_ON_ONCE for ASSERT

From: Michel Dänzer <[email protected]>

Once should generally be enough for diagnosing what lead up to it, repeating it over and over can be pretty annoying.

---
 drivers/gpu/drm/amd/display/dc/os_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/os_types.h +1 -1
index c34eba19860a32..6d7bca562eec00 100644
@@ -108,7 +108,7 @@
 #define ASSERT(expr) ASSERT_CRITICAL(expr)
 
 #else
-#define ASSERT(expr) WARN_ON(!(expr))
+#define ASSERT(expr) WARN_ON_ONCE(!(expr))
 #endif
 
 #define BREAK_TO_DEBUGGER() ASSERT(0)
Signature · 6 lines
2.26.2

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Applied
#1 lore raw
Quoted 7 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

Once should generally be enough for diagnosing what lead up to it, repeating it over and over can be pretty annoying.

Applied. Thanks!

Alex

Quoted 20 lines
---
 drivers/gpu/drm/amd/display/dc/os_types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/os_types.h +1 -2
index c34eba19860a32..6d7bca562eec00 100644
@@ -108,7 +108,7 @@
 #define ASSERT(expr) ASSERT_CRITICAL(expr)
 
 #else
-#define ASSERT(expr) WARN_ON(!(expr))
+#define ASSERT(expr) WARN_ON_ONCE(!(expr))
 #endif
 
 #define BREAK_TO_DEBUGGER() ASSERT(0)
--

2.26.2

Quoted 4 lines

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

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

#2 lore raw
Quoted 10 lines · Alex Deucher
Quoted 7 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

Once should generally be enough for diagnosing what lead up to it, repeating it over and over can be pretty annoying.

Applied. Thanks!

Thank you.

BTW, it might be better to merge this for 5.7 final, since
https://gitlab.freedesktop.org/drm/amd/-/issues/912 is easy to hit with 5.7 and can be very noisy with WARN_ON.

Signature · 6 lines
Earthling Michel Dänzer               |               https://redhat.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#3 lore raw
Quoted 11 lines · Michel Dänzer
Quoted 9 lines · Alex Deucher
Quoted 7 lines · Michel Dänzer

From: Michel Dänzer <[email protected]>

Once should generally be enough for diagnosing what lead up to it, repeating it over and over can be pretty annoying.

Quoted 7 lines
Quoted 1 line

Applied. Thanks!

Thank you.

BTW, it might be better to merge this for 5.7 final, since
https://gitlab.freedesktop.org/drm/amd/-/issues/912 is easy to hit with 5.7 and can be very noisy with WARN_ON.

Yeah, I plan to apply it for 5.7.

Alex

Quoted 5 lines

--
Earthling Michel Dänzer | https://redhat.com
Libre software enthusiast | Mesa and X developer

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