[PATCH v10 01/10] drm/panic: Add a private field to struct drm_scanout_buffer
From: Jocelyn Falempe
Date: Wed Jun 18 2025 - 05:41:19 EST
This allows driver to set some private data in get_scanout_buffer(),
and re-use them in set_pixel() callback.
Signed-off-by: Jocelyn Falempe <jfalempe@xxxxxxxxxx>
---
v10:
* Added in v10, to avoid static variables
include/drm/drm_panic.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/include/drm/drm_panic.h b/include/drm/drm_panic.h
index 310c88c4d336..ac0e46b73436 100644
--- a/include/drm/drm_panic.h
+++ b/include/drm/drm_panic.h
@@ -72,6 +72,12 @@ struct drm_scanout_buffer {
void (*set_pixel)(struct drm_scanout_buffer *sb, unsigned int x,
unsigned int y, u32 color);
+ /**
+ * @private: private pointer that you can use in the callbacks
+ * set_pixel()
+ */
+ void *private;
+
};
#ifdef CONFIG_DRM_PANIC
--
2.49.0