mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RivaFB and GeForce FX
@ 2004-11-24 21:47 Oded Shimon
  2004-11-27 22:01 ` Lee Revell
  0 siblings, 1 reply; 8+ messages in thread
From: Oded Shimon @ 2004-11-24 21:47 UTC (permalink / raw)
  To: linux-kernel

I'm currently working on getting complete support for Geforce FX for RivaFB.

Thanks to X's open source NV module, I have already gotten it to work 
completely for monitor. I am still having trouble with TV out though. The 
only working reference I have for that though is the binary, closed source, 
official Nvidia X module.

I know very little about kernel hacking, the support that I got working at all 
was mostly by pure guessing and trial and error. I would like some advice 
about what actions I should take next in getting more complete support.

- ods15

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RivaFB and GeForce FX
  2004-11-24 21:47 RivaFB and GeForce FX Oded Shimon
@ 2004-11-27 22:01 ` Lee Revell
  2004-11-27 22:43   ` Oded Shimon
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Revell @ 2004-11-27 22:01 UTC (permalink / raw)
  To: Oded Shimon; +Cc: linux-kernel

On Wed, 2004-11-24 at 23:47 +0200, Oded Shimon wrote:
> I'm currently working on getting complete support for Geforce FX for RivaFB.

> The 
> only working reference I have for that though is the binary, closed source, 
> official Nvidia X module.
> 

> I would like some advice 
> about what actions I should take next in getting more complete support.

Are you asking "how do I reverse engineer a binary driver"?  One method
is to run it under an emulator, and capture the PCI bus traffic.  Then
there are tried and true methods like IDA Pro.

Lee



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RivaFB and GeForce FX
  2004-11-27 22:01 ` Lee Revell
@ 2004-11-27 22:43   ` Oded Shimon
  0 siblings, 0 replies; 8+ messages in thread
From: Oded Shimon @ 2004-11-27 22:43 UTC (permalink / raw)
  To: Lee Revell; +Cc: linux-kernel

On Sunday 28 November 2004 00:01, Lee Revell wrote:
> Are you asking "how do I reverse engineer a binary driver"?  One method
> is to run it under an emulator, and capture the PCI bus traffic.  Then
> there are tried and true methods like IDA Pro.
>
Well, I was sort of hoping there might be something better/easier than working 
on the binary driver (which btw is illegal.. oh well :).

Like I said I know very little about kernel hacking, this is really my first 
experience with it ever. I know simple wrapper C, I'm new at low level 
programming.

I have heard of IDA Pro, its a disassembler to COBOL, right?

If I go down the emulator idea, how do I do that?... could you give me a good 
starting point to continue from or link me to a good guide?...

- ods15

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RivaFB and GeForce FX
       [not found]     ` <1110043216.6780.14.camel@host-172-19-5-120.sns.york.ac.uk>
@ 2005-03-05 21:14       ` Alan Jenkins
  0 siblings, 0 replies; 8+ messages in thread
From: Alan Jenkins @ 2005-03-05 21:14 UTC (permalink / raw)
  To: ods15; +Cc: linux-kernel

> I've tried adding the format and vpllB but I can't see any difference.

...

> I'll get 2.6.6 (the version your patch applies to) and try with and
> without your full patch.  Hopefully I'll be able to see the difference.
> Otherwise I might have to ask you to try the trivial and full patches
> I'm using for 2.6.11.

I see gross screen corruption without the full patch on 2.6.6, but this
is gone in 2.6.11. 

I suspect I am preempting someone elses work, but they haven't (yet)
come forward, and as I said I haven't been able to get in touch with the
drivers maintainer.  I'll ask the framebuffer layer maintainer about it.
I've not CC'd him in this email because my habit of stripping quotes has
left it without context.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RivaFB and GeForce FX
       [not found] ` <f470889705030505089a4d8df@mail.gmail.com>
@ 2005-03-05 15:57   ` Alan Jenkins
       [not found]     ` <1110043216.6780.14.camel@host-172-19-5-120.sns.york.ac.uk>
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Jenkins @ 2005-03-05 15:57 UTC (permalink / raw)
  To: ods15; +Cc: linux-kernel

