From 9d7b0817f754fb5c03ef1af60443de3943ebd0a3 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Alex=20Villac=C3=ADs=20Lasso?= Date: Mon, 12 Jan 2009 23:56:12 -0500 Subject: [PATCH] Add missing xf86CrtcConfigInit call on SavagePreInit. Fixes server crash on startup with latest xserver git. --- src/savage_driver.c | 14 ++++++++++++++ src/savage_driver.h | 1 + 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a/src/savage_driver.c b/src/savage_driver.c index da472e9..d2954c3 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -1249,6 +1249,18 @@ static void SavageGetPanelInfo(ScrnInfoPtr pScrn) } } +static Bool +SavageCRTCResize(ScrnInfoPtr scrn, int width, int height) +{ + scrn->virtualX = width; + scrn->virtualY = height; + return TRUE; +} + +static const xf86CrtcConfigFuncsRec SavageCRTCResizeFuncs = { + SavageCRTCResize +}; + static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) { @@ -1888,6 +1900,8 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags) /* Add more options here. */ + /* Allocate an xf86CrtcConfig */ + xf86CrtcConfigInit (pScrn, &SavageCRTCResizeFuncs); psav = SAVPTR(pScrn); psav->IsSecondary = FALSE; diff --git a/src/savage_driver.h b/src/savage_driver.h index c47b472..1db429a 100644 --- a/src/savage_driver.h +++ b/src/savage_driver.h @@ -65,6 +65,7 @@ #include "xaa.h" #include "exa.h" #include "xf86xv.h" +#include "xf86Crtc.h" #include "savage_regs.h" #include "savage_vbe.h" -- 1.6.0.6