Re: [Dri-devel] mach64-0-0-7 branch and VBE TVOut. Patch included.

2004-05-07 Thread Dave Airlie

I finally got to look at this patch, the patch puts the options in
atioption.c in a different order than in atioption.h

this stops tv out from working properly with the  previous patch, there is
an updated patch at
http://freedesktop.org/~airlied/mach64-tvout-070504.diff

it still doesn't look great on my TV :-( NTSC or PAL, NTSC suffers from
shorter scan lines at the top than at the bottom, PAL suffers from a dodgy
shake .. makes your eyes hurt ...

Dave.

On Sun, 28 Mar 2004, Mike Mestnik wrote:

 He did respond you should be able to find his comments on the user list.
 IIRC He said that xv != tvout and that xv was in 0-0-7 and this seams to
 be the case.  I think there is some dependant code missing from the tvout
 patch that also needs to be brought over.

 I used /linux/tvout-patches/mach64-tvout-20030328.diff.gz for making my
 patch.  Maby the XV patch will have the missing code we need?

 --- Anish Mistry [EMAIL PROTECTED] wrote:
  On Saturday 27 March 2004 09:55 pm, you wrote:
   I'm glad too see it has worked for you.  I have had problems with my
   patch, may I ask how you use it and what you do to make it work?  What
  I
   did was use atitvout while in X and this worked but only if I didn't
  do
   any mode changes or VT switches.  Withought the patch atitvout bails
   saying it can do VBE calles.
  
  I think you misread my message.  I was NOT able to get it working.  I
  don't
  use atitvout since there is only the source code available and not a
  binary
  which I would be able to run under the Linux ABI.  I'm going to try to
  hand
  patch Leif's original 4.3 patch later this week to see if I can get it
  to
  work.  Have you tried to email Leif  I did last week, but got no
  response.
   --- Anish Mistry [EMAIL PROTECTED] wrote:
On Tuesday 23 March 2004 05:16 am, Mike Mestnik wrote:
 This is nothing more than a HUNK fixed copy of the TVOut patch
  found
   
on
   
 leif's linux page.  With this patch the TVOut and other related
   
options
   
 are evaluated and it is posible to use atitvout while in X.
  However I
 notesed some problems with this patch that only a reboot would
  fix.
   
There
   
 was coruption of 2d texture offsets making the FB filled with odd
   
things
   
 from display memory.  Something like the GDM login name prompt
  came in
 clearly while the rest of the screen was messed up.  I'l see if I
   
can't
   
 get some screenshots of this.
   
I was unable to get tvout working with your attached patch.  Using
  the
4.3
binaries from Leif's site works fine, but no dri.  I'm using
  FreeBSD.
   
--
Anish Mistry
 
 
  --
  Anish Mistry
 

  ATTACHMENT part 2 application/pgp-signature



 __
 Do you Yahoo!?
 Yahoo! Finance Tax Center - File online. File on time.
 http://taxes.yahoo.com/filing.html


 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 --
 ___
 Dri-devel mailing list
 [EMAIL PROTECTED]
 https://lists.sourceforge.net/lists/listinfo/dri-devel


-- 
David Airlie, Software Engineer
http://www.skynet.ie/~airlied / airlied at skynet.ie
pam_smb / Linux DECstation / Linux VAX / ILUG person



---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
--
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [Dri-devel] mach64-0-0-7 branch and VBE TVOut. Patch included.

2004-03-28 Thread Anish Mistry
On Saturday 27 March 2004 09:55 pm, you wrote:
 I'm glad too see it has worked for you.  I have had problems with my
 patch, may I ask how you use it and what you do to make it work?  What I
 did was use atitvout while in X and this worked but only if I didn't do
 any mode changes or VT switches.  Withought the patch atitvout bails
 saying it can do VBE calles.

