NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-alpha/48431: radeonfb fails to initialize on Alpha Station DS15 and Alpha Station XP1000
> I'm a beginner.
> Please rewite for NetBSD style.
>
> diff -Naru src.orig/sys/arch/alpha/alpha/dec_6600.c
> src/sys/arch/alpha/alpha/dec_6600.c
> --- src.orig/sys/arch/alpha/alpha/dec_6600.c 2012-02-06 11:14:11.000000000
> +0900
> +++ src/sys/arch/alpha/alpha/dec_6600.c 2013-12-03 01:53:01.000000000
> +0900
> @@ -196,11 +196,16 @@
> static void
> dec_6600_device_register(device_t dev, void *aux)
> {
> + struct ctb *ctb;
> + device_t pdev;
> + prop_dictionary_t dict;
> static int found, initted, diskboot, netboot;
> static device_t primarydev, pcidev, ctrlrdev;
> struct bootdev_data *b = bootdev_data;
> device_t parent = device_parent(dev);
>
> + ctb = (struct ctb *)(((char *)hwrpb) + hwrpb->rpb_ctb_off);
> +
> if (found)
> return;
>
> @@ -370,6 +375,13 @@
> DR_VERBOSE(printf("booted_device = %s\n", device_xname(dev)));
> found = 1;
> }
> +
> + if (ctb->ctb_term_type == CTB_GRAPHICS) {
> + if ((pdev = device_parent(dev)) != NULL && device_is_a(pdev,
> "pci")) {
> + dict = device_properties(dev);
> + prop_dictionary_set_bool(dict, "is_console", 1);
> + }
> + }
> }
The current machine dependent device_register() function
only checks boot device.
If we'll add different checks to set device properties,
we have to add them before current boot device check
otherwise the function returns after boot device is found
(though usually boot device will be found after any PCI devices
because they are probed after interrupts are enabled).
To set the "is_console" property for radeon (and other possible
pci display drivers like machfb), we have to check not only
the parent "pci" but also whether the device is actually display.
Could you try this diff?
Index: dec_6600.c
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/alpha/dec_6600.c,v
retrieving revision 1.34
diff -u -p -r1.34 dec_6600.c
--- dec_6600.c 13 Oct 2012 17:58:54 -0000 1.34
+++ dec_6600.c 13 Jan 2014 16:18:09 -0000
@@ -201,6 +201,21 @@ dec_6600_device_register(device_t dev, v
struct bootdev_data *b = bootdev_data;
device_t parent = device_parent(dev);
+ /* set properties for PCI framebuffers */
+ if (parent != NULL && device_is_a(parent, "pci")) {
+ struct pci_attach_args *pa = aux;
+ struct ctb *ctb;
+ prop_dictionary_t dict;
+
+ ctb = (struct ctb *)(((char *)hwrpb) + hwrpb->rpb_ctb_off);
+ if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY &&
+ ctb->ctb_term_type == CTB_GRAPHICS) {
+ dict = device_properties(dev);
+ prop_dictionary_set_bool(dict, "is_console", true);
+ }
+ }
+
+ /* check boot device */
if (found)
return;
---
I wonder if we should prepare a separate common device_register(9)
function which can be shared among all machines that have PCI bus,
but it's a future improvement.
> I think that need ALPHA_PHYS_TO_K0SEG.
> Because direct-mapped addresses.
>
> diff -Naru src.orig/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
> src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c
> --- src.orig/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c 2012-02-06
> 11:14:15.000000000 +0900
> +++ src/sys/arch/alpha/pci/pci_bwx_bus_mem_chipdep.c 2013-12-01
> 21:33:43.000000000 +0900
> @@ -500,7 +500,7 @@
> int flags)
> {
>
> - return (alpha_btop(CHIP_MEM_SYS_START(v) + addr + off));
> + return (alpha_btop(ALPHA_PHYS_TO_K0SEG(CHIP_MEM_SYS_START(v) + addr
> + off)));
> }
>
> static inline void
I've committed the similar fix for this part. Thanks.
> Please define RADEONFB_DEPTH_32!
> If undefined RADEONFB_DEPTH_32, X window system is broken.
> Please see https://twitter.com/nullnilaki/status/407561289502703616/photo/1
:
> Please do not use radeonfb_set_backlight function.
> Because Display blackout.
> Use radeonfb_set_backlight function version.
> Please see http://twitpic.com/dnd9h7
> Do not use radeonfb_set_backlight function version.
> http://twitpic.com/dndawd
Can you any info why we need DEPTH_32 and
how does radeonfb_set_backlight() function fail?
Probably we should also handle these quirks by
device properties for now, rather than ugly ifdefs.
> If you use X Window System, apply this patch and build.sh -x and use "wsfb"
> driver at xorg.conf
>
> diff -Naru src.orig/share/mk/bsd.own.mk src/share/mk/bsd.own.mk
> --- src.orig/share/mk/bsd.own.mk 2012-11-25 04:45:11.000000000 +0900
> +++ src/share/mk/bsd.own.mk 2013-12-01 21:31:07.000000000 +0900
> @@ -847,7 +847,6 @@
> #
> .if \
> ${MACHINE} == "acorn32" || \
> - ${MACHINE} == "alpha" || \
> ${MACHINE} == "amiga" || \
> ${MACHINE} == "ews4800mips" || \
> ${MACHINE} == "mac68k" || \
IIRC the alpha port still sticks X11R6 (XFree) based server
for PCI TGA and TURBOchannel SFB/HFB/TFB etc.
Probably it's time to switch alpha port to Xorg server
(I guess TGA and SFB has fewer users and will also work
with wsfb driver), but it should be discussed on port-alpha@.
---
Izumi Tsutsui
Home |
Main Index |
Thread Index |
Old Index