Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-05-02 Thread Hans Verkuil
On Wed May 2 2012 10:53:45 Michel Dänzer wrote:
> On Mit, 2012-05-02 at 08:48 +0200, Hans Verkuil wrote:
> > On Tue April 3 2012 08:54:53 Michel Dänzer wrote:
> > > On Fre, 2012-03-30 at 19:37 +0200, Hans Verkuil wrote:
> > > > On Friday, February 24, 2012 15:15:40 Michel Dänzer wrote:
> > > > > 
> > > > > FWIW, I think most likely the problem is that acceleration is 
> > > > > disabled,
> > > 
> > > The Xorg.0.log file confirms this.
> > > 
> > > 
> > > > > probably because the GPU microcode from the firmware-linux-nonfree
> > > > > package is missing.
> > > > 
> > > > I have that package installed, but it doesn't seem to be loading any 
> > > > firmware.
> > > 
> > > Please provide the dmesg output.
> > 
> > Here it is!
> 
> [...]
> 
> > [0.00] Using Sam440ep machine description
> 
> [...]
> 
> > [2.542438] [drm] Loading R200 Microcode
> 
> This is where it's loading the firmware aka microcode.
> 
> 
> > [2.713029] [drm:r100_ring_test] *ERROR* radeon: ring test failed 
> > (scratch(0x15E4)=0xCAFEDEAD)
> > [2.738769] [drm:r100_cp_init] *ERROR* radeon: cp isn't working (-22).
> > [2.758263] radeon :00:0c.0: failed initializing CP (-22).
> > [2.775678] radeon :00:0c.0: Disabling GPU acceleration
> 
> This is why acceleration is disabled: the test of basic acceleration
> functionality is failing.
> 
> AFAICT from my e-mail archive, the 440 has >32 bit physical addresses
> and is not cache coherent, neither of which is supported by the radeon
> driver yet.
> 
> For the latter, you could try if hacking the driver as described in
> http://lists.ozlabs.org/pipermail/linuxppc-dev/2012-April/097668.html
> helps.

I tried this but that had no effect that I could see.

