diff options
author | Keith Packard <keithp@neko.keithp.com> | 2007-03-23 23:41:36 -0700 |
---|---|---|
committer | Keith Packard <keithp@neko.keithp.com> | 2007-03-23 23:41:36 -0700 |
commit | 57e87e0d006cbf1f5b175fe02eeb981f741d92f0 (patch) | |
tree | d987d822946ec5a75bf5b4a1f0bf8d2bd526a1cb /hw/xfree86/modes | |
parent | 36e5227215e0912ddf8a010db042467f00efe0fc (diff) |
Make pending properties force mode set. And, remove AttachScreen calls.
Yes, two changes in one commit. Sorry 'bout that.
The first change ensures that when pending property values have been
changed, a mode set to the current mode will actually do something, rather
than being identified as a no-op. In addition, the driver no longer needs to
manage the migration of pending to current values, that is handled both
within the xf86 mode setting code (to deal with non-RandR changes) as well
as within the RandR extension itself.
The second change eliminates the two-call Create/AttachScreen stuff that was
done in a failed attempt to create RandR resources before the screen
structures were allocated. Merging these back into the Create function is
cleaner.
Diffstat (limited to 'hw/xfree86/modes')
-rw-r--r-- | hw/xfree86/modes/xf86Crtc.c | 6 | ||||
-rw-r--r-- | hw/xfree86/modes/xf86RandR12.c | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c index b9895d9da..7d86b6606 100644 --- a/hw/xfree86/modes/xf86Crtc.c +++ b/hw/xfree86/modes/xf86Crtc.c @@ -312,7 +312,13 @@ xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation, { xf86OutputPtr output = xf86_config->output[i]; if (output->crtc == crtc) + { output->funcs->commit(output); +#ifdef RANDR_12_INTERFACE + if (output->randr_output) + RRPostPendingProperties (output->randr_output); +#endif + } } /* XXX free adjustedmode */ diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index 4213fea52..6f52ee2d9 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -1011,8 +1011,7 @@ xf86RandR12CreateObjects12 (ScreenPtr pScreen) { xf86CrtcPtr crtc = config->crtc[c]; - crtc->randr_crtc = RRCrtcCreate (crtc); - RRCrtcAttachScreen (crtc->randr_crtc, pScreen); + crtc->randr_crtc = RRCrtcCreate (pScreen, crtc); RRCrtcGammaSetSize (crtc->randr_crtc, 256); } /* @@ -1022,13 +1021,13 @@ xf86RandR12CreateObjects12 (ScreenPtr pScreen) { xf86OutputPtr output = config->output[o]; - output->randr_output = RROutputCreate (output->name, + output->randr_output = RROutputCreate (pScreen, output->name, strlen (output->name), output); - RROutputAttachScreen (output->randr_output, pScreen); if (output->funcs->create_resources != NULL) output->funcs->create_resources(output); + RRPostPendingProperties (output->randr_output); } return TRUE; } |