I think you misread my message.  I was NOT able to get it working.  I don't 
use atitvout since there is only the source code available and not a binary 
which I would be able to run under the Linux ABI.  I'm going to try to hand 
patch Leif's original 4.3 patch later this week to see if I can get it to 
work.  Have you tried to email Leif  I did last week, but got no response.
 --- Anish Mistry [EMAIL PROTECTED] wrote:
  On Tuesday 23 March 2004 05:16 am, Mike Mestnik wrote:
   This is nothing more than a HUNK fixed copy of the TVOut patch found
 
  on
 
   leif's linux page.  With this patch the TVOut and other related
 
  options
 
   are evaluated and it is posible to use atitvout while in X.  However I
   notesed some problems with this patch that only a reboot would fix.
 
  There
 
   was coruption of 2d texture offsets making the FB filled with odd
 
  things
 
   from display memory.  Something like the GDM login name prompt came in
   clearly while the rest of the screen was messed up.  I'l see if I
 
  can't
 
   get some screenshots of this.
 
  I was unable to get tvout working with your attached patch.  Using the
  4.3
  binaries from Leif's site works fine, but no dri.  I'm using FreeBSD.
 
  --
  Anish Mistry


-- 
Anish Mistry


pgp0.pgp
Description: signature


Re: [Dri-devel] mach64-0-0-7 branch and VBE TVOut. Patch included.

2004-03-28 Thread Mike Mestnik
He did respond you should be able to find his comments on the user list. 
IIRC He said that xv != tvout and that xv was in 0-0-7 and this seams to
be the case.  I think there is some dependant code missing from the tvout
patch that also needs to be brought over.

I used /linux/tvout-patches/mach64-tvout-20030328.diff.gz for making my
patch.  Maby the XV patch will have the missing code we need?

--- Anish Mistry [EMAIL PROTECTED] wrote:
 On Saturday 27 March 2004 09:55 pm, you wrote:
  I'm glad too see it has worked for you.  I have had problems with my
  patch, may I ask how you use it and what you do to make it work?  What
 I
  did was use atitvout while in X and this worked but only if I didn't
 do
  any mode changes or VT switches.  Withought the patch atitvout bails
  saying it can do VBE calles.
 
 I think you misread my message.  I was NOT able to get it working.  I
 don't 
 use atitvout since there is only the source code available and not a
 binary 
 which I would be able to run under the Linux ABI.  I'm going to try to
 hand 
 patch Leif's original 4.3 patch later this week to see if I can get it
 to 
 work.  Have you tried to email Leif  I did last week, but got no
 response.
  --- Anish Mistry [EMAIL PROTECTED] wrote:
   On Tuesday 23 March 2004 05:16 am, Mike Mestnik wrote:
This is nothing more than a HUNK fixed copy of the TVOut patch
 found
  
   on
  
leif's linux page.  With this patch the TVOut and other related
  
   options
  
are evaluated and it is posible to use atitvout while in X. 
 However I
notesed some problems with this patch that only a reboot would
 fix.
  
   There
  
was coruption of 2d texture offsets making the FB filled with odd
  
   things
  
from display memory.  Something like the GDM login name prompt
 came in
clearly while the rest of the screen was messed up.  I'l see if I
  
   can't
  
get some screenshots of this.
  
   I was unable to get tvout working with your attached patch.  Using
 the
   4.3
   binaries from Leif's site works fine, but no dri.  I'm using
 FreeBSD.
  
   --
   Anish Mistry
 
 
 -- 
 Anish Mistry
 

 ATTACHMENT part 2 application/pgp-signature 



__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
--
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [Dri-devel] mach64-0-0-7 branch and VBE TVOut. Patch included.

2004-03-27 Thread Mike Mestnik
I'm glad too see it has worked for you.  I have had problems with my
patch, may I ask how you use it and what you do to make it work?  What I
did was use atitvout while in X and this worked but only if I didn't do
any mode changes or VT switches.  Withought the patch atitvout bails
saying it can do VBE calles.

