Re: [AD] 'teensy little change' to fbcon.c fixes allegro-4.0.3 to work on my stupid platform

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> (I haven't hacked around the fbcon code, so I'm not sure what line_length
> and xres_virtual actually mean, but I have a sense it might be related
> to FB res smaller than actual screen res ?))

'line_length' is the length of a scanline as directly reported by the FB 
driver. Quoted from /usr/include/linux/fb.h:

struct fb_fix_screeninfo {
	char id[16];			/* identification string eg "TT Builtin" */
	unsigned long smem_start;	/* Start of frame buffer mem */
					/* (physical address) */
	__u32 smem_len;			/* Length of frame buffer mem */
	__u32 type;			/* see FB_TYPE_*		*/
	__u32 type_aux;			/* Interleave for interleaved Planes */
	__u32 visual;			/* see FB_VISUAL_*		*/ 
	__u16 xpanstep;			/* zero if no hardware panning  */
	__u16 ypanstep;			/* zero if no hardware panning  */
	__u16 ywrapstep;		/* zero if no hardware ywrap    */
	__u32 line_length;		/* length of a line in bytes    */
	unsigned long mmio_start;	/* Start of Memory Mapped I/O   */
					/* (physical address) */
	__u32 mmio_len;			/* Length of Memory Mapped I/O  */
	__u32 accel;			/* Type of acceleration available */
	__u16 reserved[3];		/* Reserved for future compatibility */
};

'stride' is used by Allegro to build the array of pointers to the beginning 
of scanlines. I think 'line_length' is far more reliable for this purpose 
than 'xres_virtual' from:

struct fb_var_screeninfo {
	__u32 xres;			/* visible resolution		*/
	__u32 yres;
	__u32 xres_virtual;		/* virtual resolution		*/
	__u32 yres_virtual;
	__u32 xoffset;			/* offset from virtual to visible */
	__u32 yoffset;			/* resolution			*/

	__u32 bits_per_pixel;		/* guess what			*/
        ...
};

-- 
Eric Botcazou




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/