Commit Graph

14 Commits

Author SHA1 Message Date
Jesse Barnes
ca616b902b Allow RandR get output property to call into drivers
In order to report accurate values to users of the RandR property interface,
it's sometimes necessary to ask the driver to update the value (for example
when backlight brightness changes without the server's knowledge, due to hotkey
events or direct sysfs banging).

This patch wires up the core server code with a new xf86CrtcFuncs callback,
get_property, to allow for this.

The new code is available under the RANDR_13_INTERFACE define, which in turn
depends on the RANDR_12_INTERFACE code.
2008-03-06 13:50:58 -08:00
Daniel Stone
2d738efb95 RandR: Remove usage of alloca
Replace with heap allocations.
2007-11-05 14:34:41 +00:00
Keith Packard
804080a709 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.
(cherry picked from commit 57e87e0d00)

Conflicts:

	randr/randrstr.h
	randr/rrcrtc.c

I think master and server-1.3-branch are more in sync now.
2007-03-24 00:01:47 -07:00
Keith Packard
476f2b5aef Incorrect extra memory copy in RRChangeOutputProperty.
Left over from previous version of the code, this memmove will break when
the mode is not Replace.
(cherry picked from commit 945aa0aa55)
2007-03-23 01:32:45 -07:00
Keith Packard
7093367c39 Fix Pending property API, adding RRPostPendingProperty.
Pending Properties take effect when the driver says they do, so provide an
API to tell DIX when a property effect is made. Also, allow driver
to reject property values in RRChangeOutputProperty.
(cherry picked from commit 8eb288fbd6)
2007-03-23 01:32:34 -07:00
Keith Packard
8606aeb9b2 RRConfigureOutputProperty is a variable length request.
Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE
2007-02-17 15:16:11 -08:00
Eric Anholt
cde17015df When changing a non-pending property, call the screen rrOutputSetProperty hook. 2007-01-16 13:01:45 -08:00
Eric Anholt
e3add7c8ec Don't forget to add the property we configure to the properties list. 2007-01-16 13:01:44 -08:00
Eamon Walsh
6c46645cfc Naming change: Security*Access -> Dix*Access 2006-12-14 14:45:42 -05:00
Keith Packard
23ba72323a RandR ListOutputProperties has nAtoms element, not nProperties
Earlier RandR 1.2 encoding revisions used 8-bit nProperties field.
Final RandR 1.2 spec uses 16-bit nAtoms field instead.
(cherry picked from 66b6358a39 commit)
2006-12-02 10:44:06 +11:00
Keith Packard
6245e9dd47 Allocate correct size for RRPropertyRec (oops).
Neglected to change the allocation size from sizeof (PropertyRec) to
sizeof (RRPropertyRec). Lots of fun crashes this way.
(cherry picked from commit 0626eb8e5c)
2006-11-28 11:13:43 -08:00
Keith Packard
24abce8032 Change RandR property datatype to include pending/valid values.
This patch tracks the protocol changes which introduce more complex
semantics for RandR output properties including pending and valid value
information.
(cherry picked from commit af55c65bea)
2006-11-28 11:13:43 -08:00
Keith Packard
054f8cd267 Limit pointer to valid crtc areas. Add event swapping. Fix change tracking.
Add function to keep pointer within valid crtc areas.
Finish event delivery and swapping code.
Separate configuration from layout changes to send correct events.
2006-10-13 17:34:53 -07:00
Keith Packard
219546fd76 Steal Xinerama code from SiS driver. Add missing files.
Provide a Xinerama implementation when DIX version isn't enabled. This
version exposes each crtc as a separate 'screen' and reports the size of
that patch. The extension also sends ConfigureNotify events to the root
window whenever crtcs change so that applications will re-fetch xinerama
information. This actually works for metacity.
2006-09-20 22:43:05 -07:00