--- Anish Mistry [EMAIL PROTECTED] wrote:
 On Tuesday 23 March 2004 05:16 am, Mike Mestnik wrote:
  This is nothing more than a HUNK fixed copy of the TVOut patch found
 on
  leif's linux page.  With this patch the TVOut and other related
 options
  are evaluated and it is posible to use atitvout while in X.  However I
  notesed some problems with this patch that only a reboot would fix. 
 There
  was coruption of 2d texture offsets making the FB filled with odd
 things
  from display memory.  Something like the GDM login name prompt came in
  clearly while the rest of the screen was messed up.  I'l see if I
 can't
  get some screenshots of this.
 I was unable to get tvout working with your attached patch.  Using the
 4.3 
 binaries from Leif's site works fine, but no dri.  I'm using FreeBSD.
 
 -- 
 Anish Mistry
 

 ATTACHMENT part 1.2 application/pgp-signature 


 ATTACHMENT part 2 application/x-gzip name=dmesg.boot.gz


 ATTACHMENT part 3 application/x-gzip name=XF86Config.gz



__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
--
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: [Dri-devel] mach64-0-0-7 branch and VBE TVOut. Patch included.

2004-03-26 Thread Anish Mistry
On Tuesday 23 March 2004 05:16 am, Mike Mestnik wrote:
 This is nothing more than a HUNK fixed copy of the TVOut patch found on
 leif's linux page.  With this patch the TVOut and other related options
 are evaluated and it is posible to use atitvout while in X.  However I
 notesed some problems with this patch that only a reboot would fix.  There
 was coruption of 2d texture offsets making the FB filled with odd things
 from display memory.  Something like the GDM login name prompt came in
 clearly while the rest of the screen was messed up.  I'l see if I can't
 get some screenshots of this.
I was unable to get tvout working with your attached patch.  Using the 4.3 
binaries from Leif's site works fine, but no dri.  I'm using FreeBSD.

-- 
Anish Mistry


pgp0.pgp
Description: signature


dmesg.boot.gz
Description: GNU Zip compressed data


XF86Config.gz
Description: GNU Zip compressed data


[Dri-devel] mach64-0-0-7 branch and VBE TVOut. Patch included.

2004-03-23 Thread Mike Mestnik
This is nothing more than a HUNK fixed copy of the TVOut patch found on
leif's linux page.  With this patch the TVOut and other related options
are evaluated and it is posible to use atitvout while in X.  However I
notesed some problems with this patch that only a reboot would fix.  There
was coruption of 2d texture offsets making the FB filled with odd things
from display memory.  Something like the GDM login name prompt came in
clearly while the rest of the screen was messed up.  I'l see if I can't
get some screenshots of this.


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.htmlIndex: Imakefile
===
RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/Imakefile,v
retrieving revision 1.16.10.1
diff -u -r1.16.10.1 Imakefile
--- Imakefile   6 Feb 2004 11:15:40 -   1.16.10.1
+++ Imakefile   21 Mar 2004 00:21:51 -
@@ -147,7 +147,24 @@
 
 #endif
 
-DEFINES = $(CPIODEFINES) $(DGADEFINES) $(NONPCIDEFINES) $(DRIDEFINES)
+/* 
+ * TV-out only supported on x86
+ */
+#if ATIAvoidCPIO
+# undef ATITVOut
+# define ATITVOut NO
+#elif defined(i386Architecture)
+# undef ATITVOut
+# define ATITVOut YES
+#endif
+
+#if ATITVOut
+
+TVOUTDEFINES = -DTV_OUT
+
+#endif
+
+DEFINES = $(CPIODEFINES) $(DGADEFINES) $(NONPCIDEFINES) $(DRIDEFINES) $(TVOUTDEFINES)
 
 SRCS1 = ati.c atiadapter.c atibus.c atichip.c atiident.c atioption.c \
 atiprobe.c atividmem.c $(CPIOSRCS1) $(MODSRCS1) \
Index: aticonfig.c
===
RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonfig.c,v
retrieving revision 1.2.12.3
diff -u -r1.2.12.3 aticonfig.c
--- aticonfig.c 14 Feb 2004 09:31:58 -  1.2.12.3
+++ aticonfig.c 21 Mar 2004 00:21:52 -
@@ -123,6 +123,13 @@
 
 #endif /* XF86DRI */
 
