summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/include/nvif/printf.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2022-07-27 10:11:59 +1000
committerDave Airlie <airlied@redhat.com>2022-07-27 11:34:07 +1000
commit2bc7ea71a73747a77e7f83bc085b0d2393235410 (patch)
tree3074dccd252f2adce56a8234d1a539e412366484 /drivers/gpu/drm/nouveau/include/nvif/printf.h
parentee8b1ef9a6b089abf7a9c7d094b6e93fa05f15b9 (diff)
parentdfc4005f8c172eea359f9db08c3b2b0ff0153699 (diff)
Merge tag 'topic/nouveau-misc-2022-07-27' of git://anongit.freedesktop.org/drm/drm into drm-next
drm/nouveau-misc: display patches. These are just some precursor and cleanup display patches from Ben, tested by Lyude. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Dave Airlie <airlied@gmail.com> Link: https://patchwork.freedesktop.org/patch/msgid/CAPM=9ty0R37q0mohBr_CegpYLXK2=fAH54QfAsMhHfPygTsdQA@mail.gmail.com
Diffstat (limited to 'drivers/gpu/drm/nouveau/include/nvif/printf.h')
-rw-r--r--drivers/gpu/drm/nouveau/include/nvif/printf.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvif/printf.h b/drivers/gpu/drm/nouveau/include/nvif/printf.h
index 6c299ec6be21..ec524b2faeae 100644
--- a/drivers/gpu/drm/nouveau/include/nvif/printf.h
+++ b/drivers/gpu/drm/nouveau/include/nvif/printf.h
@@ -17,4 +17,13 @@
#endif
#define NVIF_ERROR(o,f,a...) NVIF_PRINT(errorf, (o), f, ##a)
+#define NVIF_ERRON(c,o,f,a...) do { \
+ struct nvif_object *_object = (o); \
+ int _cond = (c); \
+ if (_cond) { \
+ NVIF_ERROR(_object, f" (ret:%d)", ##a, _cond); \
+ } else { \
+ NVIF_DEBUG(_object, f, ##a); \
+ } \
+} while(0)
#endif