From: Petr V. <VAN...@vc...> - 2001-01-17 20:24:32
|
On 17 Jan 01 at 12:11, James Simmons wrote: > Okay. This answered my previous question. It pretty much comes down to > choosing between xxxfb_setcolreg or xxxfb_set_cmap. Their are pros and > cons to having each: > > xxxfb_setcolreg > PRO: can change a individual register without having to monkey > with the entire CLUT. > > CONS: Hardware designs. Some hardware require vsync when changing > the color palette. > > xxxfb_set_cmap > PRO: More flexiable with bizarre hardware. Also works nice with > hardware that has more than one CLUT. In this case we can > cache a bunch of color maps and switch the index around. > > CONS: Can't change a subset of teh CLUT table easily. Adding 'CMAP_FIRST' and 'CMAP_MORE' bits as additional setcolreg argument? And set CMAP_FIRST for first entry of cmap, and CMAP_MORE if it is not last entry? So VGA could do: if (flags & CMAP_FIRST) { outb(reg, 0x3C8); } outb(red, 0x3C9); outb(green, 0x3C9); outb(blue, 0x3C9); I have no idea whether someone really needs CMAP_MORE. Maybe if you must enable legacy VGA I/O region for doing palette changes... Or if you must switch DAC back to 6bit mode for legacy apps. Best regards, Petr Vandrovec van...@vc... |