Commit Graph

389 Commits

Author SHA1 Message Date
Alan Coopersmith
9805cedf7b Use C99 designated initializers in extension Events
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 22:52:30 -07:00
Alan Coopersmith
bd6f948c41 Use C99 designated initializers in randr Replies
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:30 -07:00
Alan Coopersmith
cdf5bcd420 Use calloc to zero fill buffers being allocated for replies & events
Ensures padding bytes are zero-filled

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:29 -07:00
Alan Coopersmith
2e739a8870 ProcRRListOutputProperties: skip atom walk if the list is empty
pAtoms is only allocated if numProps was non-zero, so move the walk
through the property list to copy atoms to it inside the if (numProps)

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:29 -07:00
Alan Coopersmith
15bc13c8d0 ProcRRGetScreenInfo: swap configTimestamp as well
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:29 -07:00
Jaroslav Šmíd
3a013b8816 Bug 51375: Xorg doesn't set status for RRGetOutputInfo
https://bugs.freedesktop.org/show_bug.cgi?id=51375
https://bugs.freedesktop.org/attachment.cgi?id=63397

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:13 -07:00
Alan Coopersmith
5b86c072d1 Use temporary variables instead of parts of reply structures
When passing variable pointers to functions or otherwise doing long
sequences to compute values for replies, create & use some new
temporary variables, to allow for simpler initialization of reply
structures in the following patches.

Move memsets & other initializations to group with the rest of the
filling in of the reply structure, now that they're not needed so
early in the code path.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:14:50 -07:00
Alan Coopersmith
789d64e19a Remove unneccesary casts from WriteToClient calls
Casting return to (void) was used to tell lint that you intended
to ignore the return value, so it didn't warn you about it.

