[PATCH driver/vesa] Ask BIOS about the current DAC depth

Egbert Eich eich at freedesktop.org
Wed Jul 31 06:56:46 PDT 2013


On Wed, Jul 31, 2013 at 12:15:47PM +0200, walter harms wrote:
> 
> 
> Am 31.07.2013 11:37, schrieb Egbert Eich:
> > xf86HandleColormaps() needs to know the RAMDAC depth.
> > Ask BIOS about its current value if BIOS has indicated
> > that RAMDAC supports 8-bit.
> > 
> > Signed-off-by: Egbert Eich <eich at freedesktop.org>
> > ---
> >  src/vesa.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/src/vesa.c b/src/vesa.c
> > index 8de1983..93b4909 100644
> > --- a/src/vesa.c
> > +++ b/src/vesa.c
> > @@ -1096,7 +1096,8 @@ VESAScreenInit(SCREEN_INIT_ARGS_DECL)
> >      flags = CMAP_RELOAD_ON_MODE_SWITCH;
> >  
> >      if(!xf86HandleColormaps(pScreen, 256,
> > -	pVesa->vbeInfo->Capabilities[0] & 0x01 ? 8 : 6,
> > +			    (pVesa->vbeInfo->Capabilities[0] & 0x01 
> > +			     && VBESetGetDACPaletteFormat(pVesa->pVbe, 0) == 8) ? 8 : 6,
> >  	VESALoadPalette, NULL, flags))
> 
> I would suggest to use the opportunity to make that more readable.
> 

That's true - on the other hand I see problems with this 
patch - it will return 6 in almost all cases as this should
be the initial default set by the BIOS.
The issue seen should be fixed differently - unfortunately I
no longer remember which hardware exhibited this.

So let's drop this patch for now.

Cheers,
	Egbert.




More information about the xorg-devel mailing list