summary refs log tree commit diff
path: root/include/drm
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2021-11-10 11:36:54 +0100
committerThomas Zimmermann <tzimmermann@suse.de>2021-11-11 12:06:57 +0100
commit452290f354f04fca53cba810bd241f4307502f1e (patch)
treeab62669fb391955b49bf52a083d9318dfa5b772f /include/drm
parent396d9b9a48723995416a05f0dab80c1dd6c21e80 (diff)
downloadlinux-452290f354f04fca53cba810bd241f4307502f1e.tar.gz
drm/format-helper: Export drm_fb_clip_offset()
Provide a function that computes the offset into a blit destination
buffer. This will allow to move destination-buffer clipping into the
format-helper callers.

v4:
	* add missing '@' for parameter documentation
	* fix typo 'frambuffer'
v2:
	* provide documentation (Sam)
	* return 'unsigned int' (Sam, Noralf)

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20211110103702.374-2-tzimmermann@suse.de
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_format_helper.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/drm/drm_format_helper.h b/include/drm/drm_format_helper.h
index e86925cf07b9..f5a8b334b18d 100644
--- a/include/drm/drm_format_helper.h
+++ b/include/drm/drm_format_helper.h
@@ -6,9 +6,13 @@
 #ifndef __LINUX_DRM_FORMAT_HELPER_H
 #define __LINUX_DRM_FORMAT_HELPER_H
 
+struct drm_format_info;
 struct drm_framebuffer;
 struct drm_rect;
 
+unsigned int drm_fb_clip_offset(unsigned int pitch, const struct drm_format_info *format,
+				const struct drm_rect *clip);
+
 void drm_fb_memcpy(void *dst, void *vaddr, struct drm_framebuffer *fb,
 		   struct drm_rect *clip);
 void drm_fb_memcpy_dstclip(void __iomem *dst, unsigned int dst_pitch, void *vaddr,