mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guido Guenther <agx@sigxcpu.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [Patch]: Fix rivafb's OF parsing
Date: Tue, 1 Jun 2004 10:53:36 -0300	[thread overview]
Message-ID: <20040601135335.GA5406@bogon.ms20.nix> (raw)
In-Reply-To: <1086064086.1978.0.camel@gaston>

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 <agx@sigxpu.org>

--- ../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 */

  reply	other threads:[~2004-06-01 13:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-01  4:16 Guido Guenther
2004-06-01  4:28 ` Benjamin Herrenschmidt
2004-06-01 13:53   ` Guido Guenther [this message]
2004-06-02  9:57     ` Herbert Xu
2004-06-03 22:40     ` Benjamin Herrenschmidt
2004-06-04 15:49       ` Guido Guenther
2004-06-16  7:03     ` [Patch]: Fix rivafb's NV_ARCH_ Guido Guenther
2004-06-20 19:25       ` Guido Guenther
2004-06-20 22:05         ` Giuseppe Bilotta
2004-06-21  4:11         ` Benjamin Herrenschmidt
2004-06-21  7:11           ` Guido Guenther
2004-06-21 15:36             ` Benjamin Herrenschmidt
2004-06-21 19:51               ` Guido Guenther
2004-07-09 11:25               ` [Patch]: Fix rivafb's NV_ARCH_, cleanup DEBUG, backlight control on ppc Guido Guenther
2004-07-09 21:33                 ` Antonino A. Daplas
2004-06-23 19:35         ` [Patch]: Fix rivafb's NV_ARCH_ jsimmons
2004-06-24  6:55           ` Guido Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040601135335.GA5406@bogon.ms20.nix \
    --to=agx@sigxcpu.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®