> For the former, Benjamin Herrenschmidt (CC'd) might be able to
> point you to some patches I keep hearing about but haven't seen yet. 

I'd be happy to test out any patches you might have. The radeon driver as
is is actually way better than the old driver if it wasn't for the wrong
colors.

Regards,

Hans
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-05-02 Thread Hans Verkuil
On Tue April 3 2012 08:54:53 Michel Dänzer wrote:
> On Fre, 2012-03-30 at 19:37 +0200, Hans Verkuil wrote:
> > On Friday, February 24, 2012 15:15:40 Michel Dänzer wrote:
> > > 
> > > FWIW, I think most likely the problem is that acceleration is disabled,
> 
> The Xorg.0.log file confirms this.
> 
> 
> > > probably because the GPU microcode from the firmware-linux-nonfree
> > > package is missing.
> > 
> > I have that package installed, but it doesn't seem to be loading any 
> > firmware.
> 
> Please provide the dmesg output.

Here it is!

Regards,

Hans

[0.00] Using Sam440ep machine description
[0.00] Initializing cgroup subsys cpu
[0.00] Linux version 3.3.0-cadwal (hans@tschai) (gcc version 4.6.2 
(GCC) ) #51 Fri Mar 30 18:46:45 CEST 2012
[0.00] Found legacy serial port 0 for /plb/opb/serial@ef600300
[0.00]   mem=ef600300, taddr=ef600300, irq=0, clk=555, speed=115200
[0.00] Found legacy serial port 1 for /plb/opb/serial@ef600400
[0.00]   mem=ef600400, taddr=ef600400, irq=0, clk=555, speed=0
[0.00] Found legacy serial port 2 for /plb/opb/serial@ef600500
[0.00]   mem=ef600500, taddr=ef600500, irq=0, clk=555, speed=0
[0.00] Found legacy serial port 3 for /plb/opb/serial@ef600600
[0.00]   mem=ef600600, taddr=ef600600, irq=0, clk=555, speed=0
[0.00] bootconsole [udbg0] enabled
[0.00] Top of RAM: 0x1000, Total RAM: 0x1000
[0.00] Memory hole size: 0MB
[0.00] Zone PFN ranges:
[0.00]   DMA  0x -> 0x0001
[0.00]   Normal   empty
[0.00]   HighMem  empty
[0.00] Movable zone start PFN for each node
[0.00] Early memory PFN ranges
[0.00] 0: 0x -> 0x0001
[0.00] On node 0 totalpages: 131071
[0.00] free_area_init_node: node 0, pgdat c0730260, node_mem_map 
c08b4000
[0.00]   DMA zone: 1024 pages used for memmap
[0.00]   DMA zone: 0 pages reserved
[0.00]   DMA zone: 130047 pages, LIFO batch:31
[0.00] MMU: Allocated 1088 bytes of context maps for 255 contexts
[0.00] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[0.00] pcpu-alloc: [0] 0 
[0.00] Built 1 zonelists in Zone order, mobility grouping on.  Total 
pages: 130047
[0.00] Kernel command line: root=/dev/sda3 
radeonfb.monitor_layout="TMDS,NONE" radeonfb.mode_option="800x600-16@60" 
console=ttyS0,38400 console=tty0
[0.00] PID hash table entries: 2048 (order: 1, 8192 bytes)
[0.00] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[0.00] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[0.00] High memory: 0k
[0.00] Memory: 510776k/524284k available (7096k kernel code, 13508k 
reserved, 304k data, 1500k bss, 172k init)
[0.00] Kernel virtual memory layout:
[0.00]   * 0xfffcf000..0xf000  : fixmap
[0.00]   * 0xffc0..0xffe0  : highmem PTEs
[0.00]   * 0xffa0..0xffc0  : consistent mem
[0.00]   * 0xff9fe000..0xffa0  : early ioremap
[0.00]   * 0xe100..0xff9fe000  : vmalloc & ioremap
[0.00] NR_IRQS:512
[0.00] UIC0 (32 IRQ sources) at DCR 0xc0
[0.00] UIC1 (32 IRQ sources) at DCR 0xd0
[0.00] time_init: decrementer frequency = 666.60 MHz
[0.00] time_init: processor frequency   = 666.60 MHz
[0.00] clocksource: timebase mult[180] shift[24] registered
[0.00] clockevent: decrementer mult[aa8e] shift[32] cpu[0]
[0.00] Console: colour dummy device 80x25
[0.00] console [tty0] enabled, bootconsole disabled
[0.016170] pid_max: default: 32768 minimum: 301
[0.016315] Security Framework initialized
[0.016387] Mount-cache hash table entries: 512
[0.017418] Initializing cgroup subsys cpuacct
[0.017454] Initializing cgroup subsys devices
[0.019363] NET: Registered protocol family 16
[0.024045] PCI host bridge /plb/pci@ec00 (primary) ranges:
[0.024089]  MEM 0xa000..0xbfff -> 
0xa000 
[0.024116]   IO 0xe800..0xe800 -> 0x
[0.024148] 4xx PCI DMA offset set to 0x
[0.024203] 4xx PCI DMA window base to 0x
[0.024220] DMA window size 0x8000
[0.024727] PCI: Probing PCI hardware
[0.025128] PCI host bridge to bus :00
[0.025162] pci_bus :00: root bus resource [io  0x-0x]
[0.025186] pci_bus :00: root bus resource [mem 0xa000-0xbfff]
[0.025245] pci :00:00.0: [1014:027f] type 0 class 0x000680
[0.025275] pci :00:00.0: reg 14: [mem 0x-0x7fff pref]
[0.025312] PCI: Hiding 4xx host bridge resources :00:00.0
[0.025346] pci 00

Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-05-02 Thread Hans Verkuil
On Tue April 3 2012 14:40:02 Alex Deucher wrote:
> On Tue, Apr 3, 2012 at 8:39 AM, Alex Deucher  wrote:
> > On Fri, Mar 30, 2012 at 1:38 PM, Hans Verkuil  wrote:
> >> Hi Alex,
> >>
> >> Sorry for the delay, but Real Life intervened and I didn't have access to 
> >> the
> >> hardware for over a month.
> >>
> >> On Friday, February 24, 2012 15:43:08 Alex Deucher wrote:
> >>> On Fri, Feb 24, 2012 at 5:24 AM, Hans Verkuil  wrote:
> >>> > Hi Alex,
> >>> >
> >>> > A few weeks ago I spent some time trying to get my sam440ep PPC board to
> >>> > work with a recent kernel/debian distro. I discovered a bug causing it
> >>> > to crash. It's a regression of commit 
> >>> > 82f12e5a40c1fbcb91910a0f8b725c34fff02aae
> >>> > from January 2009. Clearly, this board isn't used very often :-)
> >>> >
> >>>
> >>> Well, most people use KMS nowadays and most boards without an x86
> >>> vbios (Mac and Sun cards mostly), already have connector tables.  Good
> >>> catch on the patch.
> >>>
> >>> > It would be nice if this patch is merged.
> >>> >
> >>> > I've also tried to get drm to work with this board, but unfortunately 
> >>> > the colors
> >>> > have the wrong endianness and I don't really have any idea how to fix 
> >>> > that (or
> >>> > even where to look for that matter). For the record, this board has a 
> >>> > ATI Radeon
> >>> > Mobility M9.
> >>> >
> >>> > Regards,
> >>> >
> >>> >Hans
> >>> >
> >>> > Patch description:
> >>> >
> >>> > The sam440ep PPC board requires a ConnectorTable xorg.conf option, but 
> >>> > putting
> >>> > in that option causes the radeon driver to crash. I finally traced it 
> >>> > to a
> >>> > copy-and-paste bug in radeon_output.c as a result of a major rework in 
> >>> > commit
> >>> > 82f12e5a40c1fbcb91910a0f8b725c34fff02aae.
> >>>
> >>> What connectortable option did you have to use?  We might as well try
> >>> and add option for it so future users won't have to manually figure it
> >>> out.
> >>
> >> Here it is:
> >>
> >> Option  "ConnectorTable""100,2,1,2,96,1,0,1"
> >>
> >
> > Thanks.  Does this card also have an s-video or composite tv-out
> > connector?  Also what are the pci subsystem ids so I can hopefully
> > match up the connector table automatically.
> 
> And the pci device ids of course.

Here it is:

00:0c.0 VGA compatible controller [0300]: ATI Technologies Inc Radeon RV250 
[Mobility FireGL 9000] [1002:4c66] (rev 02) (prog-if 00 [VGA controller])
Subsystem: ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] 
[1002:4c66]
Flags: bus master, stepping, 66MHz, medium devsel, latency 32, IRQ 25
Memory at a000 (32-bit, prefetchable) [size=128M]
I/O ports at 1000 [size=256]
Memory at a81a (32-bit, non-prefetchable) [size=64K]
Expansion ROM at a818 [disabled] [size=128K]
Capabilities: [50] Power Management version 2
Kernel driver in use: radeon

