[PATCH] Call xf86CrtcConfigInit() from within SavagePreInit(), fixes #19337
frankdelange
freedesktop-f at unternet.org
Tue Dec 30 11:22:20 PST 2008
From: Frank de Lange <freedesktop-f at unternet.org>
---
src/savage_driver.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
diff --git a/src/savage_driver.c b/src/savage_driver.c
index 919bd1a..1e93be0 100644
--- a/src/savage_driver.c
+++ b/src/savage_driver.c
@@ -49,6 +49,8 @@
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#include <xorg/xf86Crtc.h>
+
#include "xf86xv.h"
#include "savage_driver.h"
@@ -80,6 +82,7 @@ static Bool SavagePciProbe(DriverPtr drv, int entity_num,
static Bool SavageProbe(DriverPtr drv, int flags);
static int LookupChipID(PciChipsets* pset, int ChipID);
#endif
+static void SavagePreInitCrtcConfig(ScrnInfoPtr pScrn);
static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags);
static Bool SavageEnterVT(int scrnIndex, int flags);
@@ -1247,6 +1250,22 @@ static void SavageGetPanelInfo(ScrnInfoPtr pScrn)
}
}
+static Bool savage_xf86crtc_resize (ScrnInfoPtr scrn, int width, int height)
+{
+ scrn->virtualX = width;
+ scrn->virtualY = height;
+ return TRUE;
+}
+
+static const xf86CrtcConfigFuncsRec savage_xf86crtc_config_funcs = {
+ savage_xf86crtc_resize
+};
+
+static void SavagePreInitCrtcConfig(ScrnInfoPtr pScrn)
+{
+ /* Allocate xf86CrtcConfig */
+ xf86CrtcConfigInit (pScrn, &savage_xf86crtc_config_funcs);
+}
static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
{
@@ -3640,6 +3659,8 @@ static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen,
if (xf86DPMSInit(pScreen, SavageDPMS, 0) == FALSE)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "DPMS initialization failed\n");
+ SavagePreInitCrtcConfig(pScrn);
+
#ifdef XF86DRI
if (psav->directRenderingEnabled) {
/* complete the DRI setup.*/
--
1.6.0.4
More information about the xorg
mailing list