summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2007-03-27 18:08:54 +1000
committerDave Airlie <airlied@linux.ie>2007-03-27 18:08:54 +1000
commitf87e57d4d773a019d1cc8a10425c57480430f6a4 (patch)
treebfd37b7fb36dd5605950d9e30bae62e979a2d981
parent66b4a571a4e7960da6807d3f30955aa08e89ccc6 (diff)
radeon: fix up crtc debug dereference problem
-rw-r--r--src/radeon_driver.c69
1 files changed, 37 insertions, 32 deletions
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 1bd68845..2cd4c7b9 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -6333,9 +6333,10 @@ static Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1,
ScrnInfoPtr pScrn0 = NULL;
#if RADEON_DEBUG
- ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
+ if (crtc1 && (crtc_mask & 1)) {
+ ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
crtc1->name,
- dot_clock,
+ crtc1->clock,
crtc1->HDisplay,
crtc1->HSyncStart,
@@ -6348,40 +6349,44 @@ static Bool RADEONInit2(ScrnInfoPtr pScrn, DisplayModePtr crtc1,
crtc1->VTotal,
pScrn->depth,
pScrn->bitsPerPixel);
- if (crtc1->Flags & V_DBLSCAN) ErrorF(" D");
- if (crtc1->Flags & V_CSYNC) ErrorF(" C");
- if (crtc1->Flags & V_INTERLACE) ErrorF(" I");
- if (crtc1->Flags & V_PHSYNC) ErrorF(" +H");
- if (crtc1->Flags & V_NHSYNC) ErrorF(" -H");
- if (crtc1->Flags & V_PVSYNC) ErrorF(" +V");
- if (crtc1->Flags & V_NVSYNC) ErrorF(" -V");
- ErrorF("\n");
- ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
- crtc1->name,
- crtc1->Clock/1000.0,
-
- crtc1->CrtcHDisplay,
- crtc1->CrtcHSyncStart,
- crtc1->CrtcHSyncEnd,
- crtc1->CrtcHTotal,
-
- crtc1->CrtcVDisplay,
- crtc1->CrtcVSyncStart,
- crtc1->CrtcVSyncEnd,
- crtc1->CrtcVTotal,
+ if (crtc1->Flags & V_DBLSCAN) ErrorF(" D");
+ if (crtc1->Flags & V_CSYNC) ErrorF(" C");
+ if (crtc1->Flags & V_INTERLACE) ErrorF(" I");
+ if (crtc1->Flags & V_PHSYNC) ErrorF(" +H");
+ if (crtc1->Flags & V_NHSYNC) ErrorF(" -H");
+ if (crtc1->Flags & V_PVSYNC) ErrorF(" +V");
+ if (crtc1->Flags & V_NVSYNC) ErrorF(" -V");
+ ErrorF("\n");
+ }
+ if (crtc2 && (crtc_mask & 2)) {
+ ErrorF("%-12.12s %7.2f %4d %4d %4d %4d %4d %4d %4d %4d (%d,%d)",
+ crtc2->name,
+ crtc2->Clock/1000.0,
+
+ crtc2->CrtcHDisplay,
+ crtc2->CrtcHSyncStart,
+ crtc2->CrtcHSyncEnd,
+ crtc2->CrtcHTotal,
+
+ crtc2->CrtcVDisplay,
+ crtc2->CrtcVSyncStart,
+ crtc2->CrtcVSyncEnd,
+ crtc2->CrtcVTotal,
pScrn->depth,
pScrn->bitsPerPixel);
- if (crtc1->Flags & V_DBLSCAN) ErrorF(" D");
- if (crtc1->Flags & V_CSYNC) ErrorF(" C");
- if (crtc1->Flags & V_INTERLACE) ErrorF(" I");
- if (crtc1->Flags & V_PHSYNC) ErrorF(" +H");
- if (crtc1->Flags & V_NHSYNC) ErrorF(" -H");
- if (crtc1->Flags & V_PVSYNC) ErrorF(" +V");
- if (crtc1->Flags & V_NVSYNC) ErrorF(" -V");
- ErrorF("\n");
+ if (crtc2->Flags & V_DBLSCAN) ErrorF(" D");
+ if (crtc2->Flags & V_CSYNC) ErrorF(" C");
+ if (crtc2->Flags & V_INTERLACE) ErrorF(" I");
+ if (crtc2->Flags & V_PHSYNC) ErrorF(" +H");
+ if (crtc2->Flags & V_NHSYNC) ErrorF(" -H");
+ if (crtc2->Flags & V_PVSYNC) ErrorF(" +V");
+ if (crtc2->Flags & V_NVSYNC) ErrorF(" -V");
+ ErrorF("\n");
+ }
#endif
- info->Flags = crtc1->Flags;
+ if (crtc1 && (crtc_mask & 1))
+ info->Flags = crtc1->Flags;
RADEONInitMemMapRegisters(pScrn, save, info);
RADEONInitCommonRegisters(save, info);