It has a S-Video out as well (never tested it, though) and internal VGA
and LVDS headers.

See also the user manual:

http://www.acube-systems.biz/download/sam_manual_1.1.pdf

Regards,

Hans
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-04-03 Thread Hans Verkuil
On Tuesday, April 03, 2012 14:40:02 Alex Deucher wrote:
> On Tue, Apr 3, 2012 at 8:39 AM, Alex Deucher  wrote:
> > On Fri, Mar 30, 2012 at 1:38 PM, Hans Verkuil  wrote:
> >> Hi Alex,
> >>
> >> Sorry for the delay, but Real Life intervened and I didn't have access to 
> >> the
> >> hardware for over a month.
> >>
> >> On Friday, February 24, 2012 15:43:08 Alex Deucher wrote:
> >>> On Fri, Feb 24, 2012 at 5:24 AM, Hans Verkuil  wrote:
> >>> > Hi Alex,
> >>> >
> >>> > A few weeks ago I spent some time trying to get my sam440ep PPC board to
> >>> > work with a recent kernel/debian distro. I discovered a bug causing it
> >>> > to crash. It's a regression of commit 
> >>> > 82f12e5a40c1fbcb91910a0f8b725c34fff02aae
> >>> > from January 2009. Clearly, this board isn't used very often :-)
> >>> >
> >>>
> >>> Well, most people use KMS nowadays and most boards without an x86
> >>> vbios (Mac and Sun cards mostly), already have connector tables.  Good
> >>> catch on the patch.
> >>>
> >>> > It would be nice if this patch is merged.
> >>> >
> >>> > I've also tried to get drm to work with this board, but unfortunately 
> >>> > the colors
> >>> > have the wrong endianness and I don't really have any idea how to fix 
> >>> > that (or
> >>> > even where to look for that matter). For the record, this board has a 
> >>> > ATI Radeon
> >>> > Mobility M9.
> >>> >
> >>> > Regards,
> >>> >
> >>> >Hans
> >>> >
> >>> > Patch description:
> >>> >
> >>> > The sam440ep PPC board requires a ConnectorTable xorg.conf option, but 
> >>> > putting
> >>> > in that option causes the radeon driver to crash. I finally traced it 
> >>> > to a
> >>> > copy-and-paste bug in radeon_output.c as a result of a major rework in 
> >>> > commit
> >>> > 82f12e5a40c1fbcb91910a0f8b725c34fff02aae.
> >>>
> >>> What connectortable option did you have to use?  We might as well try
> >>> and add option for it so future users won't have to manually figure it
> >>> out.
> >>
> >> Here it is:
> >>
> >> Option  "ConnectorTable""100,2,1,2,96,1,0,1"
> >>
> >
> > Thanks.  Does this card also have an s-video or composite tv-out
> > connector?  Also what are the pci subsystem ids so I can hopefully
> > match up the connector table automatically.
> 
> And the pci device ids of course.

