summaryrefslogtreecommitdiff
path: root/randr
AgeCommit message (Collapse)AuthorFilesLines
2007-03-24Make pending properties force mode set. And, remove AttachScreen calls.Keith Packard6-147/+138
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 57e87e0d006cbf1f5b175fe02eeb981f741d92f0) Conflicts: randr/randrstr.h randr/rrcrtc.c I think master and server-1.3-branch are more in sync now.
2007-03-23Incorrect extra memory copy in RRChangeOutputProperty.Keith Packard1-2/+0
Left over from previous version of the code, this memmove will break when the mode is not Replace. (cherry picked from commit 945aa0aa556429b50dea8e8ebc0008304b093eb7)
2007-03-23Fix Pending property API, adding RRPostPendingProperty.Keith Packard2-58/+98
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 8eb288fbd69e2ffd02521d2c6a964c8180d08ec8)
2007-03-23Make sure RandR events are delivered from RRCrtcSet.Keith Packard1-43/+50
Some paths were skipping the event delivery stage. (cherry picked from commit 9ca7ba5d6012295a77ed773c656e786440da973d)
2007-03-23Clear allocated RandR screen private structure.Keith Packard1-1/+1
Use xcalloc instead of xalloc when allocating this structure to ensure consistent contents at startup. (cherry picked from commit 16f4c0c1750824f2e5a001cef82a4122a7a2beb0)
2007-03-17Correct ref counting of RRMode structuresKeith Packard2-1/+6
RRModes are referenced by the resource db, RROutput and RRCrtc structures. Ensure that the mode reference count is decremented each time a reference is lost from one of these sources. The missing destroys were in RRCrtcDestroyResource and RROutputDestroyResource, which only happen at server reset time, so modes would be unavailable in subsequent server generations.
2007-03-17Eliminate RRModeRec devPrivate field.Keith Packard1-1/+0
The xf86 mode setting code was mis-using this field to try and store a pointer to a DisplayModeRec, however, each output has its own copy of every DisplayModeRec leaving the one in in the RRModeRec devPrivate field pointing at a random DisplayModeRec. Instead of attempting to rectify this, eliminating the devPrivate entirely turned out to be very easy; the DDX code now accepts an arbitrary RRModeRec structure and set that to the hardware, converting it on the fly to a DisplayModeRec as needed. (cherry picked from commit 3506b9376c2b0db09bfff58d64e07af88a6e8195)
2007-03-17Add support for user-defined modelines in RandR.Keith Packard7-50/+350
The RandR protocol spec has several requests in support of user-defined modes, but the implementation was stubbed out inside the X server. Fill out the DIX portion and start on the xf86 DDX portion. It might be necessary to add more code to the DDX to insert the user-defined modes into the output mode list. (cherry picked from commit 63cc2a51ef87130c632a874672a8c9167f14314e) Conflicts: randr/randrstr.h Updated code to work in master with recent security API changes.
2007-03-15Set the RandR version returned, rather than just passing the proto's version.Eric Anholt1-2/+5
2007-03-05Bugzilla #7145: fix build with gcc 2.95Jens Granseuer3-3/+3
Bugzilla #7145: <http://bugs.freedesktop.org/show_bug.cgi?id=7145> Patch #8987: <http://bugs.freedesktop.org/attachment.cgi?id=8987>
2007-02-28Don't crash setting a NULL mode with a randr classic DDX. Also remember to ↵Aaron Plattner1-0/+9
update the screen size during modesets.
2007-02-28Return BadMatch if a client tries to clone non-cloneable outputs.Aaron Plattner1-0/+21
2007-02-17RRConfigureOutputProperty is a variable length request.Keith Packard1-1/+1
Replace REQUEST_SIZE_MATCH with REQUEST_AT_LEAST_SIZE
2007-02-15Report correct RandR 1.0 sizeID. Report correct subpixel order.Keith Packard1-29/+33
RandR 1.0 sizeID must be computed the same way every time, so when reporting it in the ScreenChangeNotify event, just construct the usual 1.0 data block and use that. subpixel geometry information can be computed by looking at the connected outputs and finding any with subpixel geometry and using one of those for the global screen subpixel geometry. This might be improved by reporting None if more than one screen has information and they conflict.
2007-02-01Fix the size expectations of xRRSetCrtcGamma.Eric Anholt1-1/+1
It was using REQUEST_SIZE_MATCH (client request length must equal request size) rather than REQUEST_AT_LEAST_SIZE (client request length must be at least big enough for request size), and this request has data following the request structure.
2007-01-24Warning fix for RRCrtcSetRotations().Eric Anholt1-0/+1
2007-01-24Make Xinearama screen information reflect CRTC rotation.Keith Packard4-28/+33
2007-01-18Account for CRTC rotation in the cursor containment code.Eric Anholt1-8/+42
2007-01-17Add a setter for randr_crtc->rotations.Eric Anholt2-0/+17
2007-01-16When changing a non-pending property, call the screen rrOutputSetProperty hook.Eric Anholt1-0/+8
2007-01-16Don't forget to add the property we configure to the properties list.Eric Anholt1-0/+6
2007-01-02Track physical screen size and send out updates when that changes.Keith Packard3-1/+10
Events and internal data structures need to be updated whenever the physical or pixel size of the screen changes. The code was ignoring the physical size, so changing only that would not be registered anywhere. (cherry picked from f42e3cea236fa0091ed398a818fc8e17b0e1b3df commit)
2007-01-02Use RRScreenSetSizeRange in 1.0 compat. Check RRGetInfo for error.Keith Packard2-17/+15
The RRScreenSizeSetRange function is used externally for 1.2 API drivers, but can also be used in the 1.0 compatibility code. This also ensures that the right changed bits are set so that clients are correctly notified when the range changes. RRGetInfo can return an error, use that to return BadAlloc to clients instead of blindly going on with various requests. (cherry picked from f05dd384d38c76dd9662933a03625dfef5b1c81f commit)
2006-12-15Convert callers of SecurityLookupWindow() to dixLookupWindow().Eamon Walsh2-27/+20
2006-12-15Convert callers of LookupWindow() to dixLookupWindow().Eamon Walsh1-9/+12
2006-12-15RandR 1.2 rotation code must adjust width/height.Keith Packard2-8/+29
Mode lines reflect the monitor mode, not the projected size into the frame buffer. Flip width/height around so that the dimensions are oriented correctly. (cherry picked from 612a8e61803da8db0e305cbb093696b8e4284572 commit)
2006-12-15RandR 1.0 refresh rates unscrambled. SetScreenConfig uses RRCrtcSet right.Keith Packard1-44/+69
RandR 1.0 refresh rates were scrambled when working with a 1.2 driver that returned sizes in a mixed order. SetScreenConfig was treating RRCrtcSet as returning an RandR status instead of a Bool. (cherry picked from 6dc711833d7387372012fdff1ce1df3aefa2d234 commit)
2006-12-15RandR: config time updates when hardware config changes.Keith Packard5-15/+29
The config time in the RandR protocol reflects when the hardware state has changed. It was getting changed anytime the driver changed the usage of the hardware as well. (cherry picked from 98d18a6578130adb411ca4bcc776fcb7e07f189f commit)
2006-12-15RandR mode list needs both output and crtc modes.Keith Packard1-1/+22
When an output no longer reports the current mode, it must still be included in the list advertised by the X server. Walk the crtcs to ensure it is included. (cherry picked from 78689d0d6630afcbcd3ce5394d12c2564a489f45 commit)
2006-12-14Remove instances of macro SECURITY_VERIFY_DRAWABLE.Eamon Walsh1-3/+4
2006-12-14Naming change: Security*Access -> Dix*AccessEamon Walsh5-19/+19
2006-12-02Destroying RandR crtc or output overwrites memory.Keith Packard2-2/+2
RRCrtcDestroyResource and RROutputDestroyResource had matching bugs that would overwrite memory past the end of the storage of the crtc or output arrays. Oops. (cherry picked from 4202b23ed86405a4cebfdcf239df1b023c1d10ca commit)
2006-12-02RandR ListOutputProperties has nAtoms element, not nPropertiesKeith Packard1-1/+1
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 66b6358a393972946f16394918db2401c51dc5ed commit)
2006-11-28Ensure RandR resource types are registered before resources are created.Keith Packard3-0/+7
Now that resources can be created during server initialization, make sure the crtc, output and mode resource types are created before attempting to create associated resources. (cherry picked from commit ec83d674167e7045d5317b179c9998e3172a26dc)
2006-11-28Allocate correct size for RRPropertyRec (oops).Keith Packard1-1/+2
Neglected to change the allocation size from sizeof (PropertyRec) to sizeof (RRPropertyRec). Lots of fun crashes this way. (cherry picked from commit 0626eb8e5c9fa05de6bdc9aa0c654f5148bf7cff)
2006-11-28Change RandR property datatype to include pending/valid values.Keith Packard5-124/+384
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 af55c65bea40669fdc038aa34c6a1ec9ecb33e87)
2006-11-16Reduce calls to RRGetInfo.Keith Packard2-8/+5
RRGetInfo can be expensive. Don't invoke it when quering Xinerama information or setting a new CRTC configuration. (cherry picked from commit b5aa9eb8e6eda36856a075f4b008c33f6c706bad)
2006-11-16Remove RandR output options.Keith Packard5-89/+29
RandR output options are now expected to be handled by properties instead. (cherry picked from commit 8b2a7e94a1dc2776ab2cfaaebb309be02502602a)
2006-11-08Add RRInit function to create resource types for RR objects.Keith Packard3-18/+41
To allow RandR objects to be created before the screen object exists, the resource types must be registered with the resource database. A driver wishing to create RandR objects must call RRInit before doing so. Also, fix a segfault when setting Output data before it is associated with a screen.
2006-11-08Allow RandR objects to be created before the associated ScreenRec.Keith Packard8-168/+253
xf86 drivers need to create RandR object in the PreInit stage, before the ScreenRec is allocated. Changing the RandR DIX code to permit this required the addition of functions that later associate the objects with the related screen. An additional change is that modes are now global, and no longer associated with a specific screen. This change actually makes mode management cleaner as there is no more per-screen list of modes to deal with. This changes the RandR 1.2 ABI/API for drivers.
2006-11-03Don't bump the refcnt if the new mode is NULL.Eric Anholt1-1/+2
2006-11-01Move physical size from mode to output.Keith Packard8-15/+50
Modes can be shared across different sized monitors this way. Also caught some missing byteswapping and an incorrect return type.
2006-10-25Merge master back in and clean up some unfinished code (closes 8745)Keith Packard6-56/+27
2006-10-24Merge branch 'master' into randr-1.2Keith Packard1-0/+48
2006-10-24Byte swap RRSelectInput enable flags.Keith Packard1-0/+1
2006-10-13Limit pointer to valid crtc areas. Add event swapping. Fix change tracking.Keith Packard9-48/+415
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-05Add preferred modes for each output. Round vrefresh. Deliver crtc events.Keith Packard6-57/+117
2006-10-03Add mode origins and output options. Fix memmoves in resource free funcs.Keith Packard7-44/+171
Output options and mode origins both affected driver ABI. memmove mistakes were causing 'Freeing resource which isn't there' messages. Prune unused non-user defined modes from available list now.
2006-09-21When no mode is specified, don't validate mode-specific parameters.Keith Packard1-46/+49
2006-09-20Steal Xinerama code from SiS driver. Add missing files.Keith Packard8-3/+1210
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.