+#ifdef TV_OUT
+
+#   define TvOutPublicOption[ATI_OPTION_TV_OUT].value.bool
+#   define TvStdPublicOption[ATI_OPTION_TV_STD].value.str
+
+#endif /* TV_OUT */
+
 #   define CacheMMIO PublicOption[ATI_OPTION_MMIO_CACHE].value.bool
 #   define TestCacheMMIO PublicOption[ATI_OPTION_TEST_MMIO_CACHE].value.bool
 #   define PanelDisplay  PublicOption[ATI_OPTION_PANEL_DISPLAY].value.bool
@@ -154,6 +161,11 @@
 
 #endif /* AVOID_CPIO */
 
+#ifdef TV_OUT
+
+   TvStd = None;  /* No tv standard change requested */
+
+#endif
 }
 
 ReferenceClock = ((double)15750.0) / ((double)11.0);
@@ -202,6 +214,31 @@
 
 #endif /* AVOID_CPIO */
 
+#ifdef TV_OUT
+
+if (TvOut  pATI-Chip  ATI_CHIP_264GT) {
+   /* Only allow this for 3D Rage (I) or greater chip ID
+   * AFAIK, no chips before this supported TV-Out
+   * mach64VT has support for TV tuner, but no TV-Out
+   */
+   xf86DrvMsg(pScreenInfo-scrnIndex, X_WARNING,
+TV Out not supported for this chip.\n);
+} else {
+   ATITVStandard std;
+   pATI-OptionTvOut = TvOut;
+   pATI-OptionTvStd = ATI_TV_STD_INVALID;
+   for (std = 0; std  ATI_TV_STDS_MAX_VALID; std++) {
+   if (std != ATI_TV_STD_RESERVED1  std != ATI_TV_STD_RESERVED2) {
+   if (strncasecmp(TvStd, ATITVStandardNames[std], 
ATI_TV_STDS_NAME_MAXLEN)==0) {
+   pATI-OptionTvStd = std;
+   break;
+   }
+   }
+   }
+}
+
+#endif /* TV_OUT */
+
 pATI-OptionMMIOCache = CacheMMIO;
 pATI-OptionTestMMIOCache = TestCacheMMIO;
 pATI-OptionProbeClocks = ProbeClocks;
Index: aticonsole.c
===
RCS file: /cvs/dri/xc/xc/programs/Xserver/hw/xfree86/drivers/ati/aticonsole.c,v
retrieving revision 1.2.12.2
diff -u -r1.2.12.2 aticonsole.c
--- aticonsole.c13 Feb 2004 11:49:54 -  1.2.12.2
+++ aticonsole.c21 Mar 2004 00:21:53 -
@@ -42,6 +42,20 @@
 
 #include xf86.h
 
+#ifdef TV_OUT
+
+#include atichip.h
+#include atiprint.h
+#include atioption.h
+#include vbe.h
+
+static const char *vbeSymbols[] = {
+VBEGetVBEMode,
+NULL
+};
+
+#endif /* TV_OUT */
+
 /*
  * ATISaveScreen --
  *
@@ -135,6 +149,398 @@
 }
 }
 
+#ifdef TV_OUT
+
+static void
+ATIProbeAndSetActiveDisplays
+(
+ScrnInfoPtr pScreenInfo,
+ATIPtr  pATI
+)
+{
+vbeInfoPtr pVbe;
+Bool tv_attached, crt_attached, lcd_attached;
+int disp_request;
+ATITVStandard tv_std, tv_std_request;
+
+xf86LoaderRefSymLists(vbeSymbols, NULL);
+
+if (xf86GetVerbosity()  3) {
+   xf86ErrorFVerb(4, \n Before TV-Out queries\n\n,
+  pScreenInfo-currentMode-name);
+   ATIPrintRegisters(pATI);
+}
+
+pATI-tvActive = FALSE;
+pVbe = pATI-pVBE;
+if (pVbe) {
+   /* LT Pro, XL, Mobility specific BIOS functions */
+   if (pATI-Chip == ATI_CHIP_264LTPRO ||
+   pATI-Chip == ATI_CHIP_264XL || 
+   pATI-Chip == ATI_CHIP_MOBILITY) {
+
+