You'll have to wait a few weeks until I have access to the hardware again.

Once I have the information I'll mail you again.

Regards,

Hans

> 
> Alex
> 
> >
> > Alex
> >
> >> Regards,
> >>
> >>Hans
> >>
> >>>
> >>> Thanks!
> >>>
> >>> Alex
> >>>
> >>> >
> >>> > The actual crash occurred in RADEONPrintPortMap().
> >>> >
> >>> > Signed-off-by: Hans Verkuil 
> >>> >
> >>> > diff --git a/src/radeon_output.c b/src/radeon_output.c
> >>> > index ccde346..5abd60e 100644
> >>> > --- a/src/radeon_output.c
> >>> > +++ b/src/radeon_output.c
> >>> > @@ -3002,9 +3002,9 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
> >>> >info->BiosConnector[i].devices |= 
> >>> > ATOM_DEVICE_CRT2_SUPPORT;
> >>> >if (!radeon_add_encoder(pScrn,
> >>> >
> >>> > radeon_get_encoder_id_from_supported_device(pScrn,
> >>> > -   
> >>> > ATOM_DEVICE_CRT1_SUPPORT,
> >>> > +   
> >>> > ATOM_DEVICE_CRT2_SUPPORT,
> >>> > 
> >>> >2),
> >>> > -   ATOM_DEVICE_CRT1_SUPPORT))
> >>> > +   ATOM_DEVICE_CRT2_SUPPORT))
> >>> >return FALSE;
> >>> >info->BiosConnector[i].load_detection = FALSE;
> >>> >break;
> >>>
> 
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-04-03 Thread Hans Verkuil
On Tuesday, April 03, 2012 08:54:53 Michel Dänzer wrote:
> On Fre, 2012-03-30 at 19:37 +0200, Hans Verkuil wrote:
> > On Friday, February 24, 2012 15:15:40 Michel Dänzer wrote:
> > > 
> > > FWIW, I think most likely the problem is that acceleration is disabled,
> 
> The Xorg.0.log file confirms this.
> 
> 
> > > probably because the GPU microcode from the firmware-linux-nonfree
> > > package is missing.
> > 
> > I have that package installed, but it doesn't seem to be loading any 
> > firmware.
> 
> Please provide the dmesg output.

No problem. I don't have access to the hardware for a few weeks, but once I
have I'll mail the dmesg output.

Regards,

Hans
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-04-01 Thread Hans Verkuil
Hi Michel,

Sorry for the delay, but Real Life intervened and I didn't have access to the
test hardware for over a month.

On Friday, February 24, 2012 15:15:40 Michel Dänzer wrote:
> On Fre, 2012-02-24 at 13:25 +0100, Hans Verkuil wrote: 
> > On Friday, February 24, 2012 13:19:56 Michel Dänzer wrote:
> > > On Fre, 2012-02-24 at 12:46 +0100, Hans Verkuil wrote: 
> > > > On Friday, February 24, 2012 12:41:15 Michel Dänzer wrote:
> > > > > 
> > > > > Under what circumstances exactly you're seeing wrong colours:
> > > > > 
> > > > > In console and/or in X?
> > > > 
> > > > X. The console seems to be fine.
> > > > 
> > > > > 
> > > > > If the latter, with all apps or only certain ones, e.g. using 3D
> > > > > acceleration?
> > > > 
> > > > All apps. Actually, I don't think I tested 3D apps so I can't be
> > > > 100% certain about that. But the whole desktop is with swapped colors.

