rpms/xorg-x11-drv-ati/devel radeon-6.7.194-upstream-fixes.patch, NONE, 1.1 xorg-x11-drv-ati.spec, 1.62, 1.63 radeon-6.7.194-disable-rc410-dri.patch, 1.1, NONE

Dave Airlie (airlied) fedora-extras-commits at redhat.com
Fri Oct 5 01:27:52 UTC 2007


Author: airlied

Update of /cvs/pkgs/rpms/xorg-x11-drv-ati/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv9897

Modified Files:
	xorg-x11-drv-ati.spec 
Added Files:
	radeon-6.7.194-upstream-fixes.patch 
Removed Files:
	radeon-6.7.194-disable-rc410-dri.patch 
Log Message:
* Fri Oct 5 2007 Dave Airlie <airlied at redhat.com> 6.7.194-3
- radeon-6.7.194-upstream-fixes - Upstream LVDS fixes
  improve chances of working on more panels.


radeon-6.7.194-upstream-fixes.patch:

--- NEW FILE radeon-6.7.194-upstream-fixes.patch ---
commit abbafe6db7c0d24efc61a05950d4214c00d3f043
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Oct 4 11:33:09 2007 +0200

    radeon: Fix compile warnings.

commit 1110957ba703475847b8e72023c6edcbd1068aef
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Oct 4 11:32:48 2007 +0200

    radeon: Fix for pci-rework.
    
    Surprisingly easy, thanks to George's pci-rework changes.

commit 7addf41885ec5658f531624a9c24ea5bd7d22d19
Merge: 3a958ba... 78c6bd3...
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Oct 4 11:06:08 2007 +0200

    Merge remote branch 'origin/pci-rework'

commit 3a958ba136c3fae5a4ddd56373ac7cd47046f10e
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Oct 3 22:59:14 2007 -0400

    RADEON: remove some cruft

commit b6bda79f72df5e5bf9c6b71fa3298e765da506bd
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Oct 3 22:56:27 2007 -0400

    RADEON: more fixes for single crtc chips

commit 5f5c4e6ad61c45c24f1443b91b4bc5375efdebc0
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Oct 3 22:46:21 2007 -0400

    RADEON: remove RADEONSaveMode()
    
    It's only called by RADEONSave(), so just move its
    contents into RADEONSave().  this mirrors RADEONRestore().

commit bfede412b3a3cd11769a580b167c528734146096
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Oct 3 22:19:16 2007 -0400

    RADEON: minor fixes for external TMDS

commit 597dffce9bdc200003d0be880235258386a0bdd7
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Oct 3 21:43:08 2007 -0400

    RADEON: final fix for RMX/LVDS
    
    It seems that on quite a few laptops the LVDS H/V timing
    from the bios tables are way off or just doesn't work period.
    Either we are using it wrong or we need some additional checks
    when we parse it. Only the dot clock seems to really matter,
    so use cvt modes and update the dotclock.  This seems to work
    correctly in all cases.

commit cc0c2d8e61600652b1f9cb3dc49db2ef62b1e40d
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Wed Oct 3 00:59:37 2007 -0400

    RADEON: Finally sort out LVDS modes
    
    - The panel timing from the bios tables is for the crtc,
    not the native panel mode, so add cvt modes for the panel
    and fix up the crtc values in mode_fixup().
    - rename and reconfigure RADEONValidateFPModes() to what it
    really does: add screen modes.  I suppose for backwards
    compatibility we ought to add the screen modes to every
    reasonable output, but everyone should really use xrandr
    or an output monitor section to add custom modes.  Hopefully
    this will go away at some point.

commit 0ca184c3c35032df39ea7ce5d2d4aba1a97b6426
Author: Alex Deucher <alex at botch2.(none)>
Date:   Tue Oct 2 19:38:18 2007 -0400

    RADEON: fix RADEONInitDispBandwidth() on single crtc cards
    
    Should fix bug 12490

commit a5fb2a5d54cdd562a97881cdea1a4af35b483aab
Author: Dave Airlie <airlied at linux.ie>
Date:   Mon Oct 1 08:48:27 2007 +1000

    radeon: fix powerpc build

