summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorJocelyn Falempe <jfalempe@redhat.com>2024-06-03 11:47:26 +0200
committerJocelyn Falempe <jfalempe@redhat.com>2024-06-10 13:49:16 +0200
commit24d07f114e4ec7608659a4ef18307f76739c72a8 (patch)
tree29443c35312bcd133802626642a55bd56f9a5fce /include/drm
parenteef5a55af31792fc7a2082dbebac68a7df4d7643 (diff)
downloadlwn-24d07f114e4ec7608659a4ef18307f76739c72a8.tar.gz
lwn-24d07f114e4ec7608659a4ef18307f76739c72a8.zip
drm/panic: Add a set_pixel() callback to drm_scanout_buffer
This allows drivers to draw the pixel, and handle tiling, or specific color formats. v2: * Use fg_color for blit() functions (Javier Martinez Canillas) Signed-off-by: Jocelyn Falempe <jfalempe@redhat.com> Reviewed-by: Javier Martinez Canillas <javierm@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240603095343.39588-3-jfalempe@redhat.com
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_panic.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/drm/drm_panic.h b/include/drm/drm_panic.h
index 822dbb1aa9d6..73bb3f3d9ed9 100644
--- a/include/drm/drm_panic.h
+++ b/include/drm/drm_panic.h
@@ -50,6 +50,15 @@ struct drm_scanout_buffer {
* @pitch: Length in bytes between the start of two consecutive lines.
*/
unsigned int pitch[DRM_FORMAT_MAX_PLANES];
+
+ /**
+ * @set_pixel: Optional function, to set a pixel color on the
+ * framebuffer. It allows to handle special tiling format inside the
+ * driver.
+ */
+ void (*set_pixel)(struct drm_scanout_buffer *sb, unsigned int x,
+ unsigned int y, u32 color);
+
};
/**