Hi Matthew,

thanks for following up on this.

Sottek, Matthew J writes:
 > Egbert,
 >   Actually... I'm thinking there is a problem with this way too. We need
 > another "if" in there. i.e.
 > 
 > if((tv is on) && (vbios left a set of TV timings for us)) {
 >    use TV regs;
 > } else {
 >    use crt regs;
 > }
 > 
 > Otherwise we might end up using the TV timings even when the display is not
 > on
 > the TV (depending on what the vbios does when using CRT in a system that has
 > a TV controller).


Yes, I suspected something like this. 

 > 
 > Check the LCDTV_C register (offset 0x60018) bit 31. If it is set then
 > the TV is in use. So try this one:
 > 
 > File : xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
 >    Somewhere near line 1522
 >  
 > 
 >     unsigned int lcdtv_c=0;
 >     unsigned int tv_htotal=0;
 >  
 >     /* OVRACT Register */
 >     lcdtv_c = INREG(0x60018);
 >     tv_htotal = INREG(0x60000);
 > 
 >     if((lcdtv_c & 0x80000000) && (tv_htotal)) {
 >       i810Reg->OverlayActiveStart = (temp>>16) - 31; 
 >       i810Reg->OverlayActiveEnd = (temp & 0x3ff) - 31; 
 >     } else {
 >       i810Reg->OverlayActiveStart = mode->CrtcHTotal - 32; 
 >       i810Reg->OverlayActiveEnd = mode->CrtcHDisplay - 32; 
 >     }
 > 
 > 

We may need more changes than that.

It is still not clear to me if the change in
the OverlayActiveStart and OverlayActiveEnd settings
will do on an LCD. 
In the end we are just reducing the ActiveStart and
ActiveEnd registers by 31. I don't see why we need to
do this.
Also we read out the values in SetMode. When this function
gets called the values of these regsiters may not be the
original ones set by the BIOS any more as SetMode()
may be called several times.
We need to grab the value in PreInit() - or if the
BIOS may change them behind our back - save and compare
the value we have set and refresh it in case it has
changed.
However I won't implement this until I understand better
why we have to touch these values in the first place.

Sebastien, could you please check what happens when these
these values are left the way the BIOS set them?

Regards,
        Egbert.
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to