[PATCH] Fix ConnectorTable crash in radeon_output.c

Alex Deucher alexdeucher at gmail.com
Fri Feb 24 06:43:08 PST 2012

On Fri, Feb 24, 2012 at 5:24 AM, Hans Verkuil <hverkuil at xs4all.nl> 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



> The actual crash occurred in RADEONPrintPortMap().
> Signed-off-by: Hans Verkuil <hverkuil at xs4all.nl>
> 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;

More information about the xorg-driver-ati mailing list