[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

X Strike Force SVN commit: rev 206 - branches/4.3.0/sid/debian/patches



Author: daniel
Date: 2003-06-14 22:58:23 -0500 (Sat, 14 Jun 2003)
New Revision: 206

Modified:
   branches/4.3.0/sid/debian/patches/048_radeon_dpms_on_dvi_support.diff
Log:
patch #48 (Radeon DPMS on DVI): new patch from XFree86 Bugzilla, via Madkiss,
that actually works, unlike the last, which apparently didn't.


Modified: branches/4.3.0/sid/debian/patches/048_radeon_dpms_on_dvi_support.diff
==============================================================================
--- branches/4.3.0/sid/debian/patches/048_radeon_dpms_on_dvi_support.diff	2003-06-14 11:00:52 UTC (rev 205)
+++ branches/4.3.0/sid/debian/patches/048_radeon_dpms_on_dvi_support.diff	2003-06-15 03:58:23 UTC (rev 206)
@@ -1,58 +1,31 @@
-Patch by Mike A. Harris <mharris@redhat.com>
-
-The following patch adds DPMS support to the radeon driver for flat panel
-displays (DFP) and LCD panels.  It does not affect the CRT codepath, and
-has been tested on singlehead CRT systems, dualhead CRT, CRT + DFP, and
-dual DFP cards Dell ships.  I've tested it single and dualhead with CRTs
-on Radeon 7000/7500/8500/9000/9700 for regressions and had no problems
-so far.  Tested with suspend/standby/off signals using "xset dpms force".
-
-Patch update: Version 2 (XFree86-4.3.0-ati-radeon-dpms-on-dvi-v2.patch)
-
-Hui Yu from ATI provided additional information about DVI vs. LCD DPMS
-support and indicated the MT_LCD in my original patch was incorrect.  I've
-removed that for now, and will work on this some more after XFree86 4.3.0
-is officially released.
-
---- xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c.ati-radeon-dpms-on-dvi	2003-02-21 15:54:52.000000000 -0500
-+++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2003-02-21 16:54:50.000000000 -0500
-@@ -6503,17 +6503,31 @@
- 
-     if (info->accelOn) info->accel->Sync(pScrn);
- 
-+    /* The entire DPMS code seems overly complicated to me, and perhaps
-+     * could be rewritten to use DISP_PWR_MAN_DPMS instead of manually twiddling
-+     * the CRTCs. This perhaps would enable DPMS to work properly on more hardware
-+     * without special casing?  - Mike A. Harris <mharris@redhat.com>
-+     */
-     if (info->FBDev) {
- 	fbdevHWDPMSSet(pScrn, PowerManagementMode, flags);
-+    } else if (info->DisplayType == MT_DFP) {
-+	switch (PowerManagementMode) {
-+	case DPMSModeOn:
-+	    OUTREG(RADEON_FP_GEN_CNTL,
-+		   INREG(RADEON_FP_GEN_CNTL) | (RADEON_FP_TMDS_EN | RADEON_FP_FPON));
-+	    break;
-+	case DPMSModeStandby:
-+	case DPMSModeSuspend:
-+	case DPMSModeOff:
-+ 	    OUTREG(RADEON_FP_GEN_CNTL,
-+		   INREG(RADEON_FP_GEN_CNTL) & ~(RADEON_FP_TMDS_EN | RADEON_FP_FPON));
-+ 	    break;
-+	}
-     } else {
--	int             mask1     = (RADEON_CRTC_DISPLAY_DIS |
--				     RADEON_CRTC_HSYNC_DIS |
--				     RADEON_CRTC_VSYNC_DIS);
--	int             mask2     = (RADEON_CRTC2_DISP_DIS |
--				     RADEON_CRTC2_VSYNC_DIS |
--				     RADEON_CRTC2_HSYNC_DIS);
--
--	/* TODO: additional handling for LCD ? */
-+	int mask1 = (RADEON_CRTC_DISPLAY_DIS | RADEON_CRTC_HSYNC_DIS |
-+		     RADEON_CRTC_VSYNC_DIS);
-+	int mask2 = (RADEON_CRTC2_DISP_DIS | RADEON_CRTC2_VSYNC_DIS |
-+		     RADEON_CRTC2_HSYNC_DIS);
- 
- 	switch (PowerManagementMode) {
- 	case DPMSModeOn:
+diff -ruN xc.old/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c
+--- xc.old/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2003-02-25 04:50:15.000000000 +0100
++++ xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c	2003-06-14 16:25:42.000000000 +0200
+@@ -6523,6 +6523,14 @@
+ 	    else {
+ 		if (info->Clone)
+ 		    OUTREGP(RADEON_CRTC2_GEN_CNTL, 0, ~mask2);
++		if (info->DisplayType == MT_LCD) {
++		    usleep(RADEONPTR(pScrn)->PanelPwrDly * 1000);
++		    OUTREGP (RADEON_LVDS_GEN_CNTL, (RADEON_LVDS_ON | RADEON_LVDS_BLON),
++			     ~(RADEON_LVDS_ON | RADEON_LVDS_BLON));
++		} else if (info->DisplayType == MT_DFP) {
++		    OUTREGP (RADEON_FP_GEN_CNTL, RADEON_FP_FPON | RADEON_FP_TMDS_EN, 
++			     ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN));
++		}
+ 		OUTREGP(RADEON_CRTC_EXT_CNTL, 0, ~mask1);
+ 	    }
+ 	    break;
+@@ -6569,6 +6577,12 @@
+ 		if (info->Clone)
+ 		    OUTREGP(RADEON_CRTC2_GEN_CNTL, mask2, ~mask2);
+ 		OUTREGP(RADEON_CRTC_EXT_CNTL, mask1, ~mask1);
++		if (info->DisplayType == MT_LCD) {
++		    usleep(RADEONPTR(pScrn)->PanelPwrDly * 1000);
++		    OUTREGP (RADEON_LVDS_GEN_CNTL, 0, ~(RADEON_LVDS_ON | RADEON_LVDS_BLON));
++		} else if (info->DisplayType == MT_DFP) {
++		    OUTREGP (RADEON_FP_GEN_CNTL, 0, ~(RADEON_FP_FPON | RADEON_FP_TMDS_EN));
++		}
+ 	    }
+ 	    break;
+ 	}



Reply to: