* rivafb: finally enable NV30 based pbooks/cleanup probe errors
@ 2004-11-18 16:49 Guido Guenther
2004-11-18 23:19 ` Antonino A. Daplas
0 siblings, 1 reply; 10+ messages in thread
From: Guido Guenther @ 2004-11-18 16:49 UTC (permalink / raw)
To: Antonino A. Daplas; +Cc: linux-fbdev-devel, Wolfram Quester
Hi Antonio,
this patch against 2.6.10-rc2 finally detects rivafb on NV30 based power
books by adding the pciid. Wolfram Quester tested it and reported it
working. It also cleans up the error code reported from the probe
function.
Singed-Off-By: Guido Guenther <agx@sigxcpu.org>
Cheers,
-- Guido
--- linux-2.6.10-rc2.orig/drivers/video/riva/fbdev.c 2004-11-17 17:33:53.000000000 +0100
+++ linux-2.6.10-rc2/drivers/video/riva/fbdev.c 2004-11-18 15:50:56.000000000 +0100
@@ -192,6 +192,8 @@
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_GO_5200,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 },
{ 0, } /* terminate list */
};
MODULE_DEVICE_TABLE(pci, rivafb_pci_tbl);
@@ -1880,31 +1882,37 @@
{
struct riva_par *default_par;
struct fb_info *info;
+ int ret;
NVTRACE_ENTER();
assert(pd != NULL);
info = framebuffer_alloc(sizeof(struct riva_par), &pd->dev);
-
- if (!info)
- goto err_out;
-
+ if (!info) {
+ printk (KERN_ERR PFX "could not allocate memory\n");
+ ret = -ENOMEM;
+ goto err_ret;
+ }
default_par = (struct riva_par *) info->par;
default_par->pdev = pd;
info->pixmap.addr = kmalloc(8 * 1024, GFP_KERNEL);
- if (info->pixmap.addr == NULL)
- goto err_out_kfree;
+ if (info->pixmap.addr == NULL) {
+ ret = -ENOMEM;
+ goto err_framebuffer_release;
+ }
memset(info->pixmap.addr, 0, 8 * 1024);
- if (pci_enable_device(pd)) {
+ ret = pci_enable_device(pd);
+ if (ret < 0) {
printk(KERN_ERR PFX "cannot enable PCI device\n");
- goto err_out_enable;
+ goto err_free_pixmap;
}
- if (pci_request_regions(pd, "rivafb")) {
+ ret = pci_request_regions(pd, "rivafb");
+ if (ret < 0) {
printk(KERN_ERR PFX "cannot request PCI regions\n");
- goto err_out_request;
+ goto err_disable_device;
}
default_par->riva.Architecture = riva_get_arch(pd);
@@ -1918,7 +1926,8 @@
if(default_par->riva.Architecture == 0) {
printk(KERN_ERR PFX "unknown NV_ARCH\n");
- goto err_out_free_base0;
+ ret=-ENODEV;
+ goto err_release_region;
}
if(default_par->riva.Architecture == NV_ARCH_10 ||
default_par->riva.Architecture == NV_ARCH_20 ||
@@ -1952,11 +1961,10 @@
rivafb_fix.mmio_len);
if (!default_par->ctrl_base) {
printk(KERN_ERR PFX "cannot ioremap MMIO base\n");
- goto err_out_free_base0;
+ ret = -EIO;
+ goto err_release_region;
}
- info->par = default_par;
-
switch (default_par->riva.Architecture) {
case NV_ARCH_03:
/* Riva128's PRAMIN is in the "framebuffer" space
@@ -1966,7 +1974,8 @@
default_par->riva.PRAMIN = ioremap(rivafb_fix.smem_start + 0x00C00000, 0x00008000);
if (!default_par->riva.PRAMIN) {
printk(KERN_ERR PFX "cannot ioremap PRAMIN region\n");
- goto err_out_free_nv3_pramin;
+ ret = -EIO;
+ goto err_iounmap_ctrl_base;
}
break;
case NV_ARCH_04:
@@ -1992,7 +2001,8 @@
rivafb_fix.smem_len);
if (!info->screen_base) {
printk(KERN_ERR PFX "cannot ioremap FB base\n");
- goto err_out_free_base1;
+ ret = -EIO;
+ goto err_iounmap_pramin;
}
#ifdef CONFIG_MTRR
@@ -2015,17 +2025,19 @@
riva_get_EDID(info, pd);
riva_get_edidinfo(info);
- if (riva_set_fbinfo(info) < 0) {
+ ret=riva_set_fbinfo(info);
+ if (ret < 0) {
printk(KERN_ERR PFX "error setting initial video mode\n");
- goto err_out_iounmap_fb;
+ goto err_iounmap_screen_base;
}
fb_destroy_modedb(info->monspecs.modedb);
info->monspecs.modedb = NULL;
- if (register_framebuffer(info) < 0) {
+ ret = register_framebuffer(info);
+ if (ret < 0) {
printk(KERN_ERR PFX
"error registering riva framebuffer\n");
- goto err_out_iounmap_fb;
+ goto err_iounmap_screen_base;
}
pci_set_drvdata(pd, info);
@@ -2044,26 +2056,26 @@
NVTRACE_LEAVE();
return 0;
-err_out_iounmap_fb:
+err_iounmap_screen_base:
#ifdef CONFIG_FB_RIVA_I2C
riva_delete_i2c_busses((struct riva_par *) info->par);
#endif
iounmap(info->screen_base);
-err_out_free_base1:
+err_iounmap_pramin:
if (default_par->riva.Architecture == NV_ARCH_03)
iounmap(default_par->riva.PRAMIN);
-err_out_free_nv3_pramin:
+err_iounmap_ctrl_base:
iounmap(default_par->ctrl_base);
-err_out_free_base0:
+err_release_region:
pci_release_regions(pd);
-err_out_request:
+err_disable_device:
pci_disable_device(pd);
-err_out_enable:
+err_free_pixmap:
kfree(info->pixmap.addr);
-err_out_kfree:
+err_framebuffer_release:
framebuffer_release(info);
-err_out:
- return -ENODEV;
+err_ret:
+ return ret;
}
static void __exit rivafb_remove(struct pci_dev *pd)
--- linux-2.6.10-rc2.orig/include/linux/pci_ids.h 2004-11-17 17:34:04.000000000 +0100
+++ linux-2.6.10-rc2/include/linux/pci_ids.h 2004-11-18 15:50:56.000000000 +0100
@@ -1140,6 +1140,7 @@
#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_VENDOR_ID_IMS 0x10e0
#define PCI_DEVICE_ID_IMS_8849 0x8849
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-18 16:49 rivafb: finally enable NV30 based pbooks/cleanup probe errors Guido Guenther
@ 2004-11-18 23:19 ` Antonino A. Daplas
2004-11-19 8:09 ` Guido Guenther
0 siblings, 1 reply; 10+ messages in thread
From: Antonino A. Daplas @ 2004-11-18 23:19 UTC (permalink / raw)
To: Guido Guenther; +Cc: linux-fbdev-devel, Wolfram Quester
On Friday 19 November 2004 00:49, Guido Guenther wrote:
> Hi Antonio,
> this patch against 2.6.10-rc2 finally detects rivafb on NV30 based power
> books by adding the pciid. Wolfram Quester tested it and reported it
> working. It also cleans up the error code reported from the probe
> function.
>
Thanks.
I also tested NV32 (GeForce FX 5200 0x0322) which also works. So, I'm
planning to add a lot of NV30 entries to pci_ids.h and the rivafb pci_table
just so we can get a lot of reports (good and bad) from users.
> Singed-Off-By: Guido Guenther <agx@sigxcpu.org>
^^^^^^^
:-)
Tony
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-18 23:19 ` Antonino A. Daplas
@ 2004-11-19 8:09 ` Guido Guenther
2004-11-19 9:20 ` Andrew Walrond
2004-11-19 11:09 ` Antonino A. Daplas
0 siblings, 2 replies; 10+ messages in thread
From: Guido Guenther @ 2004-11-19 8:09 UTC (permalink / raw)
To: adaplas; +Cc: linux-fbdev-devel, Wolfram Quester
On Fri, Nov 19, 2004 at 07:19:24AM +0800, Antonino A. Daplas wrote:
> On Friday 19 November 2004 00:49, Guido Guenther wrote:
> > Hi Antonio,
> > this patch against 2.6.10-rc2 finally detects rivafb on NV30 based power
> > books by adding the pciid. Wolfram Quester tested it and reported it
> > working. It also cleans up the error code reported from the probe
> > function.
> >
>
> Thanks.
>
> I also tested NV32 (GeForce FX 5200 0x0322) which also works. So, I'm
> planning to add a lot of NV30 entries to pci_ids.h and the rivafb pci_table
> just so we can get a lot of reports (good and bad) from users.
Hmmm...shouldn't we delay this past 2.6.10? People with rivafb compiled
into the kernel but a - until now undetected - card, might get bitten
otherwise.
-- Guido
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 8:09 ` Guido Guenther
@ 2004-11-19 9:20 ` Andrew Walrond
2004-11-19 11:09 ` Antonino A. Daplas
2004-11-20 0:42 ` Guido Guenther
2004-11-19 11:09 ` Antonino A. Daplas
1 sibling, 2 replies; 10+ messages in thread
From: Andrew Walrond @ 2004-11-19 9:20 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Guido Guenther, adaplas, Wolfram Quester
On Friday 19 Nov 2004 08:09, Guido Guenther wrote:
>
> Hmmm...shouldn't we delay this past 2.6.10? People with rivafb compiled
> into the kernel but a - until now undetected - card, might get bitten
> otherwise.
> -- Guido
>
Why would 2.6.11 be a better time than 2.6.10 for this change? People tend to
expect a few problems whenever they upgrade a kernel.
Andrew Walrond
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 9:20 ` Andrew Walrond
@ 2004-11-19 11:09 ` Antonino A. Daplas
2004-11-20 0:42 ` Guido Guenther
1 sibling, 0 replies; 10+ messages in thread
From: Antonino A. Daplas @ 2004-11-19 11:09 UTC (permalink / raw)
To: linux-fbdev-devel, Andrew Walrond; +Cc: Guido Guenther, Wolfram Quester
On Friday 19 November 2004 17:20, Andrew Walrond wrote:
> On Friday 19 Nov 2004 08:09, Guido Guenther wrote:
> > Hmmm...shouldn't we delay this past 2.6.10? People with rivafb compiled
> > into the kernel but a - until now undetected - card, might get bitten
> > otherwise.
> > -- Guido
>
> Why would 2.6.11 be a better time than 2.6.10 for this change? People tend
> to expect a few problems whenever they upgrade a kernel.
It's too late anyway for 2.6.10, even if I submit patches to Andrew, he won't
merge to mainline until 2.6.10 comes out.
Tony
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 8:09 ` Guido Guenther
2004-11-19 9:20 ` Andrew Walrond
@ 2004-11-19 11:09 ` Antonino A. Daplas
2004-11-19 11:58 ` Guido Guenther
2004-11-19 12:24 ` Andrew Walrond
1 sibling, 2 replies; 10+ messages in thread
From: Antonino A. Daplas @ 2004-11-19 11:09 UTC (permalink / raw)
To: Guido Guenther; +Cc: linux-fbdev-devel, Wolfram Quester
On Friday 19 November 2004 16:09, Guido Guenther wrote:
> On Fri, Nov 19, 2004 at 07:19:24AM +0800, Antonino A. Daplas wrote:
> > On Friday 19 November 2004 00:49, Guido Guenther wrote:
> > > Hi Antonio,
> > > this patch against 2.6.10-rc2 finally detects rivafb on NV30 based
> > > power books by adding the pciid. Wolfram Quester tested it and reported
> > > it working. It also cleans up the error code reported from the probe
> > > function.
> >
> > Thanks.
> >
> > I also tested NV32 (GeForce FX 5200 0x0322) which also works. So, I'm
> > planning to add a lot of NV30 entries to pci_ids.h and the rivafb
> > pci_table just so we can get a lot of reports (good and bad) from users.
>
> Hmmm...shouldn't we delay this past 2.6.10? People with rivafb compiled
> into the kernel but a - until now undetected - card, might get bitten
> otherwise.
Yes, we're already in rc2, and usually at this point, patches merged tend to
be bug fixes only.
Anyway, I'm planning to write another driver for nvidia, based on xorg
sources, as nvidiafb. The rivafb uses programmed io, whereas the newer
chipsets uses DMA, and without docs, that's the only way we can support
newer chipsets (use X sources).
So, eventually, rivafb will support only nv20 chipsets and older, whilst
nvidiafb nv10 and newer.
Tony
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 11:09 ` Antonino A. Daplas
@ 2004-11-19 11:58 ` Guido Guenther
2004-11-19 12:24 ` Andrew Walrond
1 sibling, 0 replies; 10+ messages in thread
From: Guido Guenther @ 2004-11-19 11:58 UTC (permalink / raw)
To: adaplas; +Cc: linux-fbdev-devel, Wolfram Quester
On Fri, Nov 19, 2004 at 07:09:13PM +0800, Antonino A. Daplas wrote:
> Anyway, I'm planning to write another driver for nvidia, based on xorg
> sources, as nvidiafb. The rivafb uses programmed io, whereas the newer
Great, I thought about this already too. Would be nice to have...
> chipsets uses DMA, and without docs, that's the only way we can support
> newer chipsets (use X sources).
>
> So, eventually, rivafb will support only nv20 chipsets and older, whilst
> nvidiafb nv10 and newer.
Well we should at least support the NV30 cards that are known to work,
ppc users want this badly since rivafb has backlight control while offb
hasn't.
Cheers,
-- Guido
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 11:09 ` Antonino A. Daplas
2004-11-19 11:58 ` Guido Guenther
@ 2004-11-19 12:24 ` Andrew Walrond
2004-11-19 13:33 ` Guido Guenther
1 sibling, 1 reply; 10+ messages in thread
From: Andrew Walrond @ 2004-11-19 12:24 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: Antonino A. Daplas, Guido Guenther, Wolfram Quester
On Friday 19 Nov 2004 11:09, Antonino A. Daplas wrote:
>
> Anyway, I'm planning to write another driver for nvidia, based on xorg
> sources, as nvidiafb. The rivafb uses programmed io, whereas the newer
> chipsets uses DMA, and without docs, that's the only way we can support
> newer chipsets (use X sources).
>
How come xorg have more information than you? Is their (open source) driver
provided by NVidia?
Andrew
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 12:24 ` Andrew Walrond
@ 2004-11-19 13:33 ` Guido Guenther
0 siblings, 0 replies; 10+ messages in thread
From: Guido Guenther @ 2004-11-19 13:33 UTC (permalink / raw)
To: Andrew Walrond; +Cc: linux-fbdev-devel, Antonino A. Daplas, Wolfram Quester
On Fri, Nov 19, 2004 at 12:24:00PM +0000, Andrew Walrond wrote:
> On Friday 19 Nov 2004 11:09, Antonino A. Daplas wrote:
> >
> > Anyway, I'm planning to write another driver for nvidia, based on xorg
> > sources, as nvidiafb. The rivafb uses programmed io, whereas the newer
> > chipsets uses DMA, and without docs, that's the only way we can support
> > newer chipsets (use X sources).
> >
>
> How come xorg have more information than you? Is their (open source) driver
> provided by NVidia?
The driver was originally written by Mark Vojkovich who had access to
the documentation.
-- Guido
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: rivafb: finally enable NV30 based pbooks/cleanup probe errors
2004-11-19 9:20 ` Andrew Walrond
2004-11-19 11:09 ` Antonino A. Daplas
@ 2004-11-20 0:42 ` Guido Guenther
1 sibling, 0 replies; 10+ messages in thread
From: Guido Guenther @ 2004-11-20 0:42 UTC (permalink / raw)
To: linux-fbdev-devel; +Cc: adaplas, Wolfram Quester
On Fri, Nov 19, 2004 at 09:20:44AM +0000, Andrew Walrond wrote:
> On Friday 19 Nov 2004 08:09, Guido Guenther wrote:
> >
> > Hmmm...shouldn't we delay this past 2.6.10? People with rivafb compiled
> > into the kernel but a - until now undetected - card, might get bitten
> > otherwise.
> > -- Guido
> >
>
> Why would 2.6.11 be a better time than 2.6.10 for this change? People tend to
> expect a few problems whenever they upgrade a kernel.
Well, Linus asked for "fixes only" IIRC, risking to break things for
some users without good reason doesn't fit in well into this.
-- Guido
-------------------------------------------------------
This SF.Net email is sponsored by: InterSystems CACHE
FREE OODBMS DOWNLOAD - A multidimensional database that combines
robust object and relational technologies, making it a perfect match
for Java, C++,COM, XML, ODBC and JDBC. www.intersystems.com/match8
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-11-20 0:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-18 16:49 rivafb: finally enable NV30 based pbooks/cleanup probe errors Guido Guenther
2004-11-18 23:19 ` Antonino A. Daplas
2004-11-19 8:09 ` Guido Guenther
2004-11-19 9:20 ` Andrew Walrond
2004-11-19 11:09 ` Antonino A. Daplas
2004-11-20 0:42 ` Guido Guenther
2004-11-19 11:09 ` Antonino A. Daplas
2004-11-19 11:58 ` Guido Guenther
2004-11-19 12:24 ` Andrew Walrond
2004-11-19 13:33 ` Guido Guenther
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).