summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMario Kleiner <mario.kleiner.de@gmail.com>2014-08-13 06:48:10 +0200
committerBen Skeggs <bskeggs@redhat.com>2014-08-17 07:34:23 +1000
commit7eab6806927ea8938b9bd143d1702e87fde2f2cc (patch)
tree70e0078130323017ba488feb053c46a2ebaa970b
parent6ad053788e804f3a8bd36ee3653ec95e7df62623 (diff)
Make new ZaphodHeads work across server regenerations.
Reset the mask of already assigned crtc's at start of each new server generation. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--src/nv_driver.c8
-rw-r--r--src/nv_type.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/src/nv_driver.c b/src/nv_driver.c
index a9524a0..6045095 100644
--- a/src/nv_driver.c
+++ b/src/nv_driver.c
@@ -276,6 +276,14 @@ NVInitScrn(ScrnInfoPtr pScrn, struct xf86_platform_device *platform_dev,
pPriv->ptr = xnfcalloc(sizeof(NVEntRec), 1);
pNVEnt = pPriv->ptr;
pNVEnt->platform_dev = platform_dev;
+ }
+ else
+ pNVEnt = pPriv->ptr;
+
+ /* Reset settings which must not persist across server regeneration */
+ if (pNVEnt->reinitGeneration != serverGeneration) {
+ pNVEnt->reinitGeneration = serverGeneration;
+ /* Clear mask of assigned crtc's in this generation to "none" */
pNVEnt->assigned_crtcs = 0;
}
diff --git a/src/nv_type.h b/src/nv_type.h
index 0f4b0bc..3e7c234 100644
--- a/src/nv_type.h
+++ b/src/nv_type.h
@@ -31,6 +31,7 @@ typedef struct _NVRec *NVPtr;
typedef struct {
int fd;
+ unsigned long reinitGeneration;
struct xf86_platform_device *platform_dev;
unsigned int assigned_crtcs;
} NVEntRec, *NVEntPtr;