Subject: Re: radeonfb(4) does not use static EDID
To: Michael Lorenz <macallan@netbsd.org>
From: Marco Trillo <marcotrillo@gmail.com>
List: port-macppc
Date: 12/15/2007 21:18:09
Hi,

On 12/15/07, Michael Lorenz <macallan@netbsd.org> wrote:
> Hmm, this is weird - I'll have a look.

I think I've found the cause of the problem (but it's only speculation
since I haven't yet setup a -current source tree to compile). This is
how the OF tree looks:

/pci
 /ATY,MerlinParent (device_type = "ATY,DDParent")
   /ATY,Merlin_A@0 (device_type = "display")
   /ATY,Merlin_B@1 (device_type = "display")

However, the code in src/sys/arch/powerpc/oea/ofw_autoconf.c rev. 1.4
looks contains this:

226:  if (node != 0) {
227:    prop_dictionary_set_uint32(dict, "device_node", node);
228:
229:    memset(name, 0, sizeof(name));
230:    OF_getprop(node, "device_type", name, sizeof(name));
231:    if (strcmp(name, "display") == 0) {
232:      /* setup display properties for fb driver */
233:      prop_dictionary_set_bool(dict, "is_console", 0);
234:      copy_disp_props(dev, node, dict);
235:    }
236:  }

In line 231, it looks for a device_type of "display". However, the
actual PCI device node has a device_type value of "ATY,DDParent" and
not "display". Its children 'Merlin_A' and 'Merlin_B' do have the
"display" (and also the EDID property and the other properties of each
head).

The copy_disp_props() routine would work anyway since it looks for the
children to find the device_node alias, which should point to
ATY,Merlin_A.

The code in netbsd-4 didn't use the device_type property; it instead
used the device_node alias [and it also looked for children like the
copy_disp_props() routine does now].

Thanks,
Marco