xf86-video-ati: Branch 'master' - 3 commits
Alex Deucher
agd5f at kemper.freedesktop.org
Fri Jan 4 17:17:01 PST 2008
src/radeon_driver.c | 43 +++++++++++++++++++++++++++++++++----------
src/radeon_output.c | 10 ++++------
src/radeon_tv.c | 2 ++
3 files changed, 39 insertions(+), 16 deletions(-)
New commits:
commit b8e8db4675d07e45782de0d7c67ee0fd85eaedb3
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date: Fri Jan 4 20:16:19 2008 -0500
RADEON: fix tvdac load detection at server start up
diff --git a/src/radeon_output.c b/src/radeon_output.c
index c1a0ba8..d2c6e2b 100644
--- a/src/radeon_output.c
+++ b/src/radeon_output.c
@@ -794,12 +794,7 @@ radeon_create_resources(xf86OutputPtr output)
"RRConfigureOutputProperty error, %d\n", err);
}
- if (radeon_output->DACType == DAC_PRIMARY)
- data = 1; /* primary dac, only drives vga */
- /*else if (radeon_output->DACType == DAC_TVDAC &&
- info->tvdac_use_count < 2)
- data = 1;*/ /* only one output with tvdac */
- else if (xf86ReturnOptValBool(info->Options, OPTION_TVDAC_LOAD_DETECT, FALSE))
+ if (radeon_output->load_detection)
data = 1; /* user forces on tv dac load detection */
else
data = 0; /* shared tvdac between vga/dvi/tv */
@@ -1722,6 +1717,9 @@ void RADEONInitConnector(xf86OutputPtr output)
/*else if (radeon_output->DACType == DAC_TVDAC &&
info->tvdac_use_count < 2)
radeon_output->load_detection = 1;*/ /* only one output with tvdac */
+ else if ((radeon_output->DACType == DAC_TVDAC) &&
+ (xf86ReturnOptValBool(info->Options, OPTION_TVDAC_LOAD_DETECT, FALSE)))
+ radeon_output->load_detection = 1; /* shared tvdac between vga/dvi/tv */
else
radeon_output->load_detection = 0; /* shared tvdac between vga/dvi/tv */
commit 3ba7f393d0669df36848715799de8affc10a5534
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date: Fri Jan 4 20:00:48 2008 -0500
RADEON: further fixup for pScrn->pScreen issue
the previous fix seems to cause the driver to hang on
some cards.
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 1f12e87..176e80d 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -3181,7 +3181,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
RADEONInfoPtr info = RADEONPTR(pScrn);
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int hasDRI = 0;
+ int i;
#ifdef RENDER
int subPixelOrder = SubPixelUnknown;
char* s;
@@ -3481,6 +3483,34 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
pScrn->vtSema = TRUE;
+ /* xf86CrtcRotate() accesses pScrn->pScreen */
+ pScrn->pScreen = pScreen;
+
+#if 1
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[i];
+
+ /* Mark that we'll need to re-set the mode for sure */
+ memset(&crtc->mode, 0, sizeof(crtc->mode));
+ if (!crtc->desiredMode.CrtcHDisplay) {
+ crtc->desiredMode = *RADEONCrtcFindClosestMode (crtc, pScrn->currentMode);
+ crtc->desiredRotation = RR_Rotate_0;
+ crtc->desiredX = 0;
+ crtc->desiredY = 0;
+ }
+
+ if (!xf86CrtcSetMode (crtc, &crtc->desiredMode, crtc->desiredRotation, crtc->desiredX, crtc->desiredY))
+ return FALSE;
+
+ }
+#else
+ /* seems to do the wrong thing on some cards??? */
+ if (!xf86SetDesiredModes (pScrn))
+ return FALSE;
+#endif
+
+ RADEONSaveScreen(pScreen, SCREEN_SAVER_ON);
+
/* Backing store setup */
xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, RADEON_LOGLEVEL_DEBUG,
"Initializing backing store\n");
@@ -3623,6 +3653,9 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
info->CreateScreenResources = pScreen->CreateScreenResources;
pScreen->CreateScreenResources = RADEONCreateScreenResources;
+ if (!xf86CrtcScreenInit (pScreen))
+ return FALSE;
+
/* Wrap pointer motion to flip touch screen around */
info->PointerMoved = pScrn->PointerMoved;
pScrn->PointerMoved = RADEONPointerMoved;
@@ -3639,16 +3672,6 @@ Bool RADEONScreenInit(int scrnIndex, ScreenPtr pScreen,
#endif
| CMAP_RELOAD_ON_MODE_SWITCH)) return FALSE;
-#if 1
- /* xf86CrtcRotate() accesses pScrn->pScreen */
- pScrn->pScreen = pScreen;
-
- if (!xf86CrtcScreenInit (pScreen))
- return FALSE;
- if (!xf86SetDesiredModes (pScrn))
- return FALSE;
-#endif
-
/* Note unused options */
if (serverGeneration == 1)
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
commit a0de9c0844f9e066e0f02e8cd8045bdd278e6494
Author: Alex Deucher <alex at t41p.hsd1.va.comcast.net>
Date: Fri Jan 4 19:48:30 2008 -0500
RADEON: improve ntsc image centering
diff --git a/src/radeon_tv.c b/src/radeon_tv.c
index ab95a30..51f21d0 100644
--- a/src/radeon_tv.c
+++ b/src/radeon_tv.c
@@ -619,6 +619,8 @@ static Bool RADEONInitTVRestarts(xf86OutputPtr output, RADEONSavePtr save,
if (radeon_output->tvStd == TV_STD_NTSC ||
radeon_output->tvStd == TV_STD_NTSC_J ||
radeon_output->tvStd == TV_STD_PAL_M) {
+ /* improve image centering */
+ hOffset -= 50;
p1 = hor_timing_NTSC[ H_TABLE_POS1 ];
p2 = hor_timing_NTSC[ H_TABLE_POS2 ];
} else {
More information about the xorg-commit
mailing list