Commit graph

4903 commits

Author SHA1 Message Date
Keith Packard
ea5aeee7b9 rrtransform needs randrstr to get RANDR_INTERFACE defines 2008-03-21 03:14:47 -07:00
Keith Packard
f4d9775253 Create rrtransform.[ch]. Add RRTransform argument to RRCrtcNotify.
Instead of using a separate function to notify DIX about transform changes,
add the transform to RRCrtcNotify so that the whole Crtc state changes
atomically.
2008-03-21 02:39:49 -07:00
Keith Packard
adae567297 Avoid overflow in PictureTransformPoint. Fix PictureTransformIsIdentity.
PictureTransformPoint computes homogeneous coordinates internally, but fails
to handle intermediate values larger than 16.16. Use 64 bit intermediate
values while computing the final result at 16.16 and only complain if that
result is too large.

PictureTransformIsIdentity was completely wrong -- it was not checking for
identity transforms at all.
2008-03-21 02:35:28 -07:00
Keith Packard
6b59159fdf Allow drivers to set crtc transforms.
Track curent transform down in the mode setting code so that it may be set
separately from RandR.
2008-03-19 12:15:39 -07:00
Keith Packard
5360d47549 Handle RandR transform matrices in floating point.
RandR matrix computations lose too much precision in fixed point;
computations using the inverted matrix can be as much as 10 pixels off.
Convert them to double precision values and pass those around. These API
changes are fairly heavyweight; the official Render interface remains fixed
point, so the fixed point matrix comes along for the ride everywhere.
2008-03-19 00:46:35 -07:00
Keith Packard
71267eb380 Eliminate inverse matrix from randr transform protocol
It is easier, and potentially more precise, to compute the inverse in the
server where everything can eventually be kept in floating point form.
2008-03-18 16:06:06 -07:00
Keith Packard
fd7b5e2c28 Report whether transforms are support from driver through extension to client
Add APIs to xf86RandR12 support and randr extension to record whether the
driver supports transforms, report that value in the RRGetCrtcTransform
reply.
2008-03-18 16:05:34 -07:00
Keith Packard
85ff452bfc Clear shadow pixmaps before using them.
This eliminates some ugly flashing, as well as clearing the borders when the
shadow will not be completely painted.
2008-03-18 15:35:12 -07:00
Keith Packard
02b8d204e1 When converting from double to fixed, round carefully.
This reduces the matrix representation error after inverting a
transformation matrix (although it doesn't eliminate it entirely).

Perhaps we should extend Render to include 64-bit floating point transforms...
2008-03-18 15:15:40 -07:00
Keith Packard
4184a2db90 Compute matrix inversion instead of using wire version in RRCrtcTransformSet
It doesn't make sense to have the client invert this matrix when the server
can do so reasonably efficiently. This avoids weird fixed point rounding
errors when testing the transform against its inverse. Now to fix the
protocol.
2008-03-17 23:04:49 -07:00
Keith Packard
47dcd54077 Add matrix inversion function (uses doubles)
The obvious matrix inversion function, coded using doubles to avoid fiddling
with fixed point precision adventures.
2008-03-17 23:03:56 -07:00
Keith Packard
5ec18f40e7 Adjust transformed cursor position to account for hotspot 2008-03-17 16:14:43 -07:00
Keith Packard
c9204c8fcf Actually use filter kernel size to expand transform redisplay box 2008-03-17 16:14:15 -07:00
Keith Packard
21457a5a6b Correct bilinear filter kernel size (should be 2x2) 2008-03-17 16:13:25 -07:00
Keith Packard
18d6f5b801 Handle filter widths in xf86Rotate 2008-03-17 15:22:06 -07:00
Keith Packard
3b0552541f Initialize and cleanup new filter fields in xf86Crtc. 2008-03-17 15:21:26 -07:00
Keith Packard
1970640dc6 Pass filter kernel size through transforms 2008-03-17 15:20:52 -07:00
Keith Packard
698047944f Add kernel size to Render filters.
This width/height value lets filter users know how far the filter spreads
into the source image.
2008-03-17 15:19:17 -07:00
Keith Packard
2193d49ff1 Use transform when computing scanout size of modes
Report transformed crtc sizes through RandR and Xinerama. Test screen size
against transformed mode sizes when configuring the Crtc.
2008-03-17 13:57:47 -07:00
Keith Packard
715b158e15 [RANDR] Support filters in CRTC transforms.
Create new RRTransform datatype to hold all of the transform related
information, use that in lots of places to pass filters around.
2008-03-15 00:36:45 -07:00
Keith Packard
207869447a [render] Split out filter finding from filter setting.
To prepare for RandR using filters in transforms, split out
code paths so that the RandR code can validate the filter name and
parameters during the transform set operation so that use of the filter
later will not have unreportable errors.
2008-03-14 13:46:30 -07:00
Keith Packard
90b55ca9a5 Wire up RandR CRTC transform protocol, bump server to RandR 1.3
This involved removing a pile of matrix code from the DDX,
as well as moving a bit of transform logic from DDX to DIX.
2008-03-13 21:31:12 -07:00
Keith Packard
404de98155 Add funcs to convert between protocol and pixman matrices 2008-03-13 21:30:18 -07:00
Keith Packard
3bf59c2fac Randr now depends on Render for matrices 2008-03-13 21:29:19 -07:00
Keith Packard
e65e9b4b12 Export a bunch of matrix operations from render.
The render extension uses many matrix operations internally, this change
exposes those functions to other parts of the server, drivers and
extensions. The change is motivated by the 'transform' additions to the
RandR extension but will likely be useful elsewhere.
2008-03-13 14:50:13 -07:00
Keith Packard
3c01bd180d Add projective transforms to RandR DIX/DDX API.
New RRCrtcGetTransform function in DIX that DDX can use to get the pending
transform. The DDX code should be complete; the DIX code is just a stub at
this point.
2008-03-13 14:26:01 -07:00
Keith Packard
b2657ec598 XkbCopyKeymap was mangling doodads and overlays 2008-03-10 21:29:12 -07:00
Adam Jackson
ab9b0b36ac Add the "amd" driver to magic driver selection. 2008-03-10 13:40:00 -04:00
Adam Jackson
0f6aaf636b Bug #14927: Fix the math for xf86NumDefaultModes. 2008-03-10 09:14:20 -04:00
Kristian Høgsberg
01c2e01f2a GLX: Track changes to DRI_TEX_BUFFER extension.
We now just pass in the __DRIdrawable.
2008-03-09 21:40:27 -04:00
Kristian Høgsberg
acedc03367 DRI2: Return event buffer head index in DRI2CreateDrawable.
And pass it to the DRI driver in AIGLX.
2008-03-09 21:39:19 -04:00
Julien Cristau
911f0c1476 Programs in hw/dmx/examples/ want client-side xkb headers. 2008-03-07 23:26:56 +01:00
Kristian Høgsberg
9abaad115c Fix DRI2 texture target for GLX_EXT_texture_from_pixmap.
Thanks to Dennis Kasprzyk for pointing it out and for reminding me to
commit it.
2008-03-07 14:13:26 -05:00
Adam Jackson
3bf7ff7032 Size xf86DefaultModes explicitly.
i.e., don't check for the end of the list by ->name == NULL, since that
won't work now.  Fix the consumers of xf86DefaultModes to use the new
explicit size as well.
2008-03-07 09:25:06 -05:00
Adam Jackson
3fcb6445dc Fix segfault when a monitor exists but has no modes.
Thanks to Zhenyu Wang for finding this.
2008-03-07 08:30:19 -05:00
Aaron Plattner
a8d760f567 Get modes code building with old X servers again.
This change uses XORG_VERSION_CURRENT < 7.0 to mean "server newer than 1.2"
since XORG_VERSION current went backwards at some point.
2008-03-06 14:42:00 -08:00
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
Adam Jackson
34b69e3bc0 Fix distcheck.
(cherry picked from commit 2a47accff8)
2008-03-05 23:57:15 -05:00
Eamon Walsh
d4101140f4 xselinux: Implement polyinstantiation support and related protocol. 2008-03-04 22:39:41 -05:00
Alan Coopersmith
cf984dcc15 Make sure SIOGLIFCONF buffer is properly aligned for socket structures 2008-03-04 16:03:38 -08:00
Adam Jackson
27e7dacbf7 Make xf86InitialConfiguration slightly smarter.
Old heuristic was to find the first monitor that expressed a preference,
then attempt to get all other monitors to agree.  This doesn't work
particularly well when the two sets of modes don't precisely intersect,
you get overlapping-but-not-identical output geometry and things go wrong.

New heuristic is:
- Exact user preference, if given
- Exact output preference, if the same for all outputs
- Best (largest) mode of modes common to all outputs:
  - with the same aspect ratio as all outputs (may be NULL)
  - with 4:3 aspect ratio
- Then the old heuristic to try to get something lit

Note that it is simply not doable to have a reliable initial output guess if
you insist on trying to clone all outputs together.  It's far too easy to
end up with displays that simply don't have modes in common.  We need to
switch to right-of placement someday, once we're not limited to CRTC size
limits and we have working multi-GPU in RANDR.
2008-03-04 11:38:34 -05:00
Adam Jackson
95df04b744 Remove all mention of the vga driver from the config logic. 2008-03-04 10:59:24 -05:00
Eamon Walsh
056a2ce02c XACE: Check the return value of the selection create hook call. 2008-03-04 02:44:48 -05:00
Eamon Walsh
72f2197545 dix: Convert selection list to a linked list.
Fixes a bug where pointers were being invalidated after a realloc.
2008-03-04 02:14:34 -05:00
Daniel Stone
0bd0f90d7c XKB: Fix initial map setting on startup
Due to an unwitting sense inversion when eliminating XkbFileInfo, we were
setting the complete wrong keymap on startup (non-XKB map if we had an XKB
map available, or the XKB map if we didn't have any available).  Invert the
sense properly, and add two small bits that also went missing in that commit.
2008-03-04 03:50:25 +02:00
James Cloos
613852ce6a Fix some documentation typos 2008-03-03 16:11:05 -05:00
Jesse Barnes
3f23139137 Add cscope files to .gitignore 2008-03-03 13:05:12 -08:00
Adam Jackson
708f07753f RANDR 1.2: Inherit PreferredMode from the global configuration, if any.
If you don't do this, then Modes "800x600" in the Display subsection will
be dutifully ignored and the driver will start at whatever resolution it
feels like.
2008-03-03 15:49:48 -05:00
Adam Jackson
605e6764df Fix Motif menu drawing in Xnest.
See also Red Hat bug #229350, OpenSolaris bug #6366490.
2008-03-03 15:45:17 -05:00
Adam Jackson
3b73d62791 xf86DDCMonitorSet: Honor the DisplaySize from the config file.
We honor sync ranges and pixel clock settings from the config here, no
reason to ignore DisplaySize.
2008-03-03 15:43:22 -05:00