From ab19439cf4592e4607dc0bfc602aba3d56645a42 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 23 Mar 2007 14:34:27 -0700 Subject: [PATCH 1/3] Don't call AdjustFrame on EnterVT. AdjustFrame is strictly for legacy compatibility; calling it on EnterVT wrecks crtc positions. --- src/i830_driver.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/i830_driver.c b/src/i830_driver.c index f41beb0b..624f986c 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2734,7 +2734,7 @@ i830AdjustFrame(int scrnIndex, int x, int y, int flags) { /* Sync the engine before adjust frame */ i830WaitSync(pScrn); - i830PipeSetBase(crtc, output->initial_x + x, output->initial_y + y); + i830PipeSetBase(crtc, crtc->desiredX + x, crtc->desiredY + y); crtc->x = output->initial_x + x; crtc->y = output->initial_y + y; } @@ -2851,8 +2851,6 @@ I830EnterVT(int scrnIndex, int flags) ResetState(pScrn, TRUE); SetHWOperatingState(pScrn); - pScrn->AdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); - #ifdef XF86DRI if (pI830->directRenderingEnabled) { From 28da6f4e307880326dd553f50fe3fff3b9be9f4f Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 23 Mar 2007 14:36:42 -0700 Subject: [PATCH 2/3] Record 3D state loss at EnterVT in last_3d value. last_3d set to LAST_3D_OTHER indicates that the 3D hardware has unknown state. --- src/i830_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/i830_driver.c b/src/i830_driver.c index 624f986c..893f4918 100644 --- a/src/i830_driver.c +++ b/src/i830_driver.c @@ -2903,6 +2903,7 @@ I830EnterVT(int scrnIndex, int flags) /* Force invarient 3D state to be emitted */ *pI830->used3D = 1<<31; + pI830->last_3d = LAST_3D_OTHER; return TRUE; } From 1e6e675524461ef0eb1983de89e2877426571a55 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 23 Mar 2007 23:42:52 -0700 Subject: [PATCH 3/3] Eliminate calls to RRPostPendingProperty. RRPostPendingProperty has been removed in favor of RRPostPendingProperties, and that call is now managed outside of the driver. --- src/i830_tv.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/i830_tv.c b/src/i830_tv.c index ac521c1c..43a4dd4d 100644 --- a/src/i830_tv.c +++ b/src/i830_tv.c @@ -1486,7 +1486,6 @@ i830_tv_create_resources(xf86OutputPtr output) strlen (dev_priv->tv_format), dev_priv->tv_format, FALSE, TRUE); - RRPostPendingProperty (output->randr_output, tv_format_atom); if (err != 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); @@ -1513,7 +1512,6 @@ i830_tv_create_resources(xf86OutputPtr output) XA_INTEGER, 32, PropModeReplace, 1, &dev_priv->margin[i], FALSE, TRUE); - RRPostPendingProperty (output->randr_output, margin_atoms[i]); if (err != 0) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "RRChangeOutputProperty error, %d\n", err); @@ -1522,16 +1520,6 @@ i830_tv_create_resources(xf86OutputPtr output) #endif /* RANDR_12_INTERFACE */ } -static void -i830_tv_commit (xf86OutputPtr output) -{ -#ifdef RANDR_12_INTERFACE - if (output->randr_output) - RRPostPendingProperty (output->randr_output, tv_format_atom); -#endif - i830_output_commit (output); -} - #ifdef RANDR_12_INTERFACE static Bool i830_tv_set_property(xf86OutputPtr output, Atom property, @@ -1593,7 +1581,7 @@ static const xf86OutputFuncsRec i830_tv_output_funcs = { .mode_fixup = i830_tv_mode_fixup, .prepare = i830_output_prepare, .mode_set = i830_tv_mode_set, - .commit = i830_tv_commit, + .commit = i830_output_commit, .detect = i830_tv_detect, .get_modes = i830_tv_get_modes, .destroy = i830_tv_destroy,