Mailinglist Archive: radeonhd (408 mails)
| < Previous | Next > |
[radeonhd] [PATCH] trivial reg header cleanup & log when falling back to ACCEL_NONE
- From: Yang Zhao <yang@xxxxxxxxxx>
- Date: Wed, 3 Jun 2009 10:12:40 -0700
- Message-id: <40a7b1aa0906031012i435db50ag4d91572bf7b77ab3@xxxxxxxxxxxxxx>
Cheers,
--
Yang Zhao
http://yangman.ca
From 6bf471bc3c9fdfe93aab673c7ea1d2ba93c628b5 Mon Sep 17 00:00:00 2001
From: Yang Zhao <yang@xxxxxxxxxx>
Date: Sat, 23 May 2009 11:59:38 -0700
Subject: [PATCH] MC: Remove duplicated definition of SRBM_STATUS
Use SRBM_STATUS from r600_reg_r6xx.h and remove old definition in
rhd_regs.h.
Show names of bits are actually being checked in R600MCWaitIdle() instead
of using magic number.
Signed-off-by: Yang Zhao <yang@xxxxxxxxxx>
---
src/r600_reg_r6xx.h | 2 +-
src/rhd_mc.c | 7 ++++++-
src/rhd_regs.h | 2 --
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/r600_reg_r6xx.h b/src/r600_reg_r6xx.h
index 425bee4..5237ec1 100644
--- a/src/r600_reg_r6xx.h
+++ b/src/r600_reg_r6xx.h
@@ -34,7 +34,7 @@ enum {
MM_INDEX = 0x0000,
MM_DATA = 0x0004,
- /*SRBM_STATUS = 0x0e50, */
+ SRBM_STATUS = 0x0e50,
RLC_RQ_PENDING_bit = 1 << 3,
RCU_RQ_PENDING_bit = 1 << 4,
GRBM_RQ_PENDING_bit = 1 << 5,
diff --git a/src/rhd_mc.c b/src/rhd_mc.c
index 3df79c7..d09be1e 100644
--- a/src/rhd_mc.c
+++ b/src/rhd_mc.c
@@ -65,6 +65,9 @@
#include "rhd_regs.h"
#include "rhd_crtc.h" /* for definition of Crtc->Id */
+#include "r600_reg_auto_r6xx.h"
+#include "r600_reg_r6xx.h"
+
struct rhdMC {
int scrnIndex;
@@ -392,7 +395,9 @@ R600MCRestore(struct rhdMC *MC)
static Bool
R600MCWaitIdle(struct rhdMC *MC)
{
- if (!(RHDRegRead(MC, SRBM_STATUS) & 0x3f00))
+ if (!(RHDRegRead(MC, SRBM_STATUS) &
+ (VMC_BUSY_bit | MCB_BUSY_bit |
+ MCDZ_BUSY_bit | MCDY_BUSY_bit | MCDX_BUSY_bit | MCDW_BUSY_bit)))
return TRUE;
return FALSE;
}
diff --git a/src/rhd_regs.h b/src/rhd_regs.h
index 2209817..fd59bcd 100644
--- a/src/rhd_regs.h
+++ b/src/rhd_regs.h
@@ -107,8 +107,6 @@ enum {
DCCG_DISP_CLK_SRCSEL = 0x0538, /* rv620+ */
- SRBM_STATUS = 0x0E50,
-
AGP_STATUS = 0x0F5C,
R7XX_MC_VM_FB_LOCATION = 0x2024,
--
1.6.0.6
From f16eaa62a14c723a4d627061361d4d1b15511dea Mon Sep 17 00:00:00 2001
From: Yang Zhao <yang@xxxxxxxxxx>
Date: Thu, 28 May 2009 21:27:31 -0700
Subject: [PATCH] Raise warnings when 2D acceleration initialization fails
Raise a warning when 2D acceleration is diabled during initialization
for whatever reason.
Also update the R600 CS unavailability warning to point out requirement
of DRI instead of cliaming lack if implementation.
Signed-off-by: Yang Zhao <yang@xxxxxxxxxx>
---
src/rhd_cs.c | 2 +-
src/rhd_driver.c | 14 ++++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/rhd_cs.c b/src/rhd_cs.c
index 5e9fa02..14cbe68 100644
--- a/src/rhd_cs.c
+++ b/src/rhd_cs.c
@@ -643,7 +643,7 @@ RHDCSInit(ScrnInfoPtr pScrn)
if (rhdPtr->ChipSet >= RHD_R600) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "%s: No CS for R600 and up yet.\n", __func__);
+ "%s: CS for R600 requires DRI.\n", __func__);
xfree(CS);
rhdPtr->CS = NULL;
return;
diff --git a/src/rhd_driver.c b/src/rhd_driver.c
index f86c919..0ff1706 100644
--- a/src/rhd_driver.c
+++ b/src/rhd_driver.c
@@ -1156,17 +1156,27 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int
argc, char **argv)
if (rhdPtr->ChipSet < RHD_R600) {
if (!R5xxXAAInit(pScrn, pScreen))
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
- } else
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to initalize XAA; disabling
acceleration.\n");
+ } else {
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "XAA is not supported on R600 and above; disabling
acceleration.\n");
+ }
break;
#ifdef USE_DRI
case RHD_ACCEL_EXA:
if (rhdPtr->ChipSet < RHD_R600) {
if (!R5xxEXAInit(pScrn, pScreen))
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to initalize EXA; disabling
acceleration.\n");
} else {
- if (!R6xxEXAInit(pScrn, pScreen))
+ if (!R6xxEXAInit(pScrn, pScreen)) {
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to initalize EXA; disabling
acceleration.\n");
+ }
}
break;
#endif /* USE_DRI */
--
1.6.0.6
--
Yang Zhao
http://yangman.ca
From 6bf471bc3c9fdfe93aab673c7ea1d2ba93c628b5 Mon Sep 17 00:00:00 2001
From: Yang Zhao <yang@xxxxxxxxxx>
Date: Sat, 23 May 2009 11:59:38 -0700
Subject: [PATCH] MC: Remove duplicated definition of SRBM_STATUS
Use SRBM_STATUS from r600_reg_r6xx.h and remove old definition in
rhd_regs.h.
Show names of bits are actually being checked in R600MCWaitIdle() instead
of using magic number.
Signed-off-by: Yang Zhao <yang@xxxxxxxxxx>
---
src/r600_reg_r6xx.h | 2 +-
src/rhd_mc.c | 7 ++++++-
src/rhd_regs.h | 2 --
3 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/r600_reg_r6xx.h b/src/r600_reg_r6xx.h
index 425bee4..5237ec1 100644
--- a/src/r600_reg_r6xx.h
+++ b/src/r600_reg_r6xx.h
@@ -34,7 +34,7 @@ enum {
MM_INDEX = 0x0000,
MM_DATA = 0x0004,
- /*SRBM_STATUS = 0x0e50, */
+ SRBM_STATUS = 0x0e50,
RLC_RQ_PENDING_bit = 1 << 3,
RCU_RQ_PENDING_bit = 1 << 4,
GRBM_RQ_PENDING_bit = 1 << 5,
diff --git a/src/rhd_mc.c b/src/rhd_mc.c
index 3df79c7..d09be1e 100644
--- a/src/rhd_mc.c
+++ b/src/rhd_mc.c
@@ -65,6 +65,9 @@
#include "rhd_regs.h"
#include "rhd_crtc.h" /* for definition of Crtc->Id */
+#include "r600_reg_auto_r6xx.h"
+#include "r600_reg_r6xx.h"
+
struct rhdMC {
int scrnIndex;
@@ -392,7 +395,9 @@ R600MCRestore(struct rhdMC *MC)
static Bool
R600MCWaitIdle(struct rhdMC *MC)
{
- if (!(RHDRegRead(MC, SRBM_STATUS) & 0x3f00))
+ if (!(RHDRegRead(MC, SRBM_STATUS) &
+ (VMC_BUSY_bit | MCB_BUSY_bit |
+ MCDZ_BUSY_bit | MCDY_BUSY_bit | MCDX_BUSY_bit | MCDW_BUSY_bit)))
return TRUE;
return FALSE;
}
diff --git a/src/rhd_regs.h b/src/rhd_regs.h
index 2209817..fd59bcd 100644
--- a/src/rhd_regs.h
+++ b/src/rhd_regs.h
@@ -107,8 +107,6 @@ enum {
DCCG_DISP_CLK_SRCSEL = 0x0538, /* rv620+ */
- SRBM_STATUS = 0x0E50,
-
AGP_STATUS = 0x0F5C,
R7XX_MC_VM_FB_LOCATION = 0x2024,
--
1.6.0.6
From f16eaa62a14c723a4d627061361d4d1b15511dea Mon Sep 17 00:00:00 2001
From: Yang Zhao <yang@xxxxxxxxxx>
Date: Thu, 28 May 2009 21:27:31 -0700
Subject: [PATCH] Raise warnings when 2D acceleration initialization fails
Raise a warning when 2D acceleration is diabled during initialization
for whatever reason.
Also update the R600 CS unavailability warning to point out requirement
of DRI instead of cliaming lack if implementation.
Signed-off-by: Yang Zhao <yang@xxxxxxxxxx>
---
src/rhd_cs.c | 2 +-
src/rhd_driver.c | 14 ++++++++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/rhd_cs.c b/src/rhd_cs.c
index 5e9fa02..14cbe68 100644
--- a/src/rhd_cs.c
+++ b/src/rhd_cs.c
@@ -643,7 +643,7 @@ RHDCSInit(ScrnInfoPtr pScrn)
if (rhdPtr->ChipSet >= RHD_R600) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "%s: No CS for R600 and up yet.\n", __func__);
+ "%s: CS for R600 requires DRI.\n", __func__);
xfree(CS);
rhdPtr->CS = NULL;
return;
diff --git a/src/rhd_driver.c b/src/rhd_driver.c
index f86c919..0ff1706 100644
--- a/src/rhd_driver.c
+++ b/src/rhd_driver.c
@@ -1156,17 +1156,27 @@ RHDScreenInit(int scrnIndex, ScreenPtr pScreen, int
argc, char **argv)
if (rhdPtr->ChipSet < RHD_R600) {
if (!R5xxXAAInit(pScrn, pScreen))
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
- } else
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to initalize XAA; disabling
acceleration.\n");
+ } else {
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "XAA is not supported on R600 and above; disabling
acceleration.\n");
+ }
break;
#ifdef USE_DRI
case RHD_ACCEL_EXA:
if (rhdPtr->ChipSet < RHD_R600) {
if (!R5xxEXAInit(pScrn, pScreen))
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to initalize EXA; disabling
acceleration.\n");
} else {
- if (!R6xxEXAInit(pScrn, pScreen))
+ if (!R6xxEXAInit(pScrn, pScreen)) {
rhdPtr->AccelMethod = RHD_ACCEL_NONE;
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to initalize EXA; disabling
acceleration.\n");
+ }
}
break;
#endif /* USE_DRI */
--
1.6.0.6
| < Previous | Next > |