Hi,
the attached patch fixes the EDID parsing for PPC on rivafb. It actually
finds the EDID info in the OF Tree now. I grabbed this from BenHs Tree as
of 2.6.5-rc3. The current code has no chance to work since it doesn't
walk the device tree.
This helps rivafb on PPC at least a bit further...
Cheers,
-- Guido
signed-off-by: Guido G?nther <[email protected]>
On Tue, 2004-06-01 at 14:16, Guido Guenther wrote:
> Hi,
> the attached patch fixes the EDID parsing for PPC on rivafb. It actually
> finds the EDID info in the OF Tree now. I grabbed this from BenHs Tree as
> of 2.6.5-rc3. The current code has no chance to work since it doesn't
> walk the device tree.
> This helps rivafb on PPC at least a bit further...
> Cheers,
You'll have more chances getting the patch picked up quickly if you send
it in the body of the mail, not as an attachment. Attachement are an
order of magnitude more painful to process for us.
(Make sure your mailer won't screw up space/tabs & line lenght though)
Ben.
On Tue, Jun 01, 2004 at 02:28:06PM +1000, Benjamin Herrenschmidt wrote:
> You'll have more chances getting the patch picked up quickly if you send
> it in the body of the mail, not as an attachment. Attachement are an
> order of magnitude more painful to process for us.
Next try:
the attached patch fixes the EDID parsing for PPC on rivafb. It actually
finds the EDID info in the OF Tree now. I grabbed this from BenHs Tree as
of 2.6.5-rc3. The current code has no chance to work since it doesn't
walk the device tree.
This helps rivafb on PPC at least a bit further...
Cheers,
-- Guido
signed-off-by: Guido G?nther <[email protected]>
--- ../linux-2.6.7-rc2.orig/drivers/video/riva/fbdev.c 2004-05-30 11:40:32.000000000 -0300
+++ drivers/video/riva/fbdev.c 2004-06-01 00:57:37.060599712 -0300
@@ -1620,14 +1632,27 @@
struct riva_par *par = (struct riva_par *) info->par;
struct device_node *dp;
unsigned char *pedid = NULL;
+ unsigned char *disptype = NULL;
+ static char *propnames[] = {
+ "DFP,EDID", "LCD,EDID", "EDID", "EDID1", "EDID,B", "EDID,A", NULL };
+ int i;
dp = pci_device_to_OF_node(pd);
- pedid = (unsigned char *)get_property(dp, "EDID,B", 0);
-
- if (pedid) {
+ for (; dp != NULL; dp = dp->child) {
+ disptype = (unsigned char *)get_property(dp, "display-type", NULL);
+ if (disptype == NULL)
+ continue;
+ if (strncmp(disptype, "LCD", 3) != 0)
+ continue;
+ for (i = 0; propnames[i] != NULL; ++i) {
+ pedid = (unsigned char *)
+ get_property(dp, propnames[i], NULL);
+ if (pedid != NULL) {
par->EDID = pedid;
return 1;
- } else
+ }
+ }
+ }
return 0;
}
#endif /* CONFIG_PPC_OF */
Guido Guenther <[email protected]> wrote:
>
> --- ../linux-2.6.7-rc2.orig/drivers/video/riva/fbdev.c 2004-05-30 11:40:32.000000000 -0300
> +++ drivers/video/riva/fbdev.c 2004-06-01 00:57:37.060599712 -0300
> @@ -1620,14 +1632,27 @@
> struct riva_par *par = (struct riva_par *) info->par;
> struct device_node *dp;
> unsigned char *pedid = NULL;
> + unsigned char *disptype = NULL;
Please use tabs instead of spaces.
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
On Tue, 2004-06-01 at 23:53, Guido Guenther wrote:
> On Tue, Jun 01, 2004 at 02:28:06PM +1000, Benjamin Herrenschmidt wrote:
> > You'll have more chances getting the patch picked up quickly if you send
> > it in the body of the mail, not as an attachment. Attachement are an
> > order of magnitude more painful to process for us.
> Next try:
>
> the attached patch fixes the EDID parsing for PPC on rivafb. It actually
> finds the EDID info in the OF Tree now. I grabbed this from BenHs Tree as
> of 2.6.5-rc3. The current code has no chance to work since it doesn't
> walk the device tree.
> This helps rivafb on PPC at least a bit further...
> Cheers,
Your tab/spacing seem to be broken.. Fix the tabs or check that your
mailer isn't screwing them up.
Ben.
On Fri, Jun 04, 2004 at 08:40:21AM +1000, Benjamin Herrenschmidt wrote:
> > the attached patch fixes the EDID parsing for PPC on rivafb. It actually
> > finds the EDID info in the OF Tree now. I grabbed this from BenHs Tree as
> > of 2.6.5-rc3. The current code has no chance to work since it doesn't
> > walk the device tree.
> > This helps rivafb on PPC at least a bit further...
> > Cheers,
>
> Your tab/spacing seem to be broken.. Fix the tabs or check that your
> mailer isn't screwing them up.
Next try:
signed-off-by: Guido Guenther <[email protected]>
--- 2.6/linux-2.6.7-rc2.orig/drivers/video/riva/fbdev.c 2004-06-04 17:40:30.842899312 +0200
+++ current/drivers/video/riva/fbdev.c 2004-06-04 15:38:00.136376560 +0200
@@ -1620,14 +1655,27 @@
struct riva_par *par = (struct riva_par *) info->par;
struct device_node *dp;
unsigned char *pedid = NULL;
+ unsigned char *disptype = NULL;
+ static char *propnames[] = {
+ "DFP,EDID", "LCD,EDID", "EDID", "EDID1", "EDID,B", "EDID,A", NULL };
+ int i;
dp = pci_device_to_OF_node(pd);
- pedid = (unsigned char *)get_property(dp, "EDID,B", 0);
-
- if (pedid) {
+ for (; dp != NULL; dp = dp->child) {
+ disptype = (unsigned char *)get_property(dp, "display-type", NULL);
+ if (disptype == NULL)
+ continue;
+ if (strncmp(disptype, "LCD", 3) != 0)
+ continue;
+ for (i = 0; propnames[i] != NULL; ++i) {
+ pedid = (unsigned char *)
+ get_property(dp, propnames[i], NULL);
+ if (pedid != NULL) {
par->EDID = pedid;
return 1;
- } else
+ }
+ }
+ }
return 0;
}
#endif /* CONFIG_PPC_OF */
Hi,
here's another piece of rivafb fixing that helps the driver on ppc
pbooks again a bit further. It corrects several wrong NV_ARCH_20
settings which are actually NV_ARCH_10 as determined by the PCIId.
Patch is against 2.6.7-rc3.
Cheers,
-- Guido
signed-off-by: Guido Guenther <[email protected]>
--- ../linux-2.6.7-rc2.orig/drivers/video/riva/fbdev.c 2004-06-04 17:40:30.000000000 +0200
+++ drivers/video/riva/fbdev.c 2004-06-16 08:50:41.122924416 +0200
@@ -173,18 +174,18 @@
{ "GeForce2-GTS", NV_ARCH_10 },
{ "GeForce2-ULTRA", NV_ARCH_10 },
{ "Quadro2-PRO", NV_ARCH_10 },
- { "GeForce4-MX-460", NV_ARCH_20 },
- { "GeForce4-MX-440", NV_ARCH_20 },
- { "GeForce4-MX-420", NV_ARCH_20 },
- { "GeForce4-440-GO", NV_ARCH_20 },
- { "GeForce4-420-GO", NV_ARCH_20 },
- { "GeForce4-420-GO-M32", NV_ARCH_20 },
- { "Quadro4-500-XGL", NV_ARCH_20 },
- { "GeForce4-440-GO-M64", NV_ARCH_20 },
- { "Quadro4-200", NV_ARCH_20 },
- { "Quadro4-550-XGL", NV_ARCH_20 },
- { "Quadro4-500-GOGL", NV_ARCH_20 },
- { "GeForce2", NV_ARCH_20 },
+ { "GeForce4-MX-460", NV_ARCH_10 },
+ { "GeForce4-MX-440", NV_ARCH_10 },
+ { "GeForce4-MX-420", NV_ARCH_10 },
+ { "GeForce4-440-GO", NV_ARCH_10 },
+ { "GeForce4-420-GO", NV_ARCH_10 },
+ { "GeForce4-420-GO-M32", NV_ARCH_10 },
+ { "Quadro4-500-XGL", NV_ARCH_10 },
+ { "GeForce4-440-GO-M64", NV_ARCH_10 },
+ { "Quadro4-200", NV_ARCH_10 },
+ { "Quadro4-550-XGL", NV_ARCH_10 },
+ { "Quadro4-500-GOGL", NV_ARCH_10 },
+ { "GeForce2", NV_ARCH_10 },
{ "GeForce3", NV_ARCH_20 },
{ "GeForce3 Ti 200", NV_ARCH_20 },
{ "GeForce3 Ti 500", NV_ARCH_20 },
Hi,
On Wed, Jun 16, 2004 at 09:03:27AM +0200, Guido Guenther wrote:
> here's another piece of rivafb fixing that helps the driver on ppc
> pbooks again a bit further. It corrects several wrong NV_ARCH_20
> settings which are actually NV_ARCH_10 as determined by the PCIId.
Any comments on this patch?
-- Guido
Guido Guenther wrote:
> Hi,
> On Wed, Jun 16, 2004 at 09:03:27AM +0200, Guido Guenther wrote:
> > here's another piece of rivafb fixing that helps the driver on ppc
> > pbooks again a bit further. It corrects several wrong NV_ARCH_20
> > settings which are actually NV_ARCH_10 as determined by the PCIId.
> Any comments on this patch?
I applied it to 2.6.7; rivafb didn't work before, didn't work
after :) (details are/were in the "Framebuffer with nVidia
etc" thread)
--
Giuseppe "Oblomov" Bilotta
Can't you see
It all makes perfect sense
Expressed in dollar and cents
Pounds shillings and pence
(Roger Waters)
On Sun, 2004-06-20 at 14:25, Guido Guenther wrote:
> Hi,
> On Wed, Jun 16, 2004 at 09:03:27AM +0200, Guido Guenther wrote:
> > here's another piece of rivafb fixing that helps the driver on ppc
> > pbooks again a bit further. It corrects several wrong NV_ARCH_20
> > settings which are actually NV_ARCH_10 as determined by the PCIId.
> Any comments on this patch?
I don't, but did you ask on the linux-fbdev list ?
Ben.
On Sun, Jun 20, 2004 at 11:11:41PM -0500, Benjamin Herrenschmidt wrote:
> On Sun, 2004-06-20 at 14:25, Guido Guenther wrote:
> > Hi,
> > On Wed, Jun 16, 2004 at 09:03:27AM +0200, Guido Guenther wrote:
> > > here's another piece of rivafb fixing that helps the driver on ppc
> > > pbooks again a bit further. It corrects several wrong NV_ARCH_20
> > > settings which are actually NV_ARCH_10 as determined by the PCIId.
> > Any comments on this patch?
>
> I don't, but did you ask on the linux-fbdev list ?
I've sent a patch to James several weeks ago that removes the complete
table with NV_ARCH_ mappings and uses PCI-IDs instead. He applied it to
the fbdev tree, but it didn't end up in Linus tree yet.
This patch just fixes what's obviously wrong. More cleanup to come once
rivafb is in a usable shape for me again.
Cheers,
-- Guido
On Mon, 2004-06-21 at 02:11, Guido Guenther wrote:
> On Sun, Jun 20, 2004 at 11:11:41PM -0500, Benjamin Herrenschmidt wrote:
> > On Sun, 2004-06-20 at 14:25, Guido Guenther wrote:
> > > Hi,
> > > On Wed, Jun 16, 2004 at 09:03:27AM +0200, Guido Guenther wrote:
> > > > here's another piece of rivafb fixing that helps the driver on ppc
> > > > pbooks again a bit further. It corrects several wrong NV_ARCH_20
> > > > settings which are actually NV_ARCH_10 as determined by the PCIId.
> > > Any comments on this patch?
> >
> > I don't, but did you ask on the linux-fbdev list ?
> I've sent a patch to James several weeks ago that removes the complete
> table with NV_ARCH_ mappings and uses PCI-IDs instead. He applied it to
> the fbdev tree, but it didn't end up in Linus tree yet.
> This patch just fixes what's obviously wrong. More cleanup to come once
> rivafb is in a usable shape for me again.
Ok, well, it looks good to me. There is no active maintainer for rivafb
so, I suppose if nobody complains of breakage, it should be fine.
Ben.
On Mon, Jun 21, 2004 at 10:36:44AM -0500, Benjamin Herrenschmidt wrote:
> Ok, well, it looks good to me. There is no active maintainer for rivafb
> so, I suppose if nobody complains of breakage, it should be fine.
It really shouldn't. PCIID's with 0x01X0 are NV10. There are others
which are NV40 but they aren't even recognized by rivafb yet.
Cheers,
-- Guido
Could you compare it to my latest Nvidia driver?
On Sun, 20 Jun 2004, Guido Guenther wrote:
> Hi,
> On Wed, Jun 16, 2004 at 09:03:27AM +0200, Guido Guenther wrote:
> > here's another piece of rivafb fixing that helps the driver on ppc
> > pbooks again a bit further. It corrects several wrong NV_ARCH_20
> > settings which are actually NV_ARCH_10 as determined by the PCIId.
> Any comments on this patch?
> -- Guido
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
On Wed, Jun 23, 2004 at 08:35:56PM +0100, [email protected] wrote:
>
> Could you compare it to my latest Nvidia driver?
You applied a patch I sent to you that removes this array and determines
the NV_TYPE by PCI ID about 5 months ago, so there's no need for this
fix in you tree.
Cheers,
-- Guido