[PATCH xf86-video-r128] Make debug mode work again
Connor Behan
connor.behan at gmail.com
Tue Jul 17 22:33:43 PDT 2012
The source should not assume that debugging is turned off. It should
build even if the user edits r128.h and enables it.
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=47785
Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
src/r128.h | 1 +
src/r128_driver.c | 14 +++++++-------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/src/r128.h b/src/r128.h
index fe42f79..9b2556f 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -118,6 +118,7 @@
#define R128_VBIOS_SIZE 0x00010000
#if R128_DEBUG
+#include "r128_version.h"
#define R128TRACE(x) \
do { \
diff --git a/src/r128_driver.c b/src/r128_driver.c
index bb03e80..f4a5e1b 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -3043,11 +3043,11 @@ static void R128RestorePLL2Registers(ScrnInfoPtr pScrn, R128SavePtr restore)
restore->p2pll_ref_div,
restore->p2pll_div_0,
restore->htotal_cntl2,
- INPLL(pScrn, RADEON_P2PLL_CNTL)));
+ INPLL(pScrn, R128_P2PLL_CNTL)));
R128TRACE(("Wrote: rd=%d, fd=%d, pd=%d\n",
- restore->p2pll_ref_div & RADEON_P2PLL_REF_DIV_MASK,
- restore->p2pll_div_0 & RADEON_P2PLL_FB3_DIV_MASK,
- (restore->p2pll_div_0 & RADEON_P2PLL_POST3_DIV_MASK) >>16));
+ restore->p2pll_ref_div & R128_P2PLL_REF_DIV_MASK,
+ restore->p2pll_div_0 & R128_P2PLL_FB0_DIV_MASK,
+ (restore->p2pll_div_0 & R128_P2PLL_POST0_DIV_MASK) >>16));
usleep(5000); /* Let the clock to lock */
@@ -3895,8 +3895,8 @@ static void R128InitPLLRegisters(ScrnInfoPtr pScrn, R128SavePtr save,
}
/* Define PLL2 registers for requested video mode. */
-static void R128InitPLL2Registers(R128SavePtr save, R128PLLPtr pll,
- double dot_clock)
+static void R128InitPLL2Registers(ScrnInfoPtr pScrn, R128SavePtr save,
+ R128PLLPtr pll, double dot_clock)
{
unsigned long freq = dot_clock * 100;
struct {
@@ -4158,7 +4158,7 @@ static Bool R128Init(ScrnInfoPtr pScrn, DisplayModePtr mode, R128SavePtr save)
if (!R128InitCrtc2Registers(pScrn, save,
pScrn->currentMode,info))
return FALSE;
- R128InitPLL2Registers(save, &info->pll, dot_clock);
+ R128InitPLL2Registers(pScrn, save, &info->pll, dot_clock);
if (!R128InitDDA2Registers(pScrn, save, &info->pll, info, mode))
return FALSE;
}
--
1.7.11.1
More information about the xorg-driver-ati
mailing list