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).

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; 
    }


-----Original Message-----
From: Egbert Eich [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 15, 2002 10:44 AM
To: [EMAIL PROTECTED]
Subject: RE: [Xpert]!! Correction for i810 driver !!


Sottek, Matthew J writes:
 > Actually...
 >   I am not sure that reg 0x60000 will be set in all cases. I may only be
 > programmed if there is a TVout controller present in the system. Doing
 > it this way is safer. Maybe someone looking for a task can make a diff
out
 > of this and submit it to the patches list?

I've checked with the docs and it looks like this patch may be 
correct. I'll test it in my i810 and submit it if I don't see
any side effects.

Thanks to both Sebastien and matt!

Regards,
        Egbert.

 > 
 > -Matt
 > 
 > 
 > File : xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
 >   Somewhere near line 1522
 > 
 > 
 >   unsigned int temp=0;
 > 
 >    /* OVRACT Register */
 >    temp = INREG(0x60000);
 >    if(temp) {
 >      i810Reg->OverlayActiveStart = (temp>>16) - 31; 
 >      i810Reg->OverlayActiveEnd = (temp & 0x3ff) - 31; 
 >    } else {
 >      i810Reg->OverlayActiveStart = mode->CrtcHTotal - 32; 
 >      i810Reg->OverlayActiveEnd = mode->CrtcHDisplay - 32; 
 >    }
 > 
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to