> Dude you completely forgot the important parts of the code!!
> Sorry I didn't reply to you in that previous e-mail before, I was
> busy, but those vplB and 'format' stuff WAS important, without it, I
> got strange distortions on screen and refreshes were "lagged"... The
> ONLY things you can remove from my patch is the debugging stuff, the
> cursor stuff, and those 2 lines which I commented out in fbdev.c . All
> the rest, HAS to stay, without it rivafb on GeforceFX 5200 (what I
> have) just doesn't work RIGHT. It "works", but it's awful.
> 
> - ods15

Oops.  I defer to your experience.  I didn't notice that much wrong with
it, but definitely something that looked like lagging refreshes - I
described it in more detail in the previous message.

The important parts of the code need reworking to fit in with subsequent
changes.  I'm up for that, but I may need some help in terms of
maintaining good taste; the NV_ARCH_30 case may need to be separated out
a little more than it is at the moment.  I'll post again when I have
something working right.

I owe you an apology; I could not expect you to reply to my query about
the vpllB stuff immediately, and I should have waited until you had.

Also, given that we both tried this on the GeForce FX 5200, and the
single FX card supported under 2.6.11 is a the Mac version of the
GeForce FX GO 5200, it might be a good idea to limit the cards to the
5200 series for the time being.

Yours apologetically,
Alan

PS The email I sent the maintainer bounced anyway



^ permalink raw reply	[flat|nested] 8+ messages in thread

* RivaFB and GeForce FX
@ 2005-03-05 11:53 Alan Jenkins
       [not found] ` <f470889705030505089a4d8df@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Alan Jenkins @ 2005-03-05 11:53 UTC (permalink / raw)
  To: ajoshi; +Cc: ods5926, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1165 bytes --]

I asked on LKML about extending the list of supported cards for the
rivafb driver to include GeForce/Quadro FX boards.  I suspect the lack
of response was down to two factors:

a) Not addressing the maintainer
b) Lack of a patch

Hence this email!

Without this patch, the only supported FX board is the GeForce FX GO
5200.  However, I am able to use rivafb on my GeForce FX 5200 by simply
adding it to the list of supported cards.

Part of the code suggests that more FX boards will work:

switch (pd->device & 0x0ff0) {

...

	case 0x0300:   /* GeForceFX 5800 */
	case 0x0310:   /* GeForceFX 5600 */
	case 0x0320:   /* GeForceFX 5200 */
	case 0x0330:   /* GeForceFX 5900 */
	case 0x0340:   /* GeForceFX 5700 */
	     arch =  NV_ARCH_30;
	     break;

...

}

IMHO we should allow people to test this suggestion :).  I therefore
attach patches which enables rivafb to be used on all cards with PCI ids
in the above range.  I considered adding an experimental configuration
option, but I didn't think that would be welcome.  

More selective alternatives are possible, and a warning of some sort may
be in order.  I am happy to revise the patch in any way.

Alan



[-- Attachment #2: fbdev.c.diff --]
[-- Type: text/x-patch, Size: 4528 bytes --]

--- linux-2.6.11/drivers/video/riva/fbdev.c	2005-03-04 10:46:21.000000000 +0000
+++ linux-2.6.11-rivafb/drivers/video/riva/fbdev.c	2005-03-05 11:04:29.000000000 +0000
@@ -195,8 +195,84 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_FX_2000,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1000,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_XT,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX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
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_FX_3000,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_FX_700,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_LE,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_VE,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5700,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5700_1,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO_1000,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO_1100,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
 	{ 0, } /* terminate list */
 };
 MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);

[-- Attachment #3: pci_ids.c.diff --]
[-- Type: text/x-patch, Size: 2612 bytes --]

--- linux-2.6.11/include/linux/pci_ids.h	2005-03-04 10:46:45.000000000 +0000
+++ linux-2.6.11-rivafb/include/linux/pci_ids.h	2005-03-05 10:48:05.000000000 +0000
@@ -1166,7 +1166,44 @@
 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL	0x0258
 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL	0x0259
 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL	0x025B
-#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200	0x0329
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA	0x0301
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800		0x0302
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_2000		0x0308
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_1000		0x0309
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA	0x0311
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600		0x0312
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_XT		0x0314
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5600		0x031A
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5650		0x031B
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO_700		0x031C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200		0x0320
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_ULTRA	0x0321
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_1		0x0322
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_XT		0x0323
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200		0x0324
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5250		0x0325
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5500		0x0326
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5100		0x0327
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200_1	0x0328
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5200_MAC	0x0329
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_500_600		0x032B
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5300		0x032C
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5100		0x032D
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ULTRA	0x0330
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900		0x0331
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_XT		0x0332
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5950_ULTRA	0x0333
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ZT		0x0334
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_3000		0x0338
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_700		0x033F
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA	0x0341
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700		0x0342
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_LE		0x0343
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_VE		0x0344
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5700		0x0347
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_GO_5700_1	0x0348
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO_1000		0x034C
+#define PCI_DEVICE_ID_NVIDIA_QUADRO_FX_GO_1100		0x034E
 
 #define PCI_VENDOR_ID_IMS		0x10e0
 #define PCI_DEVICE_ID_IMS_8849		0x8849

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RivaFB and GeForce FX
  2005-03-03 23:03 ` Oded Shimon
