Merge tag 'drm-next-2022-08-03' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / drivers / gpu / drm / nouveau / include / nvif / printf.h
index 6c299ec..ec524b2 100644 (file)
 #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