commit 22519fde1e002f28d6036d448fcd18452d00f1bb
Author: Alex Deucher <alex at botch2.(none)>
Date:   Sun Sep 30 13:11:20 2007 -0400

    RADEON: add support for ext tmds table and ext tmds chip init
    
    This probably won't work on all chips as the various gpio lines
    seem to need special magic to to actually talk to the i2c slave
    chips.

commit dcc376e2d2a13329dd03f1bc4b471329757a6f5f
Author: Alex Deucher <alex at botch2.(none)>
Date:   Wed Sep 26 23:27:38 2007 -0400

    RADEON: remove cruft

commit 99ceaefa18c6e07b55106cca0ea8996fa73667be
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Sun Sep 30 12:02:54 2007 -0400

    RADEON: more work on LVDS mode validation and fixups
    
    Hopefully this will fix up the weird mode issues with LVDS and
    native and RMX modes, but I can't seem to get quite the right
    combo to fix everyone.

commit d808781d48adf01e80b5bb476bae2d2f599030f1
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Sep 28 14:50:42 2007 +1000

    rc410: disable DRI by default due to it not working

commit 4d9f944e40c6b9ac7e80428dff49c6e83fda1d8f
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Sep 27 17:50:15 2007 +0200

    radeon: Fix build on little endian platforms.
    
    This was accidentally broken when moving away from using pixmap data pointers
    directly.

commit 5902e913010a2fb0c17efe01f9aade73f9646f16
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Sep 27 12:53:34 2007 +0200

    radeon: EXA pitch fixes.
    
    The combined pitch/offset registers only support pitches up to 16320 bytes.
    
    With EXA >= 2.3, set the maxPitchBytes field accordingly. With older versions,
    limit maxX such that the pitch of 32bpp pixmaps doesn't exceed the limit.
    
    Also check the limit in RADEONGetOffsetPitch just in case.
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12551 .

commit ca728973bce504e03bf6228d18287906c35eaa3f
Author: Michel Dänzer <michel at tungstengraphics.com>
Date:   Thu Sep 27 11:14:21 2007 +0200

    radeon: Don't use pixmap data pointer directly with EXA.
    
    Fixes segfault with current xserver master without AccelDFS.

commit 21593d04d222b05dbba9abd31eaa3bfb91d999b6
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date:   Mon Sep 24 23:01:20 2007 -0400

    RADEON: more clean up of mode code
    
    also print out LVDS mode info from bios for both
    legacy and atom bioses

commit 78c6bd305f2ea70629d1dda3c0c48c067451f5fb
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Mon Sep 10 19:00:16 2007 +0300

    [mach64] Revert to multiple mappings per BAR.
    
    libpciaccess added subrange mappings and mtrr handling.
    
    compile-tested only.

commit 6ff0645ecfe65727e8ef5d5e6215b4e03078e1a5
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Tue Aug 28 15:37:11 2007 +0300

    [mach64] Convert to pci-rework, keeping source-code compatibility.
    
    It still uses the old probe method though, this is due to the ati wrapper.

commit 7b38d9a1209f87255e5bb0aefe46a363ce4fb6ef
Merge: 2e3d43a... 673f799...
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Tue Aug 28 16:01:12 2007 +0300

    Merge branch 'master' into pci-rework
    
    Conflicts:
    
    	src/ati.c

commit 2e3d43af1e5077cc61dd8668551a6291368d9ed2
Author: George Sapountzis <gsap7 at yahoo.gr>
Date:   Mon Mar 19 19:05:04 2007 +0200

    [mach64] Compute MMIO address once for each case (PIO, MMIO).
    