Casting the third argument to (char *) was used as the most generic
pointer type in the days before compilers supported C89 (void *)
(except for a couple places it's used for byte-sized pointer math).

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:12:56 -07:00
Dave Airlie
c41922940a dix/randr: add a hook into screen to replace scanout pixmap
For DRI2 in some offload cases we need to set a new pixmap on the crtc,
this hook allows dri2 to call into randr to do the necessary work to set
a pixmap as the scanout pixmap for the crtc the drawable is currently on.

This is really only to be used for unredirected full screen apps in composited
environments.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:39:09 +01:00
Dave Airlie
426bc0a28e randr: add hooks for offload sink provider protocol
This adds the protocol handler and associated providers handling
for the offload slaves, it allows two providers to be connected as
offload sink/source.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:45 +01:00
Dave Airlie
12905dfaf0 dix/xf86: initial offload slave tracking (v1.1)
add the linked list and provider hooks.

v1.1: add another assert in the add path.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:45 +01:00
Dave Airlie
4c92eb00f9 randr: add output source setup
This adds the output sources to the associated list and adds the protocol
handler for the randr SetProviderOutputSource.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:11 +01:00
Dave Airlie
bec4cb72c5 randr: hook up output slave to screen resources return
When the client asks for the screen resources list, it will now
get a list of crtc/outputs for the master + all attached slaves,
this will let randr configure all attached slave devices properly.

Keith asked I merge the two functions, but not just yet, the current
multi screen code doesn't handle primary yet properly, will fix it up later.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:11 +01:00
Dave Airlie
c5cc2a8243 randr: check the screen size bounds against the master
The master contains the complete screen size bounds, so check
the width/height against it.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:11 +01:00
Dave Airlie
26d848cb91 randr: fix tellchanged to work with slave scanouts
Tell changed need to tell only for the master pixmap,
however it gets called from various places for slave screens,
so convert to telling clients about changes on the master screen.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:11 +01:00
Dave Airlie
4bf0192d81 randr: fixup constrain to work with slave screens.
Current code constrains the cursor to the crtcs on the master
device, for slave outputs to work we have to include their crtcs
in the constrain calculations.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:11 +01:00
Dave Airlie
f2da2c1204 randr: add initial scanout pixmap support (v3)
When randr notices a crtc configuration request for a slave device,
it checks if the slave allocated pixmap exists and is suitable,
if not it allocates a new shared pixmap from the master, shares
it to the slave, and starts the master tracking damage to it,
to keep it updated from the current front pixmap.

If the resize means the crtc is no longer used it will destroy
the slave pixmap.

This adds the concept of a scanout_pixmap to the randr_crtc object,
and also adds a master pixmap pointer to the pixmap object, along
with defining some pixmap helper functions for getting pixmap box/regions.

v2: split out pixmap sharing to a separate function.

v3: update for void *

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:10 +01:00
Dave Airlie
382dd45bb8 dix: add ability to link output slave gpus to the current gpu (v1.1)
Just add the interfaces to attach/detach output slaves, and
a linked list to keep track of them. Hook up the randr providers
list to include these slaves.

v1.1: add another assert to the add path.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:10 +01:00
Dave Airlie
3cbc4c10b5 randr: expose unattached providers to the clients.
This provides the unattached provider list to the clients.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-07 10:37:10 +01:00
Dave Airlie
66d92afeae randr: add provider object and provider property support (v6)
This adds the initial provider object and provider property
support to the randr dix code.

v2: destroy provider in screen close
v2.1: fix whitespace

v3: update for latest rev of protocol + renumber after 1.4 tearout.

v4: fix logic issue, thanks Samsagax on irc

v5: keithp's review: fix current_role, fix copyrights, fix master
reporting crtc/outputs.

v6: port to new randr interface, drop all set role bits for now

v7: drop devPrivate in provider, not needed, add BadMatch returns
for NULL SetProviderOffloadSink and SetProviderOutputSource, drop
the old typedef.

Reviewed-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-07-06 22:16:02 +01:00
Aaron Plattner
212b980323 randr: Fix REQUEST vs. REQUEST_SIZE_MATCH mismatch
ProcRRGetScreenSizeRange uses REQUEST(xRRGetScreenSizeRangeReq) followed by
REQUEST_SIZE_MATCH(xRRGetScreenInfoReq).  This happens to work out because both
requests have the same size, so this is not a functional change, just a cosmetic
one.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-06-29 23:34:30 -07:00
Keith Packard
855003c333 randr: Catch two more potential unset rrScrPriv uses
Ricardo Salveti <ricardo.salveti@linaro.org> found one place where the
randr code could use the randr screen private data without checking
for null first. This happens when the X server is running with
multiple screens, some of which are randr enabled and some of which
are not. Applications making protocol requests to the non-randr
screens can cause segfaults where the server touches the unset private
structure.

I audited the code and found two more possible problem spots; the
trick to auditing for this issue was to look for functions not taking
a RandR data structure and where there was no null screen private
check above them in the call graph.

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-06-28 10:06:40 -07:00
Ricardo Salveti de Araujo
32603f57ca randr: first check pScrPriv before using the pointer at RRFirstOutput
Fix a seg fault in case pScrPriv is NULL at ProcRRGetScreenInfo,
which later calls RRFirstOutput.

Signed-off-by: Ricardo Salveti de Araujo <ricardo.salveti@linaro.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-06-28 10:06:40 -07:00
Keith Packard
4ba340cfaa randr: Clean up compiler warnings about unused and shadowing variables
set but not used variables
shadowing a previous local

A hidden problem was that the VERIFY_RR_* macros define local 'rc'
variables, any other local definitions for those would be shadowed and
generate warnings from gcc. I've renamed the other locals 'ret'
instead of 'rc'.

Signed-off-by: Keith Packard <keithp@keithp.com>
2012-06-21 18:42:46 -07:00
Andy Ritger
dae317e726 randr: Don't recurse into mieqProcessInputEvents() from RRTellChanged().
Call UpdateCurrentTimeIf(), not UpdateCurrentTime(), from RRTellChanged().
The latter calls ProcessInputEvents(), which can trigger a recursion
into mieqProcessInputEvents().  The former omits the call to
ProcessInputEvents().

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-06-20 11:53:47 -07:00
Dave Airlie
1f0e8bd5eb api: rework the X server driver API to avoid global arrays.
This is a squash merge containing all the API changes, as
well as the video ABI bump.

Its been squashed to make bisection easier.

Full patch log below:

commit b202738bbf0c5a1c1172767119c2c71f1e7f8070
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Mon May 14 15:16:11 2012 -0700

    xfree86: Bump video ABI to 13.0

    The ABI was broken by changes to convert from screen index numbers to ScreenPtr
    / ScrnInfoPtr in various structures and function signatures.

    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3d5f7d9f8d408bcad3f83277d255f25d3b0edbf3
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu May 24 10:56:57 2012 +0100

    xf86: xf86ClearEntityListForScreen should take a pScrn

    When adding GPU screens this make life easier.

    (also fix comment, as pointed out by Alan)

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit afee8b5ab4501597ecc1ade34124d7ca227ab055
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu May 24 07:07:32 2012 +0100

    xf86i2c: add pscrn for drivers to use

    This just adds a pScrn pointer into the struct for the drivers to use
    instead of scrnIndex. Mostly scrnIndex is used for logging, but some
    drivers use it to lookup xf86Screens, so let them stash a pScrn instead.

    Removing the scrnIndex is a bit more involved and I'm not sure its worth
    the effort. Doing i2c in the X server is legacy code as far as I'm concerned.

    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit ea5092f1f679691d187f1eee9427e6057beec56e
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 19:25:20 2012 +0100

    dix/gc: consolidate GC object creation in one place

    The standard GC create and scratch GC create were 90% the same really,
    and I have a need in the future for creating GC objects without the
    other bits, so wanted to avoid a third copy.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3d91482ea9b4883e64e496f2768168e0ffa21ba1
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 10:24:06 2012 +0100

    xf86: add a define to denote the new non-index interfaces are being used

    This can be used by drivers to provide compatible APIs.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 37c3ae3e6cd4f3dedc72f371096d6743f8f99df3
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 15:09:12 2012 +0100

    dix: make Create/Free scratch pixmaps take a ScreenPtr

    While technically an API/ABI change I doubt anyone uses it,
    but it helps in splitting screens up.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 75f2062a3fe94f04764ecc7d2ff2fbbeccb9da60
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:57:55 2012 +0100

    xf86/xv: remove scrnIndexfrom xf86FindXvOptions.

    Move this interface to taking an ScrnInfoPtr.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit f80c2374f40ea7b2ee0556e2e76cc07406f3d843
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:53:59 2012 +0100

    xf86: make xf86DeleteScreen take a ScrnInfoPtr (v2)

    stop passing indices into this function.

    v2: drop flags argument.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 58824e414f35682435f15bfe6c4b656bd90b9235
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed May 23 14:48:09 2012 +0100

    xf86: fix xf86IsScreenPrimary interface to take a pScrn (API/ABI)

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 6b4fc1f9d391bcdf7ca288766e49bce60f4635cd
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:18:59 2012 +0100

    xserver: convert block/wakeup handlers to passing ScreenPtr (ABI/API) (v2)

    Instead of passing an index, pass the actual ScreenPtr. This allows
    more moving towards not abusing xf86Screens + screenInfo.

    v2: drop the blockData/wakeupData args as per ajax's suggestion.,
    fix docs.

    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 790d003de20fb47674420a24dadd92412d78620d
Author: Dave Airlie <airlied@gmail.com>
Date:   Wed Apr 11 09:53:14 2012 +0100

    xf86/common: remove some more pScrn->pScreen uses

    remove some more conversions that appeared after api cleanups.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit aac85e18d1dd093f2cad6bd29375e40bd7af0b8f
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:34:53 2012 +0100

    ddc: change API to take ScrnInfoPtr (v2)

    This removes all xf86Screens usage from ddc code,
    it modifies the API for some functions to avoid taking indices.

    v2: address Alan's comments about dropping DDC2Init parameter.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit fe3f57b6eaf6860a33876a54f9439f69578f03a5
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:31:26 2012 +0100

    vbe: don't use index for VBEInterpretPanelID (API)

    Remove use of xf86screens from vbe module.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit abf1965f4ed91529036d3fdb470d6a3ce6f29675
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 16:25:11 2012 +0100

    int10/vbe: don't use xf86Screens. (ABI) (v3)

    Pass the ScrnInfoPtr instead of the index in the int10 struct.

    This saves us using it to dereference xf86Screens.

    v2: address Alan's comment to fix struct alignment.

    v3: squash in all the int10 fixes, test the vm86 code builds,
    after comments by Keith.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 23cca612b4fb5efc33683c7624b803b457387e3d
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:30:18 2012 +0100

    xserver: drop index argument to ScreenInit (ABI/API) (v2)

    This drops the index argument, its the same as pScreen->myNum,
    and its the last major index abuse I can find.

    v2: address Alan's review - update docs, fix xwin/xnest/darwin

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 40d360e2d7e832407f3ed64e3a02c27ecc89a960
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:23:01 2012 +0100

    xf86: migrate PointerMoved from index to ScrnInfoPtr (ABI/API)

    This migrates PointerMoved from an index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit aa60a2f38679d0eeb979a9c2648c9bc771409bf9
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:20:46 2012 +0100

    xf86: migrate PMEvent to a ScrnInfoPtr (ABI/API)

    This migrates the PMEvent from index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit d3f28ef44371ed4a039ffc5dd7eb6408d1269ba2
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:18:30 2012 +0100

    xf86: migrate SetDGAMode from index to ScrnInfoPtr (ABI/API)

    This migrates the SetDGAMode callback from an index to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit baf5e4818a74f2b68c3dfdcc56f54322351039a0
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:14:11 2012 +0100

    xf86: migrate ChangeGamma from index to ScrnInfoPtr (ABI/API) (v2)

    This migrates the ChangeGamma interface to avoid passing a index.

    v2: fix xf86RandR12.c + xf86cmap.c call

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 51e5f90ada929d6b23176090badbb42fdb3fa550
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:11:09 2012 +0100

    xf86/exa: migrate index to screen types for EnableDisableFBAccess (ABI/API)

    The EXA interface migrates to ScreenPtr,
    and the xf86 interface migrated to ScrnInfoPtr.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 94f1f21d17e86f96d4a54292a399160950087675
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 15:02:11 2012 +0100

    xf86: migrate ValidMode callback to ScrnInfoPtr (ABI/API)

    This migrates the ValidMode to passing a ScrnInfoPtr instead
    of an index.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 3f8f18198fed4f39ec805b508a3482e91eea26b2
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:59:46 2012 +0100

    xf86: migrate SwitchMode to taking ScrnInfoPtr (ABI/API) (v2)

    This migrate the SwitchMode interface to take a ScrnInfoPtr
    instead of an index.

    v2: drop flags.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit d06a038a5c49328ab3a8d969d24f9fcd22c63202
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:50:37 2012 +0100

    xf86: move AdjustFrame to passing ScrnInfoPtr (ABI/API) (v2)

    This converts AdjustFrame code paths to passing a ScrnInfoPtr
    instead of an integer index.

    v2: drop flags args.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 53d2f8608ffd4090d08e7d5cf2e92fb954959b90
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:41:27 2012 +0100

    xf86: modify FreeScreen callback to take pScrn instead of index. (ABI/API) (v2)

    Another index->pScrn conversion.

    v2: drop flags arg.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 60db37c0b247052e0f5c54b1921fe58a3609c2e3
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:35:41 2012 +0100

    xf86: change EnterVT/LeaveVT to take a ScrnInfoPtr (ABI/API break) (v2)

    This modifies the EnterVT/LeaveVT interfaces to take a ScrnInfoPtr
    instead of an index into xf86Screens. This allows dropping more
    public dereferences of the xf86Screens and screenInfo.

    v2: drop flags args as suggested by Keith, fix docs.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>

commit 06729dbbc804a20242e6499f446acb5d94023c3c
Author: Dave Airlie <airlied@gmail.com>
Date:   Tue Apr 10 14:04:59 2012 +0100

    xserver: remove index from CloseScreen (API/ABI breakage)

    This drops the index from the CloseScreen callback,
    its always been useless really, since the pScreen contains it.

    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Acked-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-06-05 13:22:18 +01:00
Michal Suchanek
5595e7ce07 randr: Remove redundant declaration.
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-14 13:16:54 +01:00
Keith Packard
9838b7032e Introduce a consistent coding style
This is strictly the application of the script 'x-indent-all.sh'
from util/modular. Compared to the patch that Daniel posted in
January, I've added a few indent flags:

	-bap
	-psl
	-T PrivatePtr
	-T pmWait
	-T _XFUNCPROTOBEGIN
	-T _XFUNCPROTOEND
	-T _X_EXPORT

The typedefs were needed to make the output of sdksyms.sh match the
previous output, otherwise, the code is formatted badly enough that
sdksyms.sh generates incorrect output.

The generated code was compared with the previous version and found to
be essentially identical -- "assert" line numbers and BUILD_TIME were
the only differences found.

The comparison was done with this script:

dir1=$1
dir2=$2

for dir in $dir1 $dir2; do
	(cd $dir && find . -name '*.o' | while read file; do
		dir=`dirname $file`
		base=`basename $file .o`
		dump=$dir/$base.dump
		objdump -d $file > $dump
	done)
done

find $dir1 -name '*.dump' | while read dump; do
	otherdump=`echo $dump | sed "s;$dir1;$dir2;"`
	diff -u $dump $otherdump
done

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
Acked-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2012-03-21 13:54:42 -07:00
Alan Coopersmith
0bc41d5f8d Remove redundant redeclarations of functions in the same header file
Exposed by recent addition of -Wredundant-decls to default CWARNFLAGS

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:07 -08:00
Alan Coopersmith
05d8a7f7a7 Convert a bunch of sprintf to snprintf calls
This batch is the straightforward set - others are more complex and
need more analysis to determine right size to pass.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:06 -08:00
Rui Matos
9cc44b955b randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition
The constraining logic in RRConstrainCursorHarder allows the cursor to reach
crtc positions of x = width and y = height while the constraining code in
miPointerSetPosition only allows it to reach x = width - 1 and y = height - 1
for the analogous screen case.

This patch makes the former's logic equivalent to the latter's which allows
applications to benefit from Fitts's law. E.g. a maximized application
adjacent to a crtc border wouldn't get pointer events if the user moved the
pointer all the way until it's contained.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-03 14:12:21 -07:00
Luc Verhaegen
9b26e6bc8d randr: stop clients from deleting immutable output properties
Immutable in randr means that clients are not able to alter the
property itself, they are only allowed to alter the property value.
This logically means that the property then should not be deleted
by the client either.

Signed-off-by: Luc Verhaegen <libv@skynet.be>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
2011-10-18 12:04:47 -07:00
Matt Turner
9edcae78c4 Use correct swap{l,s} (or none at all for CARD8)
Swapping the wrong size was never caught because swap{l,s} are macros.

It's clear in the case of Xext/xres.c, that the author believed
client_major/minor to be CARD16 from looking at the code in the first
hunk.

v2: dmx.c fixes from Keith.

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:14:16 -04:00
Matt Turner
2c7c520cfe Use internal temp variable for swap macros
Also, fix whitespace, mainly around
	swaps(&rep.sequenceNumber)

Reviewed-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
2011-09-21 17:12:04 -04:00
Aaron Plattner
08dfff92e8 randr: Compare all the bytes in RRPostPendingProperties
RRPostPendingProperties tries to compare the pending and current
property values to decide whether they're actually changing.  However,
it does this using a memcmp that passes in pending_value->size as the
number of bytes.  This is actually the number of elements, where each
element is (pending_value->format / 8) bytes long.  This causes the
pending value to not be propagated if the first pending_value->size
bytes are the same and only the end of it is changing.

Fix this by computing the total number of bytes to compare in the
memcmp.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-07-29 16:41:53 -07:00
Nicolas Kaiser
21eec367d0 randr: void function cannot return value
Providing an argument to return in a function with void return type
is not allowed by the C standard, and makes the Sun compilers unhappy.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-06-06 08:47:56 -07:00
Aaron Plattner
b6c7b9b2f3 randr: check rotated virtual size limits correctly
Commit d1107918d4 introduced checks to
the RandR path that cause RRSetScreenConfig requests to fail if the
size is too large.  Unfortunately, when RandR 1.1 rotation is enabled
it compares the rotated screen dimensions to the unrotated limits,
which causes 90- and 270-degree rotation to fail unless your screen
happens to be square:

  X Error of failed request:  BadValue (integer parameter out of range for operation)
    Major opcode of failed request:  153 (RANDR)
    Minor opcode of failed request:  2 (RRSetScreenConfig)
    Value in failed request:  0x780
    Serial number of failed request:  14
    Current serial number in output stream:  14

Fix this by moving the check above the code that swaps the dimensions
based on the rotation.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Robert Hooker <robert.hooker@canonical.com>
Tested-by: Kent Baxley <kent.baxley@canonical.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-05-25 09:44:52 -06:00
Peter Hutterer
ffd4874798 include: add version_compare helper function
Compare two version numbers in the major.minor form.
Switch the few users of manual version switching over to the new function.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2011-05-13 09:41:50 +10:00
Jeremy Huddleston
b2997431fd Send events that were missing from RRSelectInput
The RANDR spec (randrproto.txt) specifies that RRSelectInput will send out
events corresponding to the event mask, if there have been changes to
CRTCs or outputs.  Only screen events were being generated, however.

Fixes http://bugs.freedesktop.org/21760

Signed-off-by: Federico Mena Quintero <federico@novell.com>
Reviewd-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-04-13 19:04:32 -07:00
Adam Jackson
56c90e29f0 randr: Add RRConstrainCursorHarder
Confine cursor motion to within the bounds of a single CRTC, iff all the
CRTCs within a ScreenRec are reachable from each other.  If not you get
the same "cursor floats within the bounding rect" behaviour you get now.

v3:
- Incorporate review feedback from Christopher James Halse Rogers
v4:
- Add mode field.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-03-14 13:35:51 -04:00
Keith Packard
a91d33917b Revert "randr: Add sprite position transforms"
This reverts commit 66294afcab.
2011-02-23 11:18:12 -08:00
Keith Packard
3d4ee25a1e Revert "randr: Implement RRSetCrtcConfigs"
This reverts commit d94a035ea9.
2011-02-23 11:18:08 -08:00
Keith Packard
9e8c20b0d4 Revert "randr: Add per-crtc pixmaps"
This reverts commit 82612045e1.
2011-02-23 11:17:42 -08:00
Keith Packard
9f47780ecd Revert "randr: Hook up the new RandR 1.4 functionality"
This reverts commit afb6ebf1d5.
2011-02-23 11:17:36 -08:00
Keith Packard
7b7cd3f121 Revert "Set sprite transforms from RRSetCrtcConfigs"
This reverts commit a88d70fb20.
2011-02-23 11:17:29 -08:00
Keith Packard
fd9331f6eb Revert "Separate out screen size and screen pixmap sizes in RRScreenSizeSet"
This reverts commit 752c368421.
2011-02-23 11:17:24 -08:00
Keith Packard
4d91e7a631 Revert "ProcRRSetCrtcConfigs uses 'configs' without being initialized"
This reverts commit b0f4bd61f0.
2011-02-23 11:17:20 -08:00
Keith Packard
00d0b235cf Revert "randr: handle RRSetCrtcConfigs request with zero configs"
This reverts commit 0d01b66df9.
2011-02-23 11:16:48 -08:00
Ander Conselvan de Oliveira
87fbef9157 ProcRRCreateMode: fix use of uninitialised bytes valgrind error.
==543== Syscall param writev(vector[...]) points to uninitialised byte(s)
==543==    at 0x4AB7154: writev (writev.c:51)
==543==    by 0x8935B: _XSERVTransWritev (Xtrans.c:912)
==543==    by 0x6C55F: FlushClient (io.c:924)
==543==    by 0x6D013: FlushAllOutput (io.c:668)
==543==    by 0x27A83: Dispatch (dispatch.c:453)
==543==    by 0x205B7: main (main.c:291)
==543==  Address 0x556dc8c is 12 bytes inside a block of size 4,096 alloc'd
==543==    at 0x48334A4: calloc (vg_replace_malloc.c:467)
==543==    by 0x6CE37: WriteToClient (io.c:1065)
==543==    by 0x223A7: ProcEstablishConnection (dispatch.c:3685)
==543==    by 0x27B7B: Dispatch (dispatch.c:432)
==543==    by 0x205B7: main (main.c:291)
==543==  Uninitialised value was created by a stack allocation
==543==    at 0xA3350: ProcRRCreateMode (rrmode.c:289)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
2011-02-14 09:12:59 +10:00
Ander Conselvan de Oliveira
0ef5973860 ProcRRQueryVersion: fix use of uninitialised bytes valgrind error.
==9999== Syscall param writev(vector[...]) points to uninitialised byte(s)
==9999==    at 0x4AB5154: writev (writev.c:51)
==9999==    by 0x7C7C3: _XSERVTransWritev (Xtrans.c:912)
==9999==    by 0x61C8B: FlushClient (io.c:924)
==9999==    by 0x62743: FlushAllOutput (io.c:668)
==9999==    by 0x4AA5B: Dispatch (dispatch.c:453)
==9999==    by 0x205BF: main (main.c:291)
==9999==  Address 0x55711b9 is 1 bytes inside a block of size 4,096 alloc'd
==9999==    at 0x48334A4: calloc (vg_replace_malloc.c:467)
==9999==    by 0x62567: WriteToClient (io.c:1065)
==9999==    by 0x452EB: ProcEstablishConnection (dispatch.c:3685)
==9999==    by 0x4AB53: Dispatch (dispatch.c:432)
==9999==    by 0x205BF: main (main.c:291)
==9999==  Uninitialised value was created by a stack allocation
==9999==    at 0x160E78: ProcRRQueryVersion (rrdispatch.c:37)

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Oliver McFadden <oliver.mcfadden@nokia.com>
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan-de-oliveira@nokia.com>
2011-02-14 09:12:59 +10:00
Tiago Vignatti
d1107918d4 randr: check for virtual size limits before set crtc
Return a error if the screen is configured to an invalid size.

Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-12-20 00:46:32 -08:00
Keith Packard
0d01b66df9 randr: handle RRSetCrtcConfigs request with zero configs
Need to actually return a reply in this case.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:11 -08:00
Keith Packard
b0f4bd61f0 ProcRRSetCrtcConfigs uses 'configs' without being initialized
If the client sends invalid data for this request, the server
will jump to 'sendReply' and call RRFreeCrtcConfigs, passing it the
uninitialized 'configs' and 'num_configs' values.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:08 -08:00
Keith Packard
752c368421 Separate out screen size and screen pixmap sizes in RRScreenSizeSet
This provides for separate sizes for the screen scanout and rendering
buffer and the application-visible screen size.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:09:04 -08:00
Keith Packard
a88d70fb20 Set sprite transforms from RRSetCrtcConfigs
These were getting ignored.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:58 -08:00
Keith Packard
afb6ebf1d5 randr: Hook up the new RandR 1.4 functionality
This bumps the supported RandR protocol version and adds the dispatch
hooks needed to call the new functions

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:52 -08:00
Keith Packard
82612045e1 randr: Add per-crtc pixmaps
This adds new driver hooks to allocate scanout pixmaps and
changes the mode setting APIs to pass the new scanout pixmaps
along from DIX. DIX is responsible for reference counting the pixmaps
by tracking them through RRCrtcNotify.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:48 -08:00
Keith Packard
d94a035ea9 randr: Implement RRSetCrtcConfigs
This provides a driver-independent implementation of the
RRSetCrtcConfigs API by simply using the existing interfaces.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:43 -08:00
Keith Packard
66294afcab randr: Add sprite position transforms
This implements sprite position transformations. Sprite image
transforms are passed all the way to the DDX layer, but the images are
not yet manipulated before being passed to the drivers.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:40 -08:00
Adam Jackson
5b98c6267f randr: Remove mirandr
This isn't used anywhere, not least because it's completely
nonfunctional.

Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-10-18 17:38:23 -04:00
Tobias Droste
c7e4222c9a randr: set error numbers of resource types in RRExtenstionInit() (V2)
Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367

Currently the ddx calls xf86RandR12Init()
  (-> RRScreenInit()
     -> RRInit()
       -> RRModeInit()
       -> RRCrtcInit()
       -> RROutputInit())
before RRExtensionInit() is called. This causes RRErrorBase
being 0 while setting resource type error values (resource types:
RROutput, RRMode and RRCrtc). The fix moves the setting of error
values to own functions which are called in RRExtensionInit()
to get the right RRErrorBase.

V2: With header file

Signed-off-by: Tobias Droste <tdroste@gmx.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-09-29 14:41:53 -07:00
Dave Airlie
80d1a548d6 rotation: fix cursor and overlap of one pixel.
Commit 77c7a64e88 was introduced to fix
a cursor off by one on Intel hw, however it also move the whole crtc
into an off by one position and you could see gnom-eshell overlapping.

This commit reverts that and instead fixes the cursor hotspot
translation to work like pixman does. We add 0.5 to the cursor vector
before translating, and floor the value afterwards.

Thanks to Soeren (ssp) for pointing out where the real problem was
after explaning how pixman translates points.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-22 11:38:30 -07:00
Keith Packard
fd69234db0 Ignore RandR timestamps harder
Checking timestamps in post 1.1 randr requests was never a good idea,
let's ignore them and just make the configuration changes.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Chase Douglas <chase.douglas@canonical.com>
2010-06-10 19:16:20 -07:00
Mikhail Gusarov
7287ef9e6c Remove unnecessary parentheses around return values in functions
This patch was generated by the following Perl code:

perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;'

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-10 06:42:42 -07:00
Mikhail Gusarov
67b824a81b randr: Make deletion of output properties more robust
Previously there was two branches of code with small discrepancies between them
(especially prop->valid_values field was not free(3)ed). Extract the common
routine and fix double-free prop->valid_values in RRDestroyOutputProperty by
the way.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
2010-06-06 21:53:28 +07:00
Mikhail Gusarov
0a4d8cbdcd Remove more superfluous if(p) checks around free(p)
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@

-if(E) { free(E); }
+free(E);

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-06-06 20:27:18 +07:00
Keith Packard
faeebead7b Change the devPrivates API to require dixRegisterPrivateKey
This patch only changes the API, not the implementation of the
devPrivates infrastructure. This will permit a new devPrivates
implementation to be layed into the server without requiring
simultaneous changes in every devPrivates user.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com>
2010-06-05 19:23:03 -07:00
Jamey Sharp
e7fae9ecc4 Move each screen's root-window pointer into ScreenRec.
Many references to the WindowTable array already had the corresponding
screen pointer handy, which meant they usually looked like
"WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of
keeping this information in a parallel array simplifies those
expressions, and eliminates a MAXSCREENS-sized array.

Since dix uses this data, a screen private entry isn't appropriate.

xf86-video-dummy currently uses WindowTable, so it needs to be updated
to reflect this change.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
2010-06-03 14:03:23 -07:00
Jamey Sharp
c38552d115 Add typed resource-lookup errors for non-core resource types.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:48 -07:00
Jamey Sharp
8033fb6c97 Set event sequence number in WriteEventsToClient instead of at callers.
TryClientEvents already did this; this commit just moves the assignment
one level down so that no event source has to worry about sequence
numbers.

...No event source, that is, except XKB, which inexplicably calls
WriteToClient directly for several events.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:34 -07:00
Jamey Sharp
4b9600a416 Make WriteEventsToClient/WriteToClient no-op on fake or dead clients.
This matches the test in TryClientEvents, and is a superset of tests
done by the callers of these functions. The consequence of forgetting
these tests is a server crash, so they're always desirable. In my
opinion, it's better to not require the callers to remember to do these
checks.

For callers that don't do very much work before calling WriteToClient or
WriteEventsToClient, I've removed the redundant checks.

hw/xquartz/xpr/appledri.c has an interesting case: While its check for
"client == NULL" appears redundant with the test in WriteEventsToClient,
it dereferences client to get the sequence number.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2010-05-19 12:32:34 -07:00
Jamey Sharp
92ed75ac59 Eliminate boilerplate around client->noClientException.
Just let Dispatch() check for a noClientException, rather than making
every single dispatch procedure take care of it.

Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
2010-05-13 17:14:07 -07:00
Mikhail Gusarov
3f3ff971ec Replace X-allocation functions with their C89 counterparts
The only remaining X-functions used in server are XNF*, the rest is converted to
plain alloc/calloc/realloc/free/strdup.

X* functions are still exported from server and x* macros are still defined in
header file, so both ABI and API are not affected by this change.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-05-13 00:22:37 +07:00
Keith Packard
28b7b2b8d0 unifdef -B -DRENDER to always include RENDER code
This patch was created with:

git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done

Signed-off-by: Keith Packard <keithp@keithp.com>
2010-04-19 09:26:10 -07:00
Peter Harris
97b03037f4 Don't double-swap the RandR PropertyNotify event
The event is already swapped in randr.c/SRROutputPropertyNotifyEvent, so
it should not be swapped here.

X.Org Bugzilla #26511: http://bugs.freedesktop.org/show_bug.cgi?id=26511

Tested-by: Leonardo Chiquitto <leonardo@ngdn.org>
Acked-by: Adam Jackson <ajax at redhat.com>
Reviewed-by: Julien Cristau <jcristau at debian.org>
Signed-off-by: Peter Harris <pharris@opentext.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-12 14:55:19 -08:00
Alan Coopersmith
895f40792a Add type name argument to CreateNewResourceType
Convert all calls of CreateNewResourceType to pass name argument

Breaks DIX ABI.

ABI versions bumped:

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-12-18 17:44:12 -08:00
Alan Coopersmith
a11c58fa0c Ensure all resource types created have names registered
Calls RegisterResourceName to record the type name for
use by X-Resource, XACE/SELinux/XTsol, and DTrace.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2009-12-18 16:51:45 -08:00
Adam Jackson
c7d1319872 randr: Fill in errorValue when verifying outputs/crtcs/modes
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-09 08:35:05 -08:00
Peter Hutterer
55747d256d input: define server-supported protocol versions in one single file.
include/protocol-versions.h specifies each extension version as supported by
the server and sent back on the wire to the client.

This fixes up several issues with the server potentially reporting a higher
version of the protocol if recompiled against a newer version of the
protocol.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Acked-by: Rémi Cardona <remi@gentoo.org>
Acked-by: Julien Cristau <jcristau@debian.org>
2009-09-21 21:47:35 +10:00
Peter Hutterer
00dfe69aab randr: reply with the server or client version, whichever is lower.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-21 08:12:02 +10:00
Keith Packard
2df10a4986 RRDestroyOutputProperty: Free randr property valid values
These were leaked when the property was destroyed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20 20:45:25 +10:00
Keith Packard
d3a84906c0 Free randr crtc and output pointer arrays
All of the crts and outputs were freed, but not the arrays full of
pointers to them.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-20 20:45:25 +10:00
Eamon Walsh
4098ad72d0 xace: fix access mode in dixLookupWindow within several RandR calls.
Referencing a screen using a window only requires GetAttr access.

Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
2009-08-17 14:51:11 -04:00
Peter Hutterer
86b239ff9c randr: switch to byte counting functions
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-07-14 10:14:01 +10:00
Adam Jackson
b2d2af76b4 randr: fix typo in swapped dispatch 2009-06-15 10:10:26 -04:00
Benjamin Defnet
b2bf67b61c randr: fix operation order so that rotation+transform works
The matrix multiply to combine rotation and projective transforms was being
done in the wrong order.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-11 23:27:36 -07:00
Federico Mena Quintero
e244a5991e dix/randr: Add missing fields to SRR*NotifyEvent()
Also, remove redundant field swaps and make others match the order in which
they are declared in the xRR*NotifyEvent structs.

Signed-off-by: Federico Mena Quintero <federico@novell.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-09 13:30:45 -07:00
Keith Packard
69a9545d1f Make RANDR 'set' timestamps follow client specified time. Bug 21987.
The lastSetTime value which indicates when the configuration within the
server was last changed was not getting set in the appropriate RandR
requests.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-06-08 16:54:28 -07:00
Julien Cristau
12e725d08b randr: fix server crash in RRGetScreenInfo
We don't return rates to randr < 1.1 clients, so don't allocate space
for them.  This fixes a FatalError due to not all allocated space being
used.

X.Org bug#21861 <http://bugs.freedesktop.org/show_bug.cgi?id=21861>

Reported-by: Guillaume Quintin <coincoin169g@gmail.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-05-24 11:13:47 +02:00
Eamon Walsh
57aff88c7d Fix most remaining deprecated resource lookups.
Callsites updated to use dixLookupResourceBy{Type,Class}.
TODO: Audit access modes to make sure they reflect the usage.
2009-04-29 01:04:37 -04:00
Eamon Walsh
6544490700 Correct access mode in call to dixLookupWindow() within RRSelectInput.
Reported by Alan Coopersmith.
2009-03-09 17:29:24 -04:00
Keith Packard
812e8d681a Oops. 62fc98c had crtc offsets applied backwards (fix from server-1.6-branch)
Crtc offsets are in screen space, not crtc space, and hence should be
applied relative to the screen->crtc transform, not the crtc->transform.

This fix was found in the 'cherry pick' of 62fc98c on server-1.6-branch,
clearly some new definition of 'cherry pick' that I am unaware of.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-25 11:08:01 -08:00
Keith Packard
77c7a64e88 RandR rotations and reflections offset by one pixel
The matrix computation for rotation and reflection resulted in dropping a
row or column of pixels as the offsets used in the matrix computations used
width and height rather than width-1 and height-1.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-25 10:12:23 -08:00
Adam Jackson
1230939965 RANDR: Fail softly on GetPanning if the screen can't do it.
Just return a zeroed-out reply in that case.  This is unambiguous, and
distinguishes "you didn't name a CRTC" from "you named a CRTC that can't
do panning".
2009-02-17 13:57:02 -05:00
Peter Åstrand
ddb8d8945d xserver: Avoid sending uninitialized padding data over the network
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-02-16 13:28:38 +10:00
Aaron Plattner
c18f454e4a Query the DDX in ProcRRGetScreenInfo.
This is the RandR 1.1 version of GetScreenResources and needs to re-query the
DDX to see if the mode pool changed.

Fixes Launchpad bug #325115.
Signed-off-by: Adam Jackson <ajax@redhat.com>
(cherry picked from commit 660c2a7d4c)
2009-02-13 12:41:14 -08:00
Keith Packard
62fc98cb88 Handle matrix computation overflow in RRTransformCompute
If the computation of the composite fixed-point transform for RandR
overflows at any point, take the resulting floating point transform and
scale that back to fit in a fixed point matrix. This ensures that a matrix
will always be available, although perhaps at reduced precision. Someday we
should add floating point matrices to Render.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-03 20:20:57 -08:00
Keith Packard
4de5705545 RandR crtcs not fetched correctly when primary output is set.
Primary outputs may not have a CRTC.
Loops fetching CRTCs respecting primary output were broken.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30 20:21:28 -08:00
Eric Anholt
317f2b4a9f randr: Avoid re-querying the configuration on everything but GetScreenResources.
The new path should only re-query on the other requests when we haven't
gathered the information from the DDX yet (such as with a non-RandR 1.2 DDX).

Bug #19037.
2009-01-30 19:35:55 -08:00
Keith Packard
c1f2be1f3f RandR SetOutputPrimary should work with or without a crtc connected
The test was inverted from the protocol spec, and besides, the test is bogus
anyways.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30 19:15:53 -08:00
Keith Packard
6e49fdd2c8 Make RandR CRTC info report panning area instead of just crtc area
This makes the RandR info consistent with the Xinerama info.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30 15:43:04 -08:00
Julien Cristau
47438a2161 randr: RRSetPrimaryOutput can be static 2009-01-11 08:54:12 +01:00
Paulo Cesar Pereira de Andrade
200230535f Update sdk headers to export new symbols.
All symbols in installed sdk headers should be explicitly tagged
as exported symbols. Otherwise, to ensure it is not a mistake, one
could write it as something like:
extern /* NOEXPORT */ type name ...;
but the proper procedure really should be to use a non sdk header
(or a "noinst_" one).
  This patch also removes prototypes to some functions that existed
only temporarily.
2009-01-05 16:49:57 -02:00
Daniel Stone
e351d10773 RandR: Only export Xinerama symbols when building Xinerama support
Otherwise compilation fails due to sdksyms.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
2009-01-05 17:41:38 +02:00
Maarten Maathuis
332d65ec7a randr: Consider panned crtc's when calculating xinerama screen sizes.
- This will allow window managers and applications to actually use the panned area.
2008-12-19 18:59:27 +01:00
Maarten Maathuis
91f73b79b7 randr: Improve per-crtc gamma support.
- The Gamma values from the monitor section are now used during initial config.
- The old colormap system is disabled when gamma set hook is available.
- Gamma values are now persistent for the lifetime of the xserver.
- This requires no driver changes and should be driver ABI compatible.
2008-12-17 17:03:12 +01:00
Peter Hutterer
cb95642dc8 Remove #define NEED_EVENTS and NEED_REPLIES
A grep on xorg/* revealed there's no consumer of this define.

Quote Alan Coopersmith:
"The consumer was in past versions of the headers now located
in proto/x11proto - for instance, in X11R6.0's xc/include/Xproto.h,
all the event definitions were only available if NEED_EVENTS were
defined, and all the reply definitions required NEED_REPLIES.

Looks like Xproto.h dropped them by X11R6.3, which didn't have
the #ifdef's anymore, so these are truly ancient now."

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2008-12-12 11:43:32 +10:00
Matthias Hopf
fd77ce9f88 randr: Oops, miscalculated panning rectangle's coordinates 2008-12-11 18:30:25 +01:00
Adam Jackson
86c64ddf21 randr: clear primaryOutput when the output is deleted 2008-12-10 11:31:28 -05:00
Adam Jackson
fe65f400ed randr: use primary output for RRFirstOutput() 2008-12-10 11:31:28 -05:00
Adam Jackson
cdcb516e56 randr: Mangle GetScreenResources sort order based on primary output 2008-12-10 11:31:28 -05:00
Adam Jackson
d7b316e82b randr: Mangle compat Xinerama reply based on primary output 2008-12-10 11:31:27 -05:00
Adam Jackson
9d58d2a319 randr: Add [GS]etOutputPrimary 2008-12-10 11:31:21 -05:00
Matthias Hopf
44bef8b850 randr: Update SProcRandrVector for panning 2008-12-05 15:37:15 +01:00
Matthias Hopf
825b2c2f4a randr: Nuke config-timestamp for panning 2008-12-04 18:16:43 +01:00
Matthias Hopf
eeeb98d1df randr: Protocol bits for panning support 2008-12-04 18:16:43 +01:00
Julien Cristau
0b5ecabfb8 randr: add swapped dispatch for RR[GS]etCrtcTransform
Fix a memory leak in ProcRRGetCrtcTransform() while I'm at it.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Cc: Keith Packard <keithp@keithp.com>
2008-12-03 17:33:47 +01:00
Paulo Cesar Pereira de Andrade
49f77fff14 Rework symbol visibility for easier maintenance
Save in a few special cases, _X_EXPORT should not be used in C source
files. Instead, it should be used in headers, and the proper C source
include that header. Some special cases are symbols that need to be
shared between modules, but not expected to be used by external drivers,
and symbols that are accessible via LoaderSymbol/dlopen.

  This patch also adds conditionally some new sdk header files, depending
on extensions enabled. These files were added to match pattern for
other extensions/modules, that is, have the headers "deciding" symbol
visibility in the sdk. These headers are:
o Xext/panoramiXsrv.h, Xext/panoramiX.h
o fbpict.h (unconditionally)
o vidmodeproc.h
o mioverlay.h (unconditionally, used only by xaa)
o xfixes.h (unconditionally, symbols required by dri2)

  LoaderSymbol and similar functions now don't have different prototypes,
in loaderProcs.h and xf86Module.h, so that both headers can be included,
without the need of defining IN_LOADER.

  xf86NewInputDevice() device prototype readded to xf86Xinput.h, but
not exported (and with a comment about it).
2008-12-03 05:43:34 -02:00
Adam Jackson
b0d371ab0a randr: Don't send output property events on server exit
If the Window resource type is already gone, there's no point in trying
to send events, all it can do is access already-freed memory.

Relevant thread:

http://lists.freedesktop.org/archives/xorg/2008-November/040443.html
2008-12-01 11:36:06 -05:00
Paulo Cesar Pereira de Andrade
fb22d4d928 Remove declarations of symbols that are never defined.
These symbols were removed from the X Server, or never declared.
  One symbol that may need special attention is XkbBuildCoreState(),
that doesn't have a prototype anywhere, but is called from
xkb/xkbEvents.c:XkbFilterEvents(), and also used by the macros
XkbStateFieldFromRec() and XkbGrabStateFromRec() defined in
include/xkbstr.h.
  fb/wfbrename.h also may need some cleanup, as it makes several
"renames" of non existing symbols.
2008-11-30 01:33:20 -02:00
Paulo Cesar Pereira de Andrade
d6cbd4511e Export symbols defined in the sdk.
This is the biggest "visibility" patch. Instead of doing a "export"
symbol on demand, export everything in the sdk, so that if some module
fails due to an unresolved symbol, it is because it is using a symbol
not in the sdk.

  Most exported symbols shouldn't really be made visible, neither
advertised in the sdk, as they are only used by a single shared object.

  Symbols in the sdk (or referenced in sdk macros), but not defined
anywhere include:
XkbBuildCoreState()
XkbInitialMap
XkbXIUnsupported
XkbCheckActionVMods()
XkbSendCompatNotify()
XkbDDXFakePointerButton()
XkbDDXApplyConfig()
_XkbStrCaseCmp()
_XkbErrMessages[]
_XkbErrCode
_XkbErrLocation
_XkbErrData
XkbAccessXDetailText()
XkbNKNDetailMaskText()
XkbLookupGroupAndLevel()
XkbInitAtoms()
XkbGetOrderedDrawables()
XkbFreeOrderedDrawables()
XkbConvertXkbComponents()
XkbWriteXKBSemantics()
XkbWriteXKBLayout()
XkbWriteXKBKeymap()
XkbWriteXKBFile()
XkbWriteCFile()
XkbWriteXKMFile()
XkbWriteToServer()
XkbMergeFile()
XkmFindTOCEntry()
XkmReadFileSection()
XkmReadFileSectionName()
InitExtInput()
xf86CheckButton()
xf86SwitchCoreDevice()
RamDacSetGamma()
RamDacRestoreDACValues()
xf86Bpp
xf86ConfigPix24
xf86MouseCflags[]
xf86SupportedMouseTypes[]
xf86NumMouseTypes
xf86ChangeBusIndex()
xf86EntityEnter()
xf86EntityLeave()
xf86WrapperInit()
xf86RingBell()
xf86findOptionBoolean()
xf86debugListOptions()
LoadSubModuleLocal()
LoaderSymbolLocal()
getInt10Rec()
xf86CurrentScreen
xf86ReallocatePciResources()
xf86NewSerialNumber()
xf86RandRSetInitialMode()
fbCompositeSolidMask_nx1xn
fbCompositeSolidMask_nx8888x0565C
fbCompositeSolidMask_nx8888x8888C
fbCompositeSolidMask_nx8x0565
fbCompositeSolidMask_nx8x0888
fbCompositeSolidMask_nx8x8888
fbCompositeSrc_0565x0565
fbCompositeSrc_8888x0565
fbCompositeSrc_8888x0888
fbCompositeSrc_8888x8888
fbCompositeSrcAdd_1000x1000
fbCompositeSrcAdd_8000x8000
fbCompositeSrcAdd_8888x8888
fbGeneration
fbIn
fbOver
fbOver24
fbOverlayGeneration
fbRasterizeEdges
fbRestoreAreas
fbSaveAreas
composeFunctions
VBEBuildVbeModeList()
VBECalcVbeModeIndex()
TIramdac3030CalculateMNPForClock()
shadowBufPtr
shadowFindBuf()
miRRGetScreenInfo()
RRSetScreenConfig()
RRModePruneUnused()
PixmanImageFromPicture()
extern int miPointerGetMotionEvents()
miClipPicture()
miRasterizeTriangle()
fbPush1toN()
fbInitializeBackingStore()
ddxBeforeReset()
SetupSprite()
InitSprite()
DGADeliverEvent()

  SPECIAL CASES
o defined as _X_INTERNAL
	xf86NewInputDevice()
o defined as static
	fbGCPrivateKey
	fbOverlayScreenPrivateKey
	fbScreenPrivateKey
	fbWinPrivateKey
o defined in libXfont.so, but declared in xorg/dixfont.h
	GetGlyphs()
	QueryGlyphExtents()
	QueryTextExtents()
	ParseGlyphCachingMode()
	InitGlyphCaching()
	SetGlyphCachingMode()
2008-11-29 23:56:06 -02:00
Keith Packard
fc70839431 Add server support for RRGetScreenResourcesCurrent
This depends on randrproto 1.2.99.1

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-26 15:50:54 -08:00
Keith Packard
9ffc671939 Move matrix operations from X server to pixman 0.13.2
pixman 0.13.2 now holds all of the matrix operations. This leaves
the protocol conversion routines and some ABI stubs in place

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-11-25 22:17:58 -08:00
Keith Packard
9c7679240a [randr] don't try to compute crtc transform when no mode is set.
Dereferencing the NULL mode pointer would cause a crash. As these transform
matrices won't be used while the CRTC is disabled, just leave their values
alone.
2008-11-24 13:24:41 -08:00
Keith Packard
315b6d0a42 Update RandR global transform when driver notifies of transform change.
Need to compute and save the global transform when the driver changes it.
2008-11-24 13:24:41 -08:00
Keith Packard
5d9282fde9 Export rrtransform.h as needed by randrstr.h
When the transform management was moved from randrstr.h, the associated
header file became necessary to build drivers. Include it as a part of the
sdk headers.
2008-11-24 13:24:41 -08:00
Keith Packard
93179c214f rrtransform needs randrstr to get RANDR_INTERFACE defines 2008-11-24 13:24:40 -08:00
Keith Packard
7c61db66a4 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-11-24 13:24:40 -08:00
Keith Packard
6fe9c15731 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-11-24 13:24:40 -08:00
Keith Packard
49db14e4ac 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-11-24 13:24:40 -08:00
Keith Packard
6f734aecae 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-11-24 13:24:39 -08:00
Keith Packard
197aa78469 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-11-24 13:24:39 -08:00
Keith Packard
6d3a9e40a4 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-11-24 13:24:38 -08:00
Keith Packard
16c093afd4 Pass filter kernel size through transforms 2008-11-24 13:24:37 -08:00
Keith Packard
40f3dff6b3 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-11-24 13:24:37 -08:00
Keith Packard
f50349e193 [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-11-24 13:24:36 -08:00
Keith Packard
e3d6f279d5 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-11-24 13:24:36 -08:00
Keith Packard
e063162e80 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-11-24 13:24:35 -08:00
James Cloos
b3c7e62664 Remove some null statements.
Remove several doubled statement-terminal semicolons.

Reported by Fernando Carrijo.
2008-11-08 12:21:20 -05:00
Pierre Willenbrock
8de26770a4 RANDR: Fix output property event delivery. 2008-10-16 14:28:14 -04:00
Keith Packard
9187f6ad9e RANDR: Delivery output property events. 2008-10-06 12:22:57 -04:00
Adam Jackson
e6b1c1fada const cleanup 2008-10-03 17:51:19 -04:00
Peter Harris
2b266eda6e Fix panoramiX request and reply swapping
Fix panoramiX request and reply swapping
 Set window and screen values in panoramix replies
 Prevent buffer overrun in ProcPanoramiXGetScreenSize
2008-09-21 19:19:24 +02:00
Keith Packard
31c62495f1 Drop a reference to user mode after create
User mode has no customer when create until assigned
to some output.
2008-09-10 13:11:09 +08:00
Zhenyu Wang
4e004c6828 Revert "randr: fix user mode create initial reference count"
This reverts commit 7c5ca85a9e.
2008-09-08 09:16:59 +08:00
Zhenyu Wang
7c5ca85a9e randr: fix user mode create initial reference count
Don't need extra reference count adding when creating user mode.
This fixes user mode destroy, otherwise we get BadAccess error.
2008-09-03 09:41:00 +08:00
Tomas Carnecky
ebea78cdba Prepare for array-index based devPrivates.
TODO: static indices can be made just an int; some indices
can be combined.
2008-08-28 18:05:40 -04:00
Julien Cristau
01264f1792 Add swapped dispatch for randr 1.2 requests 2008-08-21 09:24:02 +02:00
Adam Jackson
64ef7ed072 Centralize declaration of ConnectionInfo. 2008-08-20 13:14:34 -04:00
Tomas Carnecky
68fd6604a1 OutputPropertyNotifyMask is a valid thing to select for. 2008-07-31 10:03:56 -04:00