I've tested with glxgears and there the colors are also swapped.

> > > 
> > > Please provide the Xorg.0.log file corresponding to the problem.

Attached.

> > 
> > I'll do that once I have access to the board.
> 
> FWIW, I think most likely the problem is that acceleration is disabled,
> probably because the GPU microcode from the firmware-linux-nonfree
> package is missing.

I have that package installed, but it doesn't seem to be loading any firmware.

Regards,

Hans

> 
> I'm not sure why the shadow framebuffer paths result in wrong
> colours. :( But I can reproduce it by disabling acceleration with Option
> "Accel" "off".
> 
> 
> 
[27.631] 
X.Org X Server 1.11.4
Release Date: 2012-01-27
[27.642] X Protocol Version 11, Revision 0
[27.642] Build Operating System: Linux 2.6.32-5-powerpc64 ppc Debian
[27.642] Current Operating System: Linux cadwal 3.3.0-cadwal #51 Fri Mar 30 18:46:45 CEST 2012 ppc
[27.642] Kernel command line: root=/dev/sda3 radeonfb.monitor_layout="TMDS,NONE" radeonfb.mode_option="800x600-16@60" console=ttyS0,38400 console=tty0
[27.643] Build Date: 05 March 2012  12:28:46AM
[27.643] xorg-server 2:1.11.4-1 (Cyril Brulebois ) 
[27.643] Current version of pixman: 0.24.4
[27.643] 	Before reporting problems, check http://wiki.x.org
	to make sure that you have the latest version.
[27.643] Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[27.644] (==) Log file: "/var/log/Xorg.0.log", Time: Fri Mar 30 20:59:15 2012
[27.663] (==) Using config file: "/etc/X11/xorg.conf"
[27.663] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[27.674] (==) ServerLayout "X.org Configured"
[27.674] (**) |-->Screen "Screen0" (0)
[27.674] (**) |   |-->Monitor "Monitor0"
[27.680] (**) |   |-->Device "Card0"
[27.680] (**) |-->Screen "Screen1" (1)
[27.680] (**) |   |-->Monitor "Monitor1"
[27.681] (**) |   |-->Device "Card1"
[27.681] (**) |-->Input Device "Mouse0"
[27.682] (**) |-->Input Device "Keyboard0"
[27.682] (==) Automatically adding devices
[27.682] (==) Automatically enabling devices
[27.696] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[27.697] 	Entry deleted from font path.
[27.697] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[27.697] 	Entry deleted from font path.
[27.697] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[27.697] 	Entry deleted from font path.
[27.707] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[27.707] 	Entry deleted from font path.
[27.707] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[27.708] 	Entry deleted from font path.
[27.715] (WW) The directory "/usr/share/fonts/X11/cyrillic" does not exist.
[27.715] 	Entry deleted from font path.
[27.715] (WW) The directory "/usr/share/fonts/X11/100dpi/" does not exist.
[27.715] 	Entry deleted from font path.
[27.715] (WW) The directory "/usr/share/fonts/X11/75dpi/" does not exist.
[27.715] 	Entry deleted from font path.
[27.716] (WW) The directory "/usr/share/fonts/X11/100dpi" does not exist.
[27.716] 	Entry deleted from font path.
[27.716] (WW) The directory "/usr/share/fonts/X11/75dpi" does not exist.
[27.716] 	Entry deleted from font path.
[27.716

Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-02-24 Thread Hans Verkuil
On Friday, February 24, 2012 13:19:56 Michel Dänzer wrote:
> On Fre, 2012-02-24 at 12:46 +0100, Hans Verkuil wrote: 
> > On Friday, February 24, 2012 12:41:15 Michel Dänzer wrote:
> > > 
> > > Under what circumstances exactly you're seeing wrong colours:
> > > 
> > > In console and/or in X?
> > 
> > X. The console seems to be fine.
> > 
> > > 
> > > If the latter, with all apps or only certain ones, e.g. using 3D
> > > acceleration?
> > 
> > All apps. Actually, I don't think I tested 3D apps so I can't be
> > 100% certain about that. But the whole desktop is with swapped colors.
> 
> Please provide the Xorg.0.log file corresponding to the problem.

I'll do that once I have access to the board.

Regards,

Hans
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-02-24 Thread Hans Verkuil
On Friday, February 24, 2012 12:41:15 Michel Dänzer wrote:
> On Fre, 2012-02-24 at 12:33 +0100, Hans Verkuil wrote: 
> > On Friday, February 24, 2012 11:58:59 Michel Dänzer wrote:
> > > On Fre, 2012-02-24 at 11:24 +0100, Hans Verkuil wrote: 
> > > > 
> > > > I've also tried to get drm to work with this board, but unfortunately 
> > > > the colors
> > > > have the wrong endianness and I don't really have any idea how to fix 
> > > > that (or
> > > > even where to look for that matter). For the record, this board has a 
> > > > ATI Radeon
> > > > Mobility M9.
> > > 
> > > The colours are wrong doing what?
> > 
> > The color components are in the wrong endian order (ABGR instead of RGBA). 
> > The PPC
> > is a big endian machine
> 
> I know, I've fixed a lot of problems like that. :)
> 
> > and as far as I could tell the radeon driver actually detected that
> > correctly, but there is still some 32-bit swap going on somewhere.
> 
> Under what circumstances exactly you're seeing wrong colours:
> 
> In console and/or in X?

X. The console seems to be fine.

> 
> If the latter, with all apps or only certain ones, e.g. using 3D
> acceleration?

All apps. Actually, I don't think I tested 3D apps so I can't be
100% certain about that. But the whole desktop is with swapped colors.

Regards,

Hans
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


Re: [PATCH] Fix ConnectorTable crash in radeon_output.c

2012-02-24 Thread Hans Verkuil
On Friday, February 24, 2012 11:58:59 Michel Dänzer wrote:
> On Fre, 2012-02-24 at 11:24 +0100, Hans Verkuil wrote: 
> > 
> > I've also tried to get drm to work with this board, but unfortunately the 
> > colors
> > have the wrong endianness and I don't really have any idea how to fix that 
> > (or
> > even where to look for that matter). For the record, this board has a ATI 
> > Radeon
> > Mobility M9.
> 
> The colours are wrong doing what?

The color components are in the wrong endian order (ABGR instead of RGBA). The 
PPC
is a big endian machine and as far as I could tell the radeon driver actually
detected that correctly, but there is still some 32-bit swap going on somewhere.

When I use the old framebuffer support, then it is working correctly.

I don't have access to the board at the moment, but some pointers would be 
welcome.
I can try those later.

Regards,

Hans
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati


[PATCH] Fix ConnectorTable crash in radeon_output.c

2012-02-24 Thread Hans Verkuil
Hi Alex,

A few weeks ago I spent some time trying to get my sam440ep PPC board to
work with a recent kernel/debian distro. I discovered a bug causing it
to crash. It's a regression of commit 82f12e5a40c1fbcb91910a0f8b725c34fff02aae
from January 2009. Clearly, this board isn't used very often :-)

It would be nice if this patch is merged.

I've also tried to get drm to work with this board, but unfortunately the colors
have the wrong endianness and I don't really have any idea how to fix that (or
even where to look for that matter). For the record, this board has a ATI Radeon
Mobility M9.

Regards,

Hans

Patch description:

The sam440ep PPC board requires a ConnectorTable xorg.conf option, but putting
in that option causes the radeon driver to crash. I finally traced it to a
copy-and-paste bug in radeon_output.c as a result of a major rework in commit
82f12e5a40c1fbcb91910a0f8b725c34fff02aae.

The actual crash occurred in RADEONPrintPortMap().

Signed-off-by: Hans Verkuil 

diff --git a/src/radeon_output.c b/src/radeon_output.c
index ccde346..5abd60e 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -3002,9 +3002,9 @@ Bool RADEONSetupConnectors(ScrnInfoPtr pScrn)
info->BiosConnector[i].devices |= ATOM_DEVICE_CRT2_SUPPORT;
if (!radeon_add_encoder(pScrn,

radeon_get_encoder_id_from_supported_device(pScrn,
-   
ATOM_DEVICE_CRT1_SUPPORT,
+   
ATOM_DEVICE_CRT2_SUPPORT,

2),
-   ATOM_DEVICE_CRT1_SUPPORT))
+   ATOM_DEVICE_CRT2_SUPPORT))
return FALSE;
info->BiosConnector[i].load_detection = FALSE;
break;
___
xorg-driver-ati mailing list
xorg-driver-ati@lists.x.org
http://lists.x.org/mailman/listinfo/xorg-driver-ati