backport of fix for wrong frequencies on Radeon Xpress 200

Alex Deucher alexdeucher at gmail.com
Mon Mar 9 07:40:52 PDT 2009


On Mon, Mar 9, 2009 at 5:54 AM, Brice Goglin <brice.goglin at gmail.com> wrote:
> Hello,
>
> We're looking at fixing some wrong frequency problems on Xpress 200 [1,2].
> Radeon 6.11 seems to work fine but we want to backport something in 6.9.0
> to update Debian Lenny. Could anybody please comment on the patch below ?
> (from Bernhard R. Link)
>
> It modifies nothing but adds another RADEON_CLOCK_CNTL_INDEX to 0
> setting, like it is already there for CHIP_FAMILY_RV410, just more
> limited (not within RADEONRestoreLVDSRegisters but only after one
> specific call of it and with more guards) and changes nothing else.
>

This isn't really a fix.  It just happens to work by luck.  The
problem is we didn't properly detect LVDS vis not on IGP chips since
they shared pci ids between desktop and mobility setups.  This patch
happens to work because, with 6.9.0 the driver doesn't think there is
tmds and thus doesn't touch the tmds registers because it's think it's
lvds, so you end up with tmds left as set by the bios.  This patch
then selects pll div set 0 which IIRC, is the pll set used by the
bios.  You probably want these two patches to fix the connector
detection:
902eaf768142c6c7dcc487e10775027b84cd1f9a
8b8990917809b9a35c6e9c1b9e3b12ff81c6dbb3

Alex

> thanks,
> Brice
>
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508999
> [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518782
>
> --- xserver-xorg-video-ati-6.9.0.orig/src/legacy_output.c
> +++ xserver-xorg-video-ati-6.9.0/src/legacy_output.c
> @@ -153,6 +153,15 @@
>
>  }
>
> +static void
> +RADEONSelDiv0(ScrnInfoPtr pScrn)
> +{
> +       RADEONInfoPtr  info       = RADEONPTR(pScrn);
> +       unsigned char *RADEONMMIO = info->MMIO;
> +
> +       OUTREG(RADEON_CLOCK_CNTL_INDEX, 0);
> +}
> +
>  /* Write LVDS registers */
>  void
>  RADEONRestoreLVDSRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore)
> @@ -165,7 +174,7 @@
>        /*OUTREG(RADEON_LVDS_PLL_CNTL,  restore->lvds_pll_cntl);*/
>
>        if (info->ChipFamily == CHIP_FAMILY_RV410) {
> -           OUTREG(RADEON_CLOCK_CNTL_INDEX, 0);
> +           RADEONSelDiv0(pScrn);
>        }
>     }
>
> @@ -1417,6 +1426,8 @@
>     case MT_LCD:
>        ErrorF("restore LVDS\n");
>        RADEONRestoreLVDSRegisters(pScrn, info->ModeReg);
> +       if (radeon_crtc->crtc_id == 0 && info->ChipFamily == CHIP_FAMILY_RS480)
> +           RADEONSelDiv0(pScrn);
>        break;
>     case MT_DFP:
>        if (radeon_output->TMDSType == TMDS_INT) {
>
>
>
> --- xserver-xorg-video-ati-6.9.0.orig/src/legacy_output.c
> +++ xserver-xorg-video-ati-6.9.0/src/legacy_output.c
> @@ -153,6 +153,15 @@
>
>  }
>
> +static void
> +RADEONSelDiv0(ScrnInfoPtr pScrn)
> +{
> +       RADEONInfoPtr  info       = RADEONPTR(pScrn);
> +       unsigned char *RADEONMMIO = info->MMIO;
> +
> +       OUTREG(RADEON_CLOCK_CNTL_INDEX, 0);
> +}
> +
>  /* Write LVDS registers */
>  void
>  RADEONRestoreLVDSRegisters(ScrnInfoPtr pScrn, RADEONSavePtr restore)
> @@ -165,7 +174,7 @@
>        /*OUTREG(RADEON_LVDS_PLL_CNTL,  restore->lvds_pll_cntl);*/
>
>        if (info->ChipFamily == CHIP_FAMILY_RV410) {
> -           OUTREG(RADEON_CLOCK_CNTL_INDEX, 0);
> +           RADEONSelDiv0(pScrn);
>        }
>     }
>
> @@ -1417,6 +1426,8 @@
>     case MT_LCD:
>        ErrorF("restore LVDS\n");
>        RADEONRestoreLVDSRegisters(pScrn, info->ModeReg);
> +       if (radeon_crtc->crtc_id == 0 && info->ChipFamily == CHIP_FAMILY_RS480)
> +           RADEONSelDiv0(pScrn);
>        break;
>     case MT_DFP:
>        if (radeon_output->TMDSType == TMDS_INT) {
>
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
>
>


More information about the xorg-driver-ati mailing list