[...2423 lines suppressed...]
+	if (radeon_output->DVOChip) {
+	    switch(info->MacModel) {
+	    case RADEON_MAC_POWERBOOK_DL:
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x30);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x09, 0x00);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0a, 0x90);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x0c, 0x89);
+		RADEONDVOWriteByte(radeon_output->DVOChip, 0x08, 0x3b);
+		break;
+	    default:
+		break;
+	    }
+	}
+#endif
+    }
+}
+
 void RADEONPrintPortMap(ScrnInfoPtr pScrn)
 {
     RADEONInfoPtr info       = RADEONPTR(pScrn);
@@ -658,7 +740,7 @@ radeon_mode_valid(xf86OutputPtr output, DisplayModePtr pMode)
 	    pMode->VDisplay > radeon_output->PanelYRes)
 	    return MODE_PANEL;
     }
-    
+
     return MODE_OK;
 }
 
@@ -668,31 +750,27 @@ radeon_mode_fixup(xf86OutputPtr output, DisplayModePtr mode,
 {
     RADEONOutputPrivatePtr radeon_output = output->driver_private;
 
+    radeon_output->Flags &= ~RADEON_USE_RMX;
+
+    /* decide if we are using RMX */
     if ((radeon_output->MonType == MT_LCD || radeon_output->MonType == MT_DFP)
 	&& radeon_output->rmx_type != RMX_OFF) {
 	xf86CrtcPtr crtc = output->crtc;
 	RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
 
-	if ((mode->HDisplay < radeon_output->PanelXRes ||
-	     mode->VDisplay < radeon_output->PanelYRes) &&
-	    radeon_crtc->crtc_id == 0)
-	    adjusted_mode->Flags |= RADEON_USE_RMX;
-
-	if (adjusted_mode->Flags & RADEON_USE_RMX) {
-	    radeon_output->Flags |= RADEON_USE_RMX;
-	    if (radeon_output->MonType == MT_DFP) {
-		adjusted_mode->CrtcHTotal     = mode->CrtcHDisplay + radeon_output->HBlank;
-		adjusted_mode->CrtcHSyncStart = mode->CrtcHDisplay + radeon_output->HOverPlus;
-		adjusted_mode->CrtcHSyncEnd   = mode->CrtcHSyncStart + radeon_output->HSyncWidth;
-		adjusted_mode->CrtcVTotal     = mode->CrtcVDisplay + radeon_output->VBlank;
-		adjusted_mode->CrtcVSyncStart = mode->CrtcVDisplay + radeon_output->VOverPlus;
-		adjusted_mode->CrtcVSyncEnd   = mode->CrtcVSyncStart + radeon_output->VSyncWidth;
-		adjusted_mode->Clock          = radeon_output->DotClock;
-		adjusted_mode->Flags          = radeon_output->Flags;
-	    }
-	} else
-	    radeon_output->Flags &= ~RADEON_USE_RMX;
+	if (radeon_crtc->crtc_id == 0) {
+	    if (mode->HDisplay < radeon_output->PanelXRes ||
+		mode->VDisplay < radeon_output->PanelYRes)
+		radeon_output->Flags |= RADEON_USE_RMX;
+	}
+    }
 
+    /* update clock for LVDS always and DFP if RMX is active */
+    if ((radeon_output->MonType == MT_LCD) ||
+	((radeon_output->MonType == MT_DFP) &&
+	 (radeon_output->Flags & RADEON_USE_RMX))) {
+	adjusted_mode->Clock          = radeon_output->DotClock;
+	adjusted_mode->Flags          = radeon_output->Flags;
     }
 
     return TRUE;
@@ -787,6 +865,16 @@ static void RADEONInitFP2Registers(xf86OutputPtr output, RADEONSavePtr save,
 			    RADEON_FP2_DVO_EN |
 			    RADEON_FP2_DVO_RATE_SEL_SDR);
 
+
+    /* XXX: these may be oem specific */
+    if (IS_R300_VARIANT) {
+	save->fp2_gen_cntl |= RADEON_FP2_PAD_FLOP_EN | R300_FP2_DVO_CLOCK_MODE_SINGLE;
+#if 0
+	if (mode->Clock > 165000)
+	    save->fp2_gen_cntl |= R300_FP2_DVO_DUAL_CHANNEL_EN;
+#endif
+    }
+
     if (IsPrimary) {
         if ((info->ChipFamily == CHIP_FAMILY_R200) || IS_R300_VARIANT) {
             save->fp2_gen_cntl &= ~R200_FP2_SOURCE_SEL_MASK;
@@ -1053,6 +1141,7 @@ radeon_mode_set(xf86OutputPtr output, DisplayModePtr mode,
 	    RADEONRestoreFPRegisters(pScrn, &info->ModeReg);
 	} else {
 	    ErrorF("restore FP2\n");
+	    RADEONRestoreDVOChip(pScrn, output);
 	    RADEONRestoreFP2Registers(pScrn, &info->ModeReg);
 	}
 	break;
@@ -2480,8 +2569,27 @@ void RADEONInitConnector(xf86OutputPtr output)
     }
 
     if (radeon_output->type == OUTPUT_DVI) {
+	I2CBusPtr pDVOBus;
 	radeon_output->rmx_type = RMX_OFF;
-	RADEONGetTMDSInfo(output);
+	if (radeon_output->TMDSType == TMDS_EXT) {
+#if defined(__powerpc__)
+	    radeon_output->dvo_i2c_reg = RADEON_GPIO_MONID;
+	    radeon_output->dvo_i2c_slave_addr = 0x70;
+#else
+	    if (!RADEONGetExtTMDSInfoFromBIOS(output)) {
+		radeon_output->dvo_i2c_reg = RADEON_GPIO_CRT2_DDC;
+		radeon_output->dvo_i2c_slave_addr = 0x70;
+	    }
+#endif
+	    if (RADEONI2CInit(pScrn, &pDVOBus, radeon_output->dvo_i2c_reg, "DVO")) {
+		radeon_output->DVOChip =
+		    RADEONDVODeviceInit(pDVOBus,
+					radeon_output->dvo_i2c_slave_addr);
+		if (!radeon_output->DVOChip)
+		    xfree(pDVOBus);
+	    }
+	} else
+	    RADEONGetTMDSInfo(output);
     }
 
     if (radeon_output->type == OUTPUT_STV ||
diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 207e537..5c7d16f 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -237,7 +237,9 @@ RADEONProbe(DriverPtr drv, int flags)
     Bool     foundScreen = FALSE;
     int      i;
 
+#ifndef XSERVER_LIBPCIACCESS
     if (!xf86GetPciVideoInfo()) return FALSE;
+#endif
 
     /* Collect unclaimed device sections for both driver names */
     nATIGDev    = xf86MatchDevice(ATI_NAME, &ATIGDevs);
diff --git a/src/radeon_probe.h b/src/radeon_probe.h
index ec895e4..dbd50d7 100644
--- a/src/radeon_probe.h
+++ b/src/radeon_probe.h
@@ -205,6 +205,11 @@ typedef struct _RADEONOutputPrivateRec {
     int               DotClock;
     RADEONTMDSPll     tmds_pll[4];
     RADEONRMXType     rmx_type;
+    /* dvo */
+    I2CDevPtr         DVOChip;
+    int               dvo_i2c_reg;
+    int               dvo_i2c_slave_addr;
+    Bool              dvo_duallink;
     /* TV out */
     TVStd             default_tvStd;
     TVStd             tvStd;
diff --git a/src/radeon_reg.h b/src/radeon_reg.h
index 96adb22..2653339 100644
--- a/src/radeon_reg.h
+++ b/src/radeon_reg.h
@@ -780,7 +780,7 @@
 #       define RADEON_FP2_PANEL_FORMAT         (1 <<  3)
 #       define RADEON_FP2_DETECT_SENSE         (1 <<  8)
 #       define R200_FP2_SOURCE_SEL_MASK        (3 << 10)
-#       define R200_FP2_SOURCE_SEL_CRTC1       (0 <<  10)
+#       define R200_FP2_SOURCE_SEL_CRTC1       (0 << 10)
 #       define R200_FP2_SOURCE_SEL_CRTC2       (1 << 10)
 #       define R200_FP2_SOURCE_SEL_RMX         (2 << 10)
 #       define R200_FP2_SOURCE_SEL_TRANS_UNIT  (3 << 10)
@@ -796,6 +796,8 @@
 #       define RADEON_FP2_DVO_EN               (1 << 25)
 #       define RADEON_FP2_DVO_RATE_SEL_SDR     (1 << 26)
 #       define R200_FP2_DVO_RATE_SEL_SDR       (1 << 27)
+#       define R300_FP2_DVO_CLOCK_MODE_SINGLE  (1 << 28)
+#       define R300_FP2_DVO_DUAL_CHANNEL_EN    (1 << 29)
 #define RADEON_FP_H_SYNC_STRT_WID           0x02c4
 #define RADEON_FP_H2_SYNC_STRT_WID          0x03c4
 #define RADEON_FP_HORZ_STRETCH              0x028c
diff --git a/src/radeon_video.c b/src/radeon_video.c
index dca9695..26857a5 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -1213,9 +1213,11 @@ RADEONResetVideo(ScrnInfoPtr pScrn)
 
     xvAdjustment      = MAKE_ATOM("XV_DEBUG_ADJUSTMENT");
 
-    sprintf(tmp, "RXXX:%d.%d.%d", info->PciInfo->vendor, info->PciInfo->chipType, info->PciInfo->chipRev);
+    sprintf(tmp, "RXXX:%d.%d.%d", PCI_DEV_VENDOR_ID(info->PciInfo),
+	    PCI_DEV_DEVICE_ID(info->PciInfo), PCI_DEV_REVISION(info->PciInfo));
     pPriv->device_id = MAKE_ATOM(tmp);
-    sprintf(tmp, "PCI:%02d:%02d.%d", info->PciInfo->bus, info->PciInfo->device, info->PciInfo->func);
+    sprintf(tmp, "PCI:%02d:%02d.%d", PCI_DEV_BUS(info->PciInfo),
+	    PCI_DEV_DEV(info->PciInfo), PCI_DEV_FUNC(info->PciInfo));
     pPriv->location_id = MAKE_ATOM(tmp);
     sprintf(tmp, "INSTANCE:%d", pScrn->scrnIndex);
     pPriv->instance_id = MAKE_ATOM(tmp);


Index: xorg-x11-drv-ati.spec
===================================================================
RCS file: /cvs/pkgs/rpms/xorg-x11-drv-ati/devel/xorg-x11-drv-ati.spec,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- xorg-x11-drv-ati.spec	28 Sep 2007 05:07:00 -0000	1.62
+++ xorg-x11-drv-ati.spec	5 Oct 2007 01:27:19 -0000	1.63
@@ -5,7 +5,7 @@
 Summary:   Xorg X11 ati video driver
 Name:      xorg-x11-drv-ati
 Version:   6.7.194
-Release:   2%{?dist}
+Release:   3%{?dist}
 URL:       http://www.x.org
 License:   MIT
 Group:     User Interface/X Hardware Support
@@ -18,7 +18,7 @@
 
 # Radeon patches (0-99)
 Patch2:     radeon-6.6.3-renderaccel-buglet.patch
-Patch3:     radeon-6.7.194-disable-rc410-dri.patch
+Patch3:     radeon-6.7.194-upstream-fixes.patch
 
 # Rage 128 patches (100-199)
 
@@ -42,7 +42,7 @@
 %setup -q -n %{tarball}-%{version}
 
 %patch2 -p1 -b .renderaccel
-%patch3 -p1 -b .rc410dri
+%patch3 -p1 -b .upstreamfixes
 
 %build
 %configure --disable-static
@@ -83,6 +83,10 @@
 %{_mandir}/man4/radeon.4*
 
 %changelog
+* Fri Oct 5 2007 Dave Airlie <airlied at redhat.com> 6.7.194-3
+- radeon-6.7.194-upstream-fixes - Upstream LVDS fixes
+  improve chances of working on more panels.
+
 * Fri Sep 28 2007 Dave Airlie <airlied at redhat.com> 6.7.194-2
 - radeon-6.7.194-disable-rc410-dri.patch - Disable DRI on
   RC410 by default as it seems to need some more work.


--- radeon-6.7.194-disable-rc410-dri.patch DELETED ---




More information about the scm-commits mailing list