fbdev: add FBIOCOPYAREA ioctl

Based on the patch authored by Ali Gholami Rudi at
    https://lkml.org/lkml/2009/7/13/153

Provide an ioctl for userspace applications, but only if this operation
is hardware accelerated (otherwide it does not make any sense).

Signed-off-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>

bcm2708_fb: Add ioctl for reading gpu memory through dma
This commit is contained in:
Siarhei Siamashka
2013-06-17 13:32:11 +03:00
committed by popcornmix
parent b49343fd70
commit ebdb63cf6b
3 changed files with 166 additions and 1 deletions

View File

@@ -35,6 +35,12 @@
#define FBIOPUT_MODEINFO 0x4617
#define FBIOGET_DISPINFO 0x4618
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, __u32)
/*
* HACK: use 'z' in order not to clash with any other ioctl numbers which might
* be concurrently added to the mainline kernel
*/
#define FBIOCOPYAREA _IOW('z', 0x21, struct fb_copyarea)
#define FBIODMACOPY _IOW('z', 0x22, struct fb_dmacopy)
#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
#define FB_TYPE_PLANES 1 /* Non interleaved planes */
@@ -347,6 +353,12 @@ struct fb_copyarea {
__u32 sy;
};
struct fb_dmacopy {
void *dst;
__u32 src;
__u32 length;
};
struct fb_fillrect {
__u32 dx; /* screen-relative */
__u32 dy;