• Pavel Pisa's avatar
    imxfb: fast read flag and nonstandard field configurable · 9da505d1
    Pavel Pisa authored
    
    The i.MX frame-buffer read operation should be faster for all configurations
    then drawing each individual character again in response to scroll events.
    
    The nonstandard fields allows to configure frame-buffer special options flags
    for different display configurations by board specific initialization code.
    
    One of such specific options is reversed order of pixels in each individual
    byte.  i.MX frame-buffer seems to be designed for big-endian use first.  The
    byte order is correctly configured for little-endian ordering, but if 1, 2 or
    4 bits per pixel are used, pixels ordering is incompatible to Linux generic
    frame-buffer drawing functions.
    
    The patch "Allow generic BitBLT functions to work with swapped pixel order in
    bytes" introduces required functionality into FBDEV core.  The pixels ordering
    selection has to be enabled at compile time CONFIG_FB_CFB_REV_PIXELS_IN_BYTE
    and for each display configuration which requires it by flag
    FB_NONSTD_REV_PIX_IN_B in "nonstd" field of info structure.
    
    This patch provides way for board specific code to select this option.
    Signed-off-by: default avatarPavel Pisa <pisa@cmp.felk.cvut.cz>
    Signed-off-by: default avatarAntonino Daplas <adaplas@gmail.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    9da505d1
imxfb.h 646 Bytes
/*
 * This structure describes the machine which we are running on.
 */
struct imxfb_mach_info {
	u_long		pixclock;

	u_short		xres;
	u_short		yres;

	u_int		nonstd;
	u_char		bpp;
	u_char		hsync_len;
	u_char		left_margin;
	u_char		right_margin;

	u_char		vsync_len;
	u_char		upper_margin;
	u_char		lower_margin;
	u_char		sync;

	u_int		cmap_greyscale:1,
			cmap_inverse:1,
			cmap_static:1,
			unused:29;

	u_int		pcr;
	u_int		pwmr;
	u_int		lscr1;
	u_int		dmacr;

	u_char * fixed_screen_cpu;
	dma_addr_t fixed_screen_dma;

	void (*lcd_power)(int);
	void (*backlight_power)(int);
};
void set_imx_fb_info(struct imxfb_mach_info *hard_imx_fb_info);