[arch-commits] Commit in xf86-video-ati/trunk (PKGBUILD git_fixes.patch)

andyrtr at archlinux.org andyrtr at archlinux.org
Sat Dec 26 20:27:24 UTC 2009


    Date: Saturday, December 26, 2009 @ 15:27:23
  Author: andyrtr
Revision: 61846

upgpkg: xf86-video-ati 6.12.4-3
    add upstream git commits from 6.14 branch

Added:
  xf86-video-ati/trunk/git_fixes.patch
Modified:
  xf86-video-ati/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   12 -
 git_fixes.patch |  628 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 636 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2009-12-26 18:48:16 UTC (rev 61845)
+++ PKGBUILD	2009-12-26 20:27:23 UTC (rev 61846)
@@ -6,21 +6,23 @@
 #_gitdate=20091221
 #pkgver=6.12.99.git${_gitdate} # see configure.ac
 pkgver=6.12.4
-pkgrel=2
+pkgrel=3
 pkgdesc="X.org ati video driver"
 arch=(i686 x86_64)
 url="http://xorg.freedesktop.org/"
 license=('custom')
-depends=('libdrm>=2.4.17-2' 'libpciaccess' 'ati-dri>=7.6.1' 'pixman>=0.16.4')
-makedepends=('pkgconfig' 'xorg-server>=1.7.3.901' 'fontsproto'
-	     'glproto>=1.4.10' 'xf86driproto' 'diffutils' 'xorg-util-macros' 'xineramaproto' 'mesa>=7.6.1')
+depends=('libdrm>=2.4.17-2' 'libpciaccess' 'ati-dri>=7.7' 'pixman>=0.16.4')
+makedepends=('pkgconfig' 'xorg-server>=1.7.3.902' 'fontsproto'
+	     'glproto>=1.4.10' 'xf86driproto' 'diffutils' 'xorg-util-macros' 'xineramaproto' 'mesa>=7.7')
 conflicts=('xorg-server<1.7.0')
 groups=('xorg-video-drivers')
 options=('!libtool' 'force')
 source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2
 	#ftp://ftp.archlinux.org/other/$pkgname/xf86-video-ati-${_gitdate}.tar.bz2
+	git_fixes.patch
 	LICENSE)
 md5sums=('e662348f6f957fcedf52818d668ab9f5'
+         'f4f0fd376b02dde282d97ce9744b7795'
          '75da66945980a43adf1e1856271b9d4a')
 
 build() {
@@ -32,6 +34,8 @@
 #  return 1
 
   cd "${srcdir}/${pkgname}-${pkgver}"
+  # add commits until 20091226 from 6.12 branch
+  patch -Np1 -i $srcdir/git_fixes.patch || return 1
 #  cd "${srcdir}/${pkgname}"*
 #  ./autogen.sh --prefix=/usr --enable-dri || return 1
   ./configure --prefix=/usr --enable-dri || return 1

Added: git_fixes.patch
===================================================================
--- git_fixes.patch	                        (rev 0)
+++ git_fixes.patch	2009-12-26 20:27:23 UTC (rev 61846)
@@ -0,0 +1,628 @@
+From 0db4b1708c2e5f3c14f48de186ee866ab8d9d5a9 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Wed, 07 Oct 2009 21:01:55 +0000
+Subject: radeon: clamp the internal FB map to the aperture size
+
+We don't use the invisible memory yet and on cards with
+large amounts of vram this can cause the top of GART
+calculation to overflow.
+
+Fixes bug fdo bug 24301:
+http://bugs.freedesktop.org/show_bug.cgi?id=24301
+---
+diff --git a/src/radeon_driver.c b/src/radeon_driver.c
+index 800397c..4e0dcf9 100644
+--- a/src/radeon_driver.c
++++ b/src/radeon_driver.c
+@@ -1362,6 +1362,15 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
+     if (aper_size > mem_size)
+ 	mem_size = aper_size;
+ 
++    /* don't map the whole FB in the internal address space.
++     * we don't currently use fb space larger than the aperture
++     * size and on cards with 1 GB of vram, this can overflow
++     * the internal top of gart calculation on some systems.
++     * See fdo bug 24301.
++     */
++    if (mem_size > aper_size)
++	mem_size = aper_size;
++
+ #ifdef XF86DRI
+     /* Apply memory map limitation if using an old DRI */
+     if (info->directRenderingEnabled && !info->dri->newMemoryMap) {
+--
+cgit v0.8.3-6-g21f6
+From 26ecf3aad5f3a70b3267614bff6030604820f4d9 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Mon, 23 Nov 2009 17:54:41 +0000
+Subject: DCE3.2: fix uniphy2 dvi issues
+
+In some cases the atom transmitter table sets the
+golden value of this reg differently which some monitors
+don't like. I haven't had time to dig further, so this
+works around it for now.
+
+Fixes fdo bug 24313
+
+Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+---
+diff --git a/src/atombios_output.c b/src/atombios_output.c
+index 57345b3..66a86f4 100644
+--- a/src/atombios_output.c
++++ b/src/atombios_output.c
+@@ -1472,6 +1472,18 @@ atombios_apply_output_quirks(xf86OutputPtr output, DisplayModePtr mode)
+     /* set scaler clears this on some chips */
+     if (IS_AVIVO_VARIANT && (mode->Flags & V_INTERLACE))
+ 	OUTREG(AVIVO_D1MODE_DATA_FORMAT + radeon_crtc->crtc_offset, AVIVO_D1MODE_INTERLEAVE_EN);
++
++    if (IS_DCE32_VARIANT && (radeon_output->active_device & (ATOM_DEVICE_DFP_SUPPORT))) {
++	radeon_encoder_ptr radeon_encoder = radeon_get_encoder(output);
++	if (radeon_encoder == NULL)
++	    return;
++	/* XXX: need to sort out why transmitter control table sometimes sets this to a
++	 * different golden value.
++	 */
++	if (radeon_encoder->encoder_id == ENCODER_OBJECT_ID_INTERNAL_UNIPHY2) {
++	    OUTREG(0x7ec4, 0x00824002);
++	}
++    }
+ }
+ 
+ void
+--
+cgit v0.8.3-6-g21f6
+From 3d59746808bc5f335104d27a8dce0fe94ab3cb78 Mon Sep 17 00:00:00 2001
+From: Matthijs Kooijman <matthijs at stdin.nl>
+Date: Thu, 03 Dec 2009 17:10:14 +0000
+Subject: radeon: fix crtc2 dpms
+
+noticed by Matthijs Kooijman on fdo bug 22140
+---
+diff --git a/src/legacy_crtc.c b/src/legacy_crtc.c
+index 5ea13bc..aee3d15 100644
+--- a/src/legacy_crtc.c
++++ b/src/legacy_crtc.c
+@@ -670,8 +670,7 @@ legacy_crtc_dpms(xf86CrtcPtr crtc, int mode)
+     unsigned char *RADEONMMIO = pRADEONEnt->MMIO;
+ 
+     if (radeon_crtc->crtc_id)
+-	mask = (RADEON_CRTC2_EN |
+-		RADEON_CRTC2_DISP_DIS |
++	mask = (RADEON_CRTC2_DISP_DIS |
+ 		RADEON_CRTC2_VSYNC_DIS |
+ 		RADEON_CRTC2_HSYNC_DIS |
+ 		RADEON_CRTC2_DISP_REQ_EN_B);
+@@ -683,7 +682,7 @@ legacy_crtc_dpms(xf86CrtcPtr crtc, int mode)
+     switch(mode) {
+     case DPMSModeOn:
+ 	if (radeon_crtc->crtc_id) {
+-	    OUTREGP(RADEON_CRTC2_GEN_CNTL, RADEON_CRTC2_EN, ~mask);
++	    OUTREGP(RADEON_CRTC2_GEN_CNTL, RADEON_CRTC2_EN, ~(RADEON_CRTC2_EN | mask));
+ 	} else {
+ 	    OUTREGP(RADEON_CRTC_GEN_CNTL, RADEON_CRTC_EN, ~(RADEON_CRTC_EN | RADEON_CRTC_DISP_REQ_EN_B));
+ 	    OUTREGP(RADEON_CRTC_EXT_CNTL, 0, ~mask);
+@@ -693,7 +692,7 @@ legacy_crtc_dpms(xf86CrtcPtr crtc, int mode)
+     case DPMSModeSuspend:
+     case DPMSModeOff:
+ 	if (radeon_crtc->crtc_id) {
+-	    OUTREGP(RADEON_CRTC2_GEN_CNTL, mask, ~mask);
++	    OUTREGP(RADEON_CRTC2_GEN_CNTL, mask, ~(RADEON_CRTC2_EN | mask));
+ 	} else {
+ 	    OUTREGP(RADEON_CRTC_GEN_CNTL, RADEON_CRTC_DISP_REQ_EN_B, ~(RADEON_CRTC_EN | RADEON_CRTC_DISP_REQ_EN_B));
+ 	    OUTREGP(RADEON_CRTC_EXT_CNTL, mask, ~mask);
+--
+cgit v0.8.3-6-g21f6
+From 45edca0e9d7b833b9de3037e94f293122c922e42 Mon Sep 17 00:00:00 2001
+From: Michel Dänzer <daenzer at vmware.com>
+Date: Thu, 03 Sep 2009 12:55:05 +0000
+Subject: EXA: Check for solid/gradient pictures the same way for all generations.
+
+In particular, also catch them for >= R300.
+---
+diff --git a/src/r600_exa.c b/src/r600_exa.c
+index 9aeb862..54d91e8 100644
+--- a/src/r600_exa.c
++++ b/src/r600_exa.c
+@@ -1313,6 +1313,9 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+     if (op >= (int) (sizeof(R600BlendOp) / sizeof(R600BlendOp[0])))
+ 	RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+ 
++    if (!pSrcPicture->pDrawable)
++	RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++
+     pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+ 
+     max_tex_w = 8192;
+diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
+index 660ec43..e663b54 100644
+--- a/src/radeon_exa_render.c
++++ b/src/radeon_exa_render.c
+@@ -478,7 +478,7 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
+ 	RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+ 
+     if (!pSrcPicture->pDrawable)
+-	return FALSE;
++	RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+ 
+     /* r100 limit should be 2048, there are issues with 2048
+      * see 197a62704742a4a19736c2637ac92d1dc5ab34ed
+@@ -813,7 +813,7 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+ 	RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+ 
+     if (!pSrcPicture->pDrawable)
+-	return FALSE;
++	RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
+ 
+     /* r200 limit should be 2048, there are issues with 2048
+      * see bug 19269
+@@ -1192,6 +1192,9 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+     if (op >= sizeof(RadeonBlendOp) / sizeof(RadeonBlendOp[0]))
+ 	RADEON_FALLBACK(("Unsupported Composite op 0x%x\n", op));
+ 
++    if (!pSrcPicture->pDrawable)
++	RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++
+     pSrcPixmap = RADEONGetDrawablePixmap(pSrcPicture->pDrawable);
+ 
+     if (IS_R500_3D) {
+--
+cgit v0.8.3-6-g21f6
+From 51266161f70baf4ddbf79ba6225ee2ae107a9f36 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Tue, 17 Nov 2009 19:16:22 +0000
+Subject: radeon: deal with connectors sourced to the same encoder
+
+Some systems have multiple connectors connected to the
+same encoder; e.g., DVI and HDMI connected to the same
+encoder with the same ddc line.  Since we expose
+connectors as xrandr outputs, randr treats them separately
+which results in it trying to source the same encoder to
+different crtcs.  If we have an HDMI and DVI-D port on the
+same encoder, pick the one to be considered connected
+based on the edid (HDMI if edid indicates HDMI, DVI
+otherwise).  Also, don't turn off (dpms) encoders that are
+shared.
+
+Fixes fdo bug 21767.
+
+Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+---
+diff --git a/src/radeon_output.c b/src/radeon_output.c
+index edf59cd..6b6ba70 100644
+--- a/src/radeon_output.c
++++ b/src/radeon_output.c
+@@ -236,10 +236,40 @@ radeon_ddc_connected(xf86OutputPtr output)
+ 	case CONNECTOR_HDMI_TYPE_A:
+ 	case CONNECTOR_HDMI_TYPE_B:
+ 	    if (radeon_output->shared_ddc) {
++		xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (output->scrn);
++		int i;
++
+ 		if (MonInfo->rawData[0x14] & 0x80) /* if it's digital and DVI/HDMI/etc. */
+ 		    MonType = MT_DFP;
+ 		else
+ 		    MonType = MT_NONE;
++
++		for (i = 0; i < config->num_output; i++) {
++		    if (output != config->output[i]) {
++			RADEONOutputPrivatePtr other_radeon_output =
++			    config->output[i]->driver_private;
++			if (radeon_output->devices & other_radeon_output->devices) {
++#ifndef EDID_COMPLETE_RAWDATA
++			    if (radeon_output->ConnectorType == CONNECTOR_HDMI_TYPE_A) {
++				MonType = MT_NONE;
++				break;
++			    }
++#else
++			    if (xf86MonitorIsHDMI(MonInfo)) {
++				if (radeon_output->ConnectorType == CONNECTOR_DVI_D) {
++				    MonType = MT_NONE;
++				    break;
++				}
++			    } else {
++				if (radeon_output->ConnectorType == CONNECTOR_HDMI_TYPE_A) {
++				    MonType = MT_NONE;
++				    break;
++				}
++			    }
++#endif
++			}
++		    }
++		}
+ 	    } else
+ 		MonType = MT_DFP;
+ 	    break;
+@@ -334,6 +364,22 @@ radeon_dpms(xf86OutputPtr output, int mode)
+     if ((mode == DPMSModeOn) && radeon_output->enabled)
+ 	return;
+ 
++    if ((mode != DPMSModeOn) && radeon_output->shared_ddc) {
++	xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR (output->scrn);
++	int i;
++
++	for (i = 0; i < config->num_output; i++) {
++	    if (output != config->output[i]) {
++		RADEONOutputPrivatePtr other_radeon_output =
++		    config->output[i]->driver_private;
++		if (radeon_output->devices & other_radeon_output->devices) {
++		    if (output->status == XF86OutputStatusDisconnected)
++			return;
++		}
++	    }
++	}
++    }
++
+     if (IS_AVIVO_VARIANT || info->r4xx_atom) {
+ 	atombios_output_dpms(output, mode);
+     } else {
+--
+cgit v0.8.3-6-g21f6
+From 587f693886e9025ba6fc30a8405902c43b2fcfb2 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Tue, 22 Dec 2009 13:45:27 +0000
+Subject: radeon: add cvt timing if we only have panel w/h
+
+fixes mac laptops without an edid
+
+Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+---
+diff --git a/src/radeon_modes.c b/src/radeon_modes.c
+index ec60cc9..ce55c9f 100644
+--- a/src/radeon_modes.c
++++ b/src/radeon_modes.c
+@@ -169,6 +169,20 @@ static DisplayModePtr RADEONFPNativeMode(xf86OutputPtr output)
+ 
+ 	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Added native panel mode: %dx%d\n",
+ 		   native_mode->PanelXRes, native_mode->PanelYRes);
++    } else if (native_mode->PanelXRes != 0 &&
++	       native_mode->PanelYRes != 0) {
++
++	new = xf86CVTMode(native_mode->PanelXRes, native_mode->PanelYRes, 60.0, TRUE, FALSE);
++
++	if (new) {
++	    new->type       = M_T_DRIVER | M_T_PREFERRED;
++
++	    new->next       = NULL;
++	    new->prev       = NULL;
++	}
++
++	xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Added native panel mode using CVT: %dx%d\n",
++		   native_mode->PanelXRes, native_mode->PanelYRes);
+     }
+ 
+     return new;
+--
+cgit v0.8.3-6-g21f6
+From 6dc632e2e91b6a7159ab3a27617b031713d8b8c4 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Mon, 09 Nov 2009 20:09:34 +0000
+Subject: IGP: some IGP chips report as AGP
+
+Set bus type appropriately.  fixes bug 25002
+
+Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+---
+diff --git a/src/radeon_driver.c b/src/radeon_driver.c
+index c726f8f..17253a7 100644
+--- a/src/radeon_driver.c
++++ b/src/radeon_driver.c
+@@ -1959,6 +1959,11 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
+     if (info->cardType == CARD_PCIE && info->IsIGP)
+ 	info->cardType = CARD_PCI;
+ 
++    /* some rs4xx cards report as agp */
++    if ((info->ChipFamily == CHIP_FAMILY_RS400) ||
++	(info->ChipFamily == CHIP_FAMILY_RS480))
++	info->cardType = CARD_PCI;
++
+     if ((info->ChipFamily >= CHIP_FAMILY_R600) && info->IsIGP)
+ 	info->cardType = CARD_PCIE;
+ 
+@@ -1972,7 +1977,13 @@ static Bool RADEONPreInitChipType(ScrnInfoPtr pScrn)
+ 	    xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forced into AGP mode\n");
+ 	} else if ((strcmp(s, "PCI") == 0) ||
+ 		   (strcmp(s, "PCIE") == 0)) {
+-	    if (info->ChipFamily >= CHIP_FAMILY_RV380) {
++	    if ((info->ChipFamily == CHIP_FAMILY_RS400) ||
++		(info->ChipFamily == CHIP_FAMILY_RS480) ||
++		(info->ChipFamily == CHIP_FAMILY_RS690) ||
++		(info->ChipFamily == CHIP_FAMILY_RS740)) {
++		info->cardType = CARD_PCI;
++		xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forced into PCI mode\n");
++	    } else if (info->ChipFamily >= CHIP_FAMILY_RV380) {
+ 		info->cardType = CARD_PCIE;
+ 		xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Forced into PCI Express mode\n");
+ 	    } else {
+--
+cgit v0.8.3-6-g21f6
+From 93de38348fa77987297c3977d5acddbae54fbc10 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu, 12 Nov 2009 16:11:17 +0000
+Subject: radeon: man page updates
+
+---
+diff --git a/man/radeon.man b/man/radeon.man
+index 09239cf..4d8942f 100644
+--- a/man/radeon.man
++++ b/man/radeon.man
+@@ -40,14 +40,14 @@ R/RV/RS2xx and RS3xx);
+ .TP
+ \(bu
+ Textured XVideo acceleration including anti-tearing support (Bicubic filtering
+-only available on R/RV3xx, R/RV/RS4xx, R/RV5xx, and RS6xx);
++only available on R/RV3xx, R/RV/RS4xx, R/RV5xx, and RS6xx/RS740);
+ .TP
+ \(bu
+ Overlay XVideo acceleration (only on R/RV/RS1xx, R/RV/RS2xx,
+ R/RV/RS3xx, R/RV/RS4xx);
+ .TP
+ \(bu
+-3D acceleration (not supported on R/RV6xx and R/RV/RS7xx);
++3D acceleration;
+ .PD
+ .SH SUPPORTED HARDWARE
+ The
+--
+cgit v0.8.3-6-g21f6
+From c2892cbd18e0f25401b615055425f727e096b7cd Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Tue, 17 Nov 2009 16:45:09 +0000
+Subject: radeon: fix potential memory leak in ddc code
+
+Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+---
+diff --git a/src/radeon_output.c b/src/radeon_output.c
+index acba31f..edf59cd 100644
+--- a/src/radeon_output.c
++++ b/src/radeon_output.c
+@@ -268,9 +268,11 @@ radeon_ddc_connected(xf86OutputPtr output)
+ 	    break;
+ 	}
+ 
+-	if (MonType != MT_NONE)
++	if (MonType != MT_NONE) {
+ 	    if (!xf86ReturnOptValBool(info->Options, OPTION_IGNORE_EDID, FALSE))
+ 		xf86OutputSetEDID(output, MonInfo);
++	} else
++	    xfree(MonInfo);
+     } else
+ 	MonType = MT_NONE;
+ 
+--
+cgit v0.8.3-6-g21f6
+From ca9c619c9c085fac3bea486cfce1c8b5ba09cd52 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Fri, 30 Oct 2009 21:36:29 +0000
+Subject: radeon: clamp the internal FB map to the aperture size v2
+
+We don't use the invisible memory yet and on cards with
+large amounts of vram this can cause the top of GART
+calculation to overflow.
+
+Fixes bug fdo bug 24301:
+http://bugs.freedesktop.org/show_bug.cgi?id=24301
+
+v2: only clamp cards with more than 512 MB. This seems
+to cause problems on some older cards due to the way the
+drm and ddx set up the internal memory map.
+---
+diff --git a/src/radeon_driver.c b/src/radeon_driver.c
+index 4e0dcf9..c726f8f 100644
+--- a/src/radeon_driver.c
++++ b/src/radeon_driver.c
+@@ -1364,11 +1364,14 @@ static void RADEONInitMemoryMap(ScrnInfoPtr pScrn)
+ 
+     /* don't map the whole FB in the internal address space.
+      * we don't currently use fb space larger than the aperture
+-     * size and on cards with 1 GB of vram, this can overflow
++     * size and on cards with more than 512 MB of vram, this can overflow
+      * the internal top of gart calculation on some systems.
++     * Limit it to cards with more than 512 MB as this causes problems
++     * on some other cards due to the way the ddx and drm set up the
++     * internal memory map.
+      * See fdo bug 24301.
+      */
+-    if (mem_size > aper_size)
++    if (mem_size > 0x20000000)
+ 	mem_size = aper_size;
+ 
+ #ifdef XF86DRI
+--
+cgit v0.8.3-6-g21f6
+From d1d3681748251fb7e95b8d56e6c37847ca6b1a8d Mon Sep 17 00:00:00 2001
+From: Michael Olbrich <m.olbrich at pengutronix.de>
+Date: Sun, 20 Sep 2009 12:19:41 +0000
+Subject: use AC_CHECK_HEADER instead of AC_CHECK_FILE
+
+AC_CHECK_FILE is not possible when cross-compiling. Use AC_CHECK_HEADER /
+AC_PREPROC_IFELSE instead.
+
+[ Michel Dänzer: Shuffled things around slightly to make it work on my setup ]
+
+Signed-off-by: Michael Olbrich <m.olbrich at pengutronix.de>
+Signed-off-by: Michel Dänzer <daenzer at vmware.com>
+(cherry picked from commit 97a4e747bfac14f34646c55ddf639e8fe22f2f55)
+---
+diff --git a/configure.ac b/configure.ac
+index f081c67..a19a308 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -88,14 +88,21 @@ sdkdir=$(pkg-config --variable=sdkdir xorg-server)
+ AC_HEADER_STDC
+ 
+ if test "$DRI" != no; then
+-	AC_CHECK_FILE([${sdkdir}/dri.h],
+-                      [have_dri_h="yes"], [have_dri_h="no"])
+-	AC_CHECK_FILE([${sdkdir}/sarea.h],
+-                      [have_sarea_h="yes"], [have_sarea_h="no"])
+-	AC_CHECK_FILE([${sdkdir}/dristruct.h],
+-                      [have_dristruct_h="yes"], [have_dristruct_h="no"])
+-	AC_CHECK_FILE([${sdkdir}/damage.h],
+-                      [have_damage_h="yes"], [have_damage_h="no"])
++	PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto])
++	save_CPPFLAGS="$CPPFLAGS"
++	CPPFLAGS="$XORG_CFLAGS $DRI_CFLAGS"
++	AC_CHECK_HEADER([dri.h],
++                      [have_dri_h="yes"], [have_dri_h="no"],[-])
++	AC_CHECK_HEADER([sarea.h],
++                      [have_sarea_h="yes"], [have_sarea_h="no"],[-])
++	AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
++#include <xorg-server.h>
++#include <dristruct.h>
++                      ]])],
++                      [have_dristruct_h="yes"], [have_dristruct_h="no"],[-])
++	AC_CHECK_HEADER([damage.h],
++                      [have_damage_h="yes"], [have_damage_h="no"],[-])
++	CPPFLAGS="$save_CPPFLAGS"
+ fi
+ 
+ AC_MSG_CHECKING([whether to include DRI support])
+@@ -112,7 +119,6 @@ AC_MSG_RESULT([$DRI])
+ 
+ AM_CONDITIONAL(DRI, test x$DRI = xyes)
+ if test "$DRI" = yes; then
+-	PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto])
+         AC_DEFINE(XF86DRI,1,[Enable DRI driver support])
+         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
+ 	if test "$have_damage_h" = yes; then
+--
+cgit v0.8.3-6-g21f6
+From e7b26abc3c20fb53bf2cd02404ac5e0654fee18d Mon Sep 17 00:00:00 2001
+From: Matthias Hopf <mhopf at suse.de>
+Date: Tue, 15 Dec 2009 15:53:48 +0000
+Subject: fix 200M freezes on VT switch if CRTC is disabled
+
+It appears that RS4xx chips need to have the crtc
+enabled when the timing is programmed.
+
+agd5f: minor fixes/cleanup of the original patch
+---
+diff --git a/src/legacy_crtc.c b/src/legacy_crtc.c
+index aee3d15..ba3b102 100644
+--- a/src/legacy_crtc.c
++++ b/src/legacy_crtc.c
+@@ -912,6 +912,11 @@ RADEONInitCrtcRegisters(xf86CrtcPtr crtc, RADEONSavePtr save,
+ 			      ? RADEON_CRTC_INTERLACE_EN
+ 			      : 0));
+ 
++    /* 200M freezes on VT switch sometimes if CRTC is disabled */
++    if ((info->ChipFamily == CHIP_FAMILY_RS400) ||
++	(info->ChipFamily == CHIP_FAMILY_RS480))
++	save->crtc_gen_cntl |= RADEON_CRTC_EN;
++
+     save->crtc_ext_cntl |= (RADEON_XCRT_CNT_EN|
+ 			    RADEON_CRTC_VSYNC_DIS |
+ 			    RADEON_CRTC_HSYNC_DIS |
+@@ -1162,6 +1167,11 @@ RADEONInitCrtc2Registers(xf86CrtcPtr crtc, RADEONSavePtr save,
+ 				? RADEON_CRTC2_INTERLACE_EN
+ 				: 0));
+ 
++    /* 200M freezes on VT switch sometimes if CRTC is disabled */
++    if ((info->ChipFamily == CHIP_FAMILY_RS400) ||
++	(info->ChipFamily == CHIP_FAMILY_RS480))
++	save->crtc2_gen_cntl |= RADEON_CRTC2_EN;
++
+     save->disp2_merge_cntl = info->SavedReg->disp2_merge_cntl;
+     save->disp2_merge_cntl &= ~(RADEON_DISP2_RGB_OFFSET_EN);
+ 
+--
+cgit v0.8.3-6-g21f6
+From eab41805c0e6cc6deb7eca9342457b690834d7d2 Mon Sep 17 00:00:00 2001
+From: Alex Deucher <alexdeucher at gmail.com>
+Date: Thu, 05 Nov 2009 15:23:03 +0000
+Subject: EXA: fallback if no pMaskPicture->pDrawable
+
+A solid or gradient mask could be used for blending
+the source picture onto the destination picture.
+
+Fixes fdo bug 24838
+
+Signed-off-by: Alex Deucher <alexdeucher at gmail.com>
+---
+diff --git a/src/r600_exa.c b/src/r600_exa.c
+index bee8f09..9aeb862 100644
+--- a/src/r600_exa.c
++++ b/src/r600_exa.c
+@@ -1337,7 +1337,12 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+     }
+ 
+     if (pMaskPicture) {
+-	PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++	PixmapPtr pMaskPixmap;
++
++	if (!pMaskPicture->pDrawable)
++	    RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++
++	pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ 
+ 	if (pMaskPixmap->drawable.width >= max_tex_w ||
+ 	    pMaskPixmap->drawable.height >= max_tex_h) {
+diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
+index 8e98b9f..660ec43 100644
+--- a/src/radeon_exa_render.c
++++ b/src/radeon_exa_render.c
+@@ -503,7 +503,12 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture,
+     }
+ 
+     if (pMaskPicture) {
+-	PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++	PixmapPtr pMaskPixmap;
++
++	if (!pMaskPicture->pDrawable)
++	    RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++
++	pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ 
+ 	if (pMaskPixmap->drawable.width > 2047 ||
+ 	    pMaskPixmap->drawable.height > 2047) {
+@@ -833,7 +838,12 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+     }
+ 
+     if (pMaskPicture) {
+-	PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++	PixmapPtr pMaskPixmap;
++
++	if (!pMaskPicture->pDrawable)
++	    RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++
++	pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ 
+ 	if (pMaskPixmap->drawable.width > 2047 ||
+ 	    pMaskPixmap->drawable.height > 2047) {
+@@ -1213,7 +1223,12 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP
+     }
+ 
+     if (pMaskPicture) {
+-	PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
++	PixmapPtr pMaskPixmap;
++
++	if (!pMaskPicture->pDrawable)
++	    RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n"));
++
++	pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable);
+ 
+ 	if (pMaskPixmap->drawable.width > max_tex_w ||
+ 	    pMaskPixmap->drawable.height > max_tex_h) {
+--
+cgit v0.8.3-6-g21f6
+From ecc192e2e5d72090bb35b142c6dc4639ec2542f0 Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at linux.ie>
+Date: Fri, 25 Sep 2009 20:03:51 +0000
+Subject: radeon: fix zaphod
+
+---
+diff --git a/src/radeon_driver.c b/src/radeon_driver.c
+index 551cb7f..800397c 100644
+--- a/src/radeon_driver.c
++++ b/src/radeon_driver.c
+@@ -3727,6 +3727,8 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
+     memset(info->FB + pScrn->fbOffset, 0,
+            pScrn->virtualY * pScrn->displayWidth * info->CurrentLayout.pixel_bytes);
+ 
++    pScrn->pScreen = pScreen;
++
+     /* set the modes with desired rotation, etc. */
+     if (!xf86SetDesiredModes (pScrn))
+ 	return FALSE;
+--
+cgit v0.8.3-6-g21f6




More information about the arch-commits mailing list