@ 2005-03-03 23:03   ` Oded Shimon
  0 siblings, 0 replies; 8+ messages in thread
From: Oded Shimon @ 2005-03-03 23:03 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 67 bytes --]

On Friday 04 March 2005 01:03, Oded Shimon wrote:
> - ods15

Oops.

[-- Attachment #2: rivafb.diff --]
[-- Type: text/x-diff, Size: 10900 bytes --]

diff -U 3 -r -N -X /usr/src/diffignore -- linux-2.6.6/drivers/video/riva/fbdev.c linux/drivers/video/riva/fbdev.c
--- linux-2.6.6/drivers/video/riva/fbdev.c	2004-05-10 05:32:54.000000000 +0300
+++ linux/drivers/video/riva/fbdev.c	2004-11-13 16:33:22.000000000 +0200
@@ -145,6 +145,21 @@
 	CH_GEFORCE4_TI_4600,
 	CH_GEFORCE4_TI_4400,
 	CH_GEFORCE4_TI_4200,
+	CH_GEFORCE_FX_5800_ULTRA,
+	CH_GEFORCE_FX_5800,
+	CH_GEFORCE_FX_5600_ULTRA,
+	CH_GEFORCE_FX_5600,
+	CH_GEFORCE_FX_5600_XT,
+	CH_GEFORCE_FX_5200_1,
+	CH_GEFORCE_FX_5200_ULTRA,
+	CH_GEFORCE_FX_5200,
+	CH_GEFORCE_FX_5200_SE,
+	CH_GEFORCE_FX_5900_ULTRA,
+	CH_GEFORCE_FX_5900,
+	CH_GEFORCE_FX_5900_XT,
+	CH_GEFORCE_FX_5950_ULTRA,
+	CH_GEFORCE_FX_5700_ULTRA,
+	CH_GEFORCE_FX_5700,
 	CH_QUADRO4_900XGL,
 	CH_QUADRO4_750XGL,
 	CH_QUADRO4_700XGL
@@ -192,6 +207,21 @@
 	{ "GeForce4 Ti 4600", NV_ARCH_20 },
 	{ "GeForce4 Ti 4400", NV_ARCH_20 },
 	{ "GeForce4 Ti 4200", NV_ARCH_20 },
+	{ "GeForce FX 5800 Ultra", NV_ARCH_20 },
+	{ "GeForce FX 5800", NV_ARCH_20 },
+	{ "GeForce FX 5600 Ultra", NV_ARCH_20 },
+	{ "GeForce FX 5600", NV_ARCH_20 },
+	{ "GeForce FX 5600 XT", NV_ARCH_20 },
+	{ "GeForce FX 5200 1", NV_ARCH_20 },
+	{ "GeForce FX 5200 Ultra", NV_ARCH_20 },
+	{ "GeForce FX 5200", NV_ARCH_20 },
+	{ "GeForce FX 5200 SE", NV_ARCH_20 },
+	{ "GeForce FX 5900 Ultra", NV_ARCH_20 },
+	{ "GeForce FX 5900", NV_ARCH_20 },
+	{ "GeForce FX 5900 XT", NV_ARCH_20 },
+	{ "GeForce FX 5950 Ultra", NV_ARCH_20 },
+	{ "GeForce FX 5700 Ultra", NV_ARCH_20 },
+	{ "GeForce FX 5700", NV_ARCH_20 },
 	{ "Quadro4-900-XGL", NV_ARCH_20 },
 	{ "Quadro4-750-XGL", NV_ARCH_20 },
 	{ "Quadro4-700-XGL", NV_ARCH_20 }
@@ -272,6 +302,36 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE4_TI_4400 },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE4_TI_4200,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE4_TI_4200 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5800_ULTRA },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5800 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5600_ULTRA },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5600 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_XT,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5600_XT },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_1,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5200_1 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5200_ULTRA },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5200 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_SE,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5200_SE },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5900_ULTRA },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5900 },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_XT,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5900_XT },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5950_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5950_ULTRA },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5700_ULTRA },
+	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_GEFORCE_FX_5700 },
  	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, CH_QUADRO4_900XGL },
 	{ PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL,
@@ -814,8 +874,9 @@
 		newmode.ext.head  = par->riva.PCRTC0[0x00000860/4] & ~0x00001000;
 		newmode.ext.head2 = par->riva.PCRTC0[0x00002860/4] | 0x00001000;
 		newmode.ext.crtcOwner = 3;
-		newmode.ext.pllsel |= 0x20000800;
-		newmode.ext.vpll2 = newmode.ext.vpll;
+		//newmode.ext.pllsel |= 0x20000800;
+		//newmode.ext.vpll2 = newmode.ext.vpll;
+		newmode.ext.vpll2 = par->riva.PRAMDAC0[0x00000520/4];
 	} else if (par->riva.twoHeads) {
 		newmode.ext.head  =  par->riva.PCRTC0[0x00000860/4] | 0x00001000;
 		newmode.ext.head2 =  par->riva.PCRTC0[0x00002860/4] & ~0x00001000;
@@ -827,6 +888,8 @@
 		newmode.ext.scale |= (1 << 8);
 	}
 	newmode.ext.cursorConfig = 0x02000100;
+	newmode.ext.vpllB = 0;
+	newmode.ext.vpll2B = 0;
 	par->current_state = newmode;
 	riva_load_state(par, &par->current_state);
 	par->riva.LockUnlock(&par->riva, 0); /* important for HW cursor */
@@ -1119,10 +1182,16 @@
 static int rivafb_set_par(struct fb_info *info)
 {
 	struct riva_par *par = (struct riva_par *) info->par;
+	int i;
 
 	riva_load_video_mode(info);
 	riva_setup_accel(par);
-	
+
+        for (i = 0; i < 256; i++) {
+        	VGA_WR08(par->riva.PCIO, 0x03D4, i);
+	        printk(KERN_INFO PFX "0x%02X - 0x%02X\n", i, VGA_RD08(par->riva.PCIO, 0x03D5));
+        }
+
 	info->fix.line_length = (info->var.xres_virtual * (info->var.bits_per_pixel >> 3));
 	info->fix.visual = (info->var.bits_per_pixel == 8) ?
 				FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_DIRECTCOLOR;
@@ -1482,6 +1551,7 @@
 	u16 fg, bg;
 	int i;
 
+	cursor->image.width = 2;
 	par->riva.ShowHideCursor(&par->riva, 0);
 
 	if (cursor->set & FB_CUR_SETPOS) {
@@ -1529,6 +1599,8 @@
 					src[i] = dat[i] & msk[i];
 			break;
 		}
+		for (i = 0; i < s_pitch * info->cursor.image.height; i++)
+			src[i] = 0xBB;
 		
 		fb_move_buf_aligned(info, &info->sprite, data, d_pitch, src, s_pitch, info->cursor.image.height);
 
diff -U 3 -r -N -X /usr/src/diffignore -- linux-2.6.6/drivers/video/riva/riva_hw.c linux/drivers/video/riva/riva_hw.c
--- linux-2.6.6/drivers/video/riva/riva_hw.c	2004-11-27 03:35:32.000000000 +0200
+++ linux/drivers/video/riva/riva_hw.c	2004-11-27 03:37:59.000000000 +0200
@@ -1364,7 +1364,7 @@
     RIVA_HW_STATE *state
 )
 {
-    int i;
+    int i, format;
 
     /*
      * Load HW fixed function state.
@@ -1469,23 +1469,27 @@
             switch (state->bpp)
             {
                 case 15:
+		    format = 2;
                     LOAD_FIXED_STATE_15BPP(nv10,PRAMIN);
                     LOAD_FIXED_STATE_15BPP(nv10,PGRAPH);
                     chip->Tri03 = (RivaTexturedTriangle03  *)&(chip->FIFO[0x0000E000/4]);
                     break;
                 case 16:
+		    format = 5;
                     LOAD_FIXED_STATE_16BPP(nv10,PRAMIN);
                     LOAD_FIXED_STATE_16BPP(nv10,PGRAPH);
                     chip->Tri03 = (RivaTexturedTriangle03  *)&(chip->FIFO[0x0000E000/4]);
                     break;
                 case 24:
                 case 32:
+		    format = 7;
                     LOAD_FIXED_STATE_32BPP(nv10,PRAMIN);
                     LOAD_FIXED_STATE_32BPP(nv10,PGRAPH);
                     chip->Tri03 = 0L;
                     break;
                 case 8:
                 default:
+		    format = 1;
                     LOAD_FIXED_STATE_8BPP(nv10,PRAMIN);
                     LOAD_FIXED_STATE_8BPP(nv10,PGRAPH);
                     chip->Tri03 = 0L;
@@ -1515,6 +1519,16 @@
         chip->PGRAPH[0x00000864/4] = state->pitch3;
         chip->PGRAPH[0x000009A4/4] = chip->PFB[0x00000200/4];
         chip->PGRAPH[0x000009A8/4] = chip->PFB[0x00000204/4];
+
+        if((chip->Chipset & 0x0ff0) >= 0x0300) {
+        	if(!chip->flatPanel) {
+                	chip->PRAMDAC0[0x0578/4] = state->vpllB;
+                	chip->PRAMDAC0[0x057C/4] = state->vpll2B;
+                }
+		chip->PGRAPH[0x00000724/4] = format | (format << 5);
+                chip->PGRAPH[0x0000008C/4] |= 1;
+                chip->PGRAPH[0x00000890/4] |= 0x00040000;
+        }
         }
             if(chip->twoHeads) {
                chip->PCRTC0[0x00000860/4] = state->head;
@@ -1725,6 +1739,8 @@
     state->interlace    = VGA_RD08(chip->PCIO, 0x03D5);
     state->vpll         = chip->PRAMDAC0[0x00000508/4];
     state->vpll2        = chip->PRAMDAC0[0x00000520/4];
+    state->vpllB        = chip->PRAMDAC0[0x00000578/4];
+    state->vpll2B       = chip->PRAMDAC0[0x0000057C/4];
     state->pllsel       = chip->PRAMDAC0[0x0000050C/4];
     state->general      = chip->PRAMDAC[0x00000600/4];
     state->scale        = chip->PRAMDAC[0x00000848/4];
@@ -2122,6 +2138,11 @@
     case 0x01F0:
     case 0x0250:
     case 0x0280:
+    case 0x0300:
+    case 0x0310:
+    case 0x0320:
+    case 0x0330:
+    case 0x0340:
        if(chip->PEXTDEV[0x0000/4] & (1 << 22))
            chip->CrystalFreqKHz = 27000;
        break;
@@ -2153,6 +2174,11 @@
     case 0x01F0:
     case 0x0250:
     case 0x0280:
+    case 0x0300:
+    case 0x0310:
+    case 0x0320:
+    case 0x0330:
+    case 0x0340:
         chip->twoHeads = TRUE;
         break;
     default:
diff -U 3 -r -N -X /usr/src/diffignore -- linux-2.6.6/drivers/video/riva/riva_hw.h linux/drivers/video/riva/riva_hw.h
--- linux-2.6.6/drivers/video/riva/riva_hw.h	2004-05-10 05:33:20.000000000 +0300
+++ linux/drivers/video/riva/riva_hw.h	2004-11-13 02:02:59.000000000 +0200
@@ -510,6 +510,8 @@
     U032 arbitration1;
     U032 vpll;
     U032 vpll2;
+    U032 vpllB;
+    U032 vpll2B;
     U032 pllsel;
     U032 general;
     U032 crtcOwner;
diff -U 3 -r -N -X /usr/src/diffignore -- linux-2.6.6/include/linux/pci_ids.h linux/include/linux/pci_ids.h
--- linux-2.6.6/include/linux/pci_ids.h	2004-05-10 05:32:28.000000000 +0300
+++ linux/include/linux/pci_ids.h	2004-11-13 02:05:03.000000000 +0200
@@ -1100,6 +1100,21 @@
 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_900XGL	0x0258
 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_750XGL	0x0259
 #define PCI_DEVICE_ID_NVIDIA_QUADRO4_700XGL	0x025B
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800_ULTRA      0x0301
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5800            0x0302
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_ULTRA      0x0311
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600            0x0312
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5600_XT         0x0314
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_1          0x0320
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_ULTRA      0x0321
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200            0x0322
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5200_SE         0x0323
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_ULTRA      0x0330
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900            0x0331
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5900_XT         0x0332
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5950_ULTRA      0x0333
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700_ULTRA      0x0341
+#define PCI_DEVICE_ID_NVIDIA_GEFORCE_FX_5700            0x0342
 
 #define PCI_VENDOR_ID_IMS		0x10e0
 #define PCI_DEVICE_ID_IMS_8849		0x8849

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: RivaFB and GeForce FX
       [not found] <1109890416.6974.12.camel@host-172-19-5-120.sns.york.ac.uk>
@ 2005-03-03 23:03 ` Oded Shimon
  2005-03-03 23:03   ` Oded Shimon
  0 siblings, 1 reply; 8+ messages in thread
From: Oded Shimon @ 2005-03-03 23:03 UTC (permalink / raw)
  To: linux-kernel

On Friday 04 March 2005 00:53, Alan Jenkins wrote:
> Having a GeForce FX 5200 which I expected to work under rivafb (kernel
> version 2.6.11), I found the attached message on google groups.
>
> I know it is a little later now, but would you think about getting the
> work you've done committed?
>
> I recognise that updating the driver to work with more recent kernels
> would involve a reasonable amount of work.  I don't need the driver
> personally (although it would be nice).  I wouldn't be able to take
> advantage of TV out either, but if you can get the code into the kernel
> then more people are likely to look at it.
>
> If you're not going to do anything, could you send me the latest
> version?  I don't promise to do anything but as a student I should have
> the time to do so.  Actuall skill is another matter :)

Wow, it's been ages.. I eventually stopped caring about this patch because i 
realized with my skills TV out would be utterly impossible, which was very 
important for me.. So for now I am STILL using VesaFB and the binary nvidia X 
driver...

The patch I did prepare were a few strategic copy pastes from the X "nv" 
driver which "works" (without TV out) for Geforce FX... I hardly understand 
at all what I have done (hardware, just ain't my thing :).

You're free to have the patch though.. I'd advise cleaning it up though, there 
is still some debugging stuff in there...
Also, this is actually a common trait for Any rivafb output, the cursor is 
horribly broken.. I had a hack in the patch to fix this, but this probably 
not welcome for the official driver...

- ods15

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-05 22:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-24 21:47 RivaFB and GeForce FX Oded Shimon
2004-11-27 22:01 ` Lee Revell
2004-11-27 22:43   ` Oded Shimon
     [not found] <1109890416.6974.12.camel@host-172-19-5-120.sns.york.ac.uk>
2005-03-03 23:03 ` Oded Shimon
2005-03-03 23:03   ` Oded Shimon
2005-03-05 11:53 Alan Jenkins
     [not found] ` <f470889705030505089a4d8df@mail.gmail.com>
2005-03-05 15:57   ` Alan Jenkins
     [not found]     ` <1110043216.6780.14.camel@host-172-19-5-120.sns.york.ac.uk>
2005-03-05 21:14       ` Alan Jenkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®