Hi Alex,

for the past weeks i was desperately trying to get AGP based card to
work with the r6xx-r7xx-support branch. Unfortunately i couldn't figure
out how to set up the AGP stuff correctly inside the hardware.

So i remembered that you suggested on irc to force the card to PCI mode
and work with that instead. After a week of try and error i've got
r600_demo to work yesterday and today i was even able to watch videos
with mplayer though Xv on my RV630 AGP card.

Patches are attached, this doesn't seems to be the ideal way, but at
least AGP cards can be tested now.

Bye, Christian.

PS:
Resending the mail because i messed up the radeonhd and dri mailing list 
addresses.
>From 49224aaa6f0516b6c40395505403f82f5e90d753 Mon Sep 17 00:00:00 2001
From: Christian Koenig <deathsim...@vodafone.de>
Date: Sat, 24 Jan 2009 23:24:30 +0100
Subject: [PATCH] enable forcing r6xx AGP based card to PCIE mode

This patch adds the possibility of forcing r6xx AGP based card to PCIE
mode, since we don't have AGP support for those (yet).
---
 shared-core/r600_cp.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/shared-core/r600_cp.c b/shared-core/r600_cp.c
index 4c77701..0d00a55 100644
--- a/shared-core/r600_cp.c
+++ b/shared-core/r600_cp.c
@@ -2136,6 +2136,20 @@ int r600_do_init_cp(struct drm_device * dev, drm_radeon_init_t * init)
 		return -EINVAL;
 	}
 
+	if (init->is_pci && (dev_priv->flags & RADEON_IS_AGP))
+	{
+		DRM_DEBUG("Forcing AGP card to PCI mode\n");
+		dev_priv->flags &= ~RADEON_IS_AGP;
+		/* readpointer updates don't seem to work correctly, so also dissable them */
+		radeon_no_wb = 1;
+	}
+	else if (!(dev_priv->flags & (RADEON_IS_AGP | RADEON_IS_PCI | RADEON_IS_PCIE))
+		&& !init->is_pci)
+	{
+		DRM_DEBUG("Restoring AGP flag\n");
+		dev_priv->flags |= RADEON_IS_AGP;
+	}
+
 	dev_priv->usec_timeout = init->usec_timeout;
 	if (dev_priv->usec_timeout < 1 ||
 	    dev_priv->usec_timeout > RADEON_MAX_USEC_TIMEOUT) {
-- 
1.5.6.3

>From 7869fa1b380bd500c890f24ceadf2cbe4335544f Mon Sep 17 00:00:00 2001
From: Christian Koenig <deathsim...@vodafone.de>
Date: Sat, 24 Jan 2009 23:02:49 +0100
Subject: [PATCH] Force r6xx AGP cards to PCIE mode

Since we don't have r6xx AGP support (yet), this patch foce r6xx AGP
based card to PCIE mode when DRI is in use.
---
 src/rhd_dri.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/rhd_dri.c b/src/rhd_dri.c
index 2c8e812..6ae4251 100644
--- a/src/rhd_dri.c
+++ b/src/rhd_dri.c
@@ -1157,13 +1157,13 @@ Bool RHDDRIPreInit(ScrnInfoPtr pScrn)
 	if (rhdPtr->useDRI.set && rhdPtr->useDRI.val.bool) {
 	    if (rhdPtr->cardType == RHD_CARD_AGP) {
 		xf86DrvMsg(pScrn->scrnIndex, X_INFO,
-			   "Direct rendering not supported on R6xx AGP\n");
-		return FALSE;
-	    } else
-		xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
-			   "Direct rendering for R600 and up forced on - "
-			   "This is NOT officially supported yet "
-			   "and may cause instability or lockups\n");
+			   "Direct rendering not supported on R6xx AGP falling back to PCIE mode\n");
+		rhdPtr->cardType = RHD_CARD_PCIE;
+	    }
+	    xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+			"Direct rendering for R600 and up forced on - "
+			"This is NOT officially supported yet "
+			"and may cause instability or lockups\n");
 	} else {
 	    xf86DrvMsg(pScrn->scrnIndex, X_INFO,
 		       "Direct rendering not officially supported on R600 and up\n");
-- 
1.5.6.3

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to