struct fb_cmap_user {
__u32 start; /* First entry */
__u32 len; /* Number of entries */
__u16 __user *red; /* Red values */
__u16 __user *green;
__u16 __user *blue;
__u16 __user *transp; /* transparency, can be NULL */
};
struct fb_image_user {
__u32 dx; /* Where to place image */
__u32 dy;
__u32 width; /* Size of image */
__u32 height;
__u32 fg_color; /* Only used when a mono bitmap */
__u32 bg_color;
__u8 depth; /* Depth of the image */ constchar __user *data; /* Pointer to image data */ struct fb_cmap_user cmap; /* color map info */
};
#define FB_PIXMAP_DEFAULT 1/* used internally by fbcon */ #define FB_PIXMAP_SYSTEM 2/* memory is in system RAM */ #define FB_PIXMAP_IO 4/* memory is iomapped */ #define FB_PIXMAP_SYNC 256/* set if GPU can DMA */
struct fb_pixmap {
u8 *addr; /* pointer to memory */
u32 size; /* size of buffer in bytes */
u32 offset; /* current offset to buffer */
u32 buf_align; /* byte alignment of each bitmap */
u32 scan_align; /* alignment per scanline */
u32 access_align; /* alignment per read/write (bits) */
u32 flags; /* see FB_PIXMAP_* */ /* supported bit block dimensions */ /* Format: test_bit(width - 1, blit_x) */ /* test_bit(height - 1, blit_y) */ /* if zero, will be set to full (all) */
DECLARE_BITMAP(blit_x, FB_MAX_BLIT_WIDTH);
DECLARE_BITMAP(blit_y, FB_MAX_BLIT_HEIGHT); /* access methods */ void (*writeio)(struct fb_info *info, void __iomem *dst, void *src, unsignedint size); void (*readio) (struct fb_info *info, void *dst, void __iomem *src, unsignedint size);
};
struct fb_ops { /* open/release and usage marking */ struct module *owner; int (*fb_open)(struct fb_info *info, int user); int (*fb_release)(struct fb_info *info, int user);
/* For framebuffers with strange non linear layouts or that do not *workwithnormalmemorymappedaccess
*/
ssize_t (*fb_read)(struct fb_info *info, char __user *buf,
size_t count, loff_t *ppos);
ssize_t (*fb_write)(struct fb_info *info, constchar __user *buf,
size_t count, loff_t *ppos);
/* checks var and eventually tweaks it to something supported,
* DO NOT MODIFY PAR */ int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info);
/* set the video mode according to info->var */ int (*fb_set_par)(struct fb_info *info);
/* set color register */ int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info);
/* set color registers in batch */ int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info);
/* blank display */ int (*fb_blank)(int blank, struct fb_info *info);
/* pan display */ int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info);
/* Draws a rectangle */ void (*fb_fillrect) (struct fb_info *info, conststruct fb_fillrect *rect); /* Copy data from area to another */ void (*fb_copyarea) (struct fb_info *info, conststruct fb_copyarea *region); /* Draws a image to the display */ void (*fb_imageblit) (struct fb_info *info, conststruct fb_image *image);
/* Draws cursor */ int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor);
/* wait for blit idle, optional */ int (*fb_sync)(struct fb_info *info);
/* perform fb specific ioctl (optional) */ int (*fb_ioctl)(struct fb_info *info, unsignedint cmd, unsignedlong arg);
/* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct vm_area_struct *vma);
/* get capability given var */ void (*fb_get_caps)(struct fb_info *info, struct fb_blit_caps *caps, struct fb_var_screeninfo *var);
/* teardown any resources to do with this framebuffer */ void (*fb_destroy)(struct fb_info *info);
/* called at KDB enter and leave time to prepare the console */ int (*fb_debug_enter)(struct fb_info *info); int (*fb_debug_leave)(struct fb_info *info);
};
struct fb_tilemap {
__u32 width; /* width of each tile in pixels */
__u32 height; /* height of each tile in scanlines */
__u32 depth; /* color depth of each tile */
__u32 length; /* number of tiles in the map */ const __u8 *data; /* actual tile map: a bitmap array, packed
to the nearest byte */
};
struct fb_tilerect {
__u32 sx; /* origin in the x-axis */
__u32 sy; /* origin in the y-axis */
__u32 width; /* number of tiles in the x-axis */
__u32 height; /* number of tiles in the y-axis */
__u32 index; /* what tile to use: index to tile map */
__u32 fg; /* foreground color */
__u32 bg; /* background color */
__u32 rop; /* raster operation */
};
struct fb_tilearea {
__u32 sx; /* source origin in the x-axis */
__u32 sy; /* source origin in the y-axis */
__u32 dx; /* destination origin in the x-axis */
__u32 dy; /* destination origin in the y-axis */
__u32 width; /* number of tiles in the x-axis */
__u32 height; /* number of tiles in the y-axis */
};
struct fb_tileblit {
__u32 sx; /* origin in the x-axis */
__u32 sy; /* origin in the y-axis */
__u32 width; /* number of tiles in the x-axis */
__u32 height; /* number of tiles in the y-axis */
__u32 fg; /* foreground color */
__u32 bg; /* background color */
__u32 length; /* number of tiles to draw */
__u32 *indices; /* array of indices to tile map */
};
struct fb_tilecursor {
__u32 sx; /* cursor position in the x-axis */
__u32 sy; /* cursor position in the y-axis */
__u32 mode; /* 0 = erase, 1 = draw */
__u32 shape; /* see FB_TILE_CURSOR_* */
__u32 fg; /* foreground color */
__u32 bg; /* background color */
};
/* all dimensions from hereon are in terms of tiles */
/* move a rectangular region of tiles from one area to another*/ void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area); /* fill a rectangular region with a tile */ void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect); /* copy an array of tiles */ void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit); /* cursor */ void (*fb_tilecursor)(struct fb_info *info, struct fb_tilecursor *cursor); /* get maximum length of the tile map */ int (*fb_get_tilemax)(struct fb_info *info);
}; #endif/* CONFIG_FB_TILEBLITTING */
/* FBINFO_* = fb_info.flags bit flags */ #define FBINFO_HWACCEL_DISABLED 0x0002 /* When FBINFO_HWACCEL_DISABLED is set: *Hardwareaccelerationisturnedoff.Softwareimplementations *ofrequiredfunctions(copyarea(),fillrect(),andimageblit())
* takes over; acceleration engine should be in a quiescent state */
/* hints */ #define FBINFO_VIRTFB 0x0004 /* FB is System RAM, not device. */ #define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */ #define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */
/* hardware supported ops */ /* semantics: when a bit is set, it indicates that the operation is *acceleratedbyhardware. *requiredfunctionswillstillworkevenifthebitisnotset. *optionalfunctionsmaynotevenexistiftheflagbitisnotset.
*/ #define FBINFO_HWACCEL_NONE 0x0000 #define FBINFO_HWACCEL_COPYAREA 0x0100 /* required */ #define FBINFO_HWACCEL_FILLRECT 0x0200 /* required */ #define FBINFO_HWACCEL_IMAGEBLIT 0x0400 /* required */ #define FBINFO_HWACCEL_ROTATE 0x0800 /* optional */ #define FBINFO_HWACCEL_XPAN 0x1000 /* optional */ #define FBINFO_HWACCEL_YPAN 0x2000 /* optional */ #define FBINFO_HWACCEL_YWRAP 0x4000 /* optional */
#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */
/* A driver may set this flag to indicate that it does want a set_par to be *calledeverytimewhenfbcon_switchisexecuted.Theadvantageisthatwith *thisflagsetyoucanreallybesurethatset_parisalwayscalledbefore *anyofthefunctionsdependentonthecorrecthardwarestateoraltering *thatstate,evenifyouareusingsomebrokenXreleases.Thedisadvantage *isthatitintroducesunwanteddelaystoeveryconsoleswitchifset_par *isslow.Itisagoodideatotrythisflaginthedriversinitialization *codewheneverthereisabugreportrelatedtoswitchingbetweenXandthe *framebufferconsole.
*/ #define FBINFO_MISC_ALWAYS_SETPAR 0x40000
conststruct fb_ops *fbops; struct device *device; /* This is the parent */ #ifdefined(CONFIG_FB_DEVICE) struct device *dev; /* This is this fb device */ #endif int class_flag; /* private sysfs flags */ #ifdef CONFIG_FB_TILEBLITTING struct fb_tile_ops *tileops; /* Tile Blitting */ #endif union { char __iomem *screen_base; /* Virtual address */ char *screen_buffer;
}; unsignedlong screen_size; /* Amount of ioremapped VRAM or 0 */ void *pseudo_palette; /* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING 0 #define FBINFO_STATE_SUSPENDED 1
u32 state; /* Hardware state i.e suspend */ void *fbcon_par; /* fbcon use-only private area */ /* From here on everything is device dependent */ void *par;
bool skip_vt_switch; /* no VT switch on suspend/resume required */ bool skip_panic; /* Do not write to the fb after a panic */
};
/* This will go away *fbsetcurrentlyhacksinFB_ACCELF_TEXTintovar.accel_flags *whenitwantstoturntheaccelerationengineon.Thisis *reallyaseparateoperation,andshouldbemodifiedviasysfs. *Butfornow,weleaveitbrokenwiththefollowingdefine
*/ #define STUPID_ACCELF_TEXT_SHIT
for (i = height; i--; ) { /* s_pitch is a few bytes at the most, memcpy is suboptimal */ for (j = 0; j < s_pitch; j++)
*dst++ = *src++;
dst += d_pitch;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.