diff mbox series

[v2,2/3] drm/panic: add a private pointer to struct drm_scanout_buffer

Message ID 20240906100434.1171093-3-jfalempe@redhat.com (mailing list archive)
State New, archived
Headers show
Series drm/nouveau: Add drm_panic support for nv50+ | expand

Commit Message

Jocelyn Falempe Sept. 6, 2024, 10:03 a.m. UTC
It can be set to a private structure in get_scanout_buffer(), and
used later in set_pixel() or in panic_flush().

Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com>
---
 include/drm/drm_panic.h | 7 +++++++
 1 file changed, 7 insertions(+)
diff mbox series

Patch

diff --git a/include/drm/drm_panic.h b/include/drm/drm_panic.h
index 54085d5d05c3..afdbb27ead67 100644
--- a/include/drm/drm_panic.h
+++ b/include/drm/drm_panic.h
@@ -54,6 +54,13 @@  struct drm_scanout_buffer {
 	 */
 	unsigned int pitch[DRM_FORMAT_MAX_PLANES];
 
+	/**
+	 * @private: Optional pointer to some private data you want to pass to
+	 * the set_pixel() or panic_flush() function. It must stay valid between
+	 * the get_scanout_buffer() call and the panic_flush() call.
+	 */
+	void *private;
+
 	/**
 	 * @set_pixel: Optional function, to set a pixel color on the
 	 * framebuffer. It allows to handle special tiling format inside the