Commit Graph

229 Commits

Author SHA1 Message Date
Dave Airlie
2ed3f64d9d xf86: add initial scanout pixmap support (v2)
Add the simple passthrough interface for drivers to use,
so they can set scanout pixmaps.

v2: detach scanout pixmap properly.

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
d0e138c3f3 dix: attach unbound screens to protocol screen 0 (v2)
This is the default attachment, unbound gpu screens get
attached to the 0 protocol screen.

detach on hotunplug.

v2: detach after tearing down crtc/outputs.

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:05 +01:00
Dave Airlie
9b5cf2ed76 xfree86: add framework for provider support in ddx. (v4)
This adds the framework for DDX provider support.

v2: as per keithp's suggestion remove the xf86 provider object
and just store it in the toplevel object.

v3: update for new protocol

v4: drop devPrivate, free name

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:08 +01: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
Dave Airlie
41151f88a6 xf86: migrate to using xf86ScreenToScrn wrapper (v2)
migrate to new helper API.

This just wraps all the obvious uses of xf86Screens[pScreen->myNum],
and should be fairly simple to review.

v2: remove commented out lines.

Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2012-05-21 12:59:08 +01:00
Yaakov Selkowitz
cb5661e86d xf86Crtc: include "xf86xv.h" only if XV
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2012-04-05 21:56:59 -05: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
632d205b30 Fix gcc -Wwrite-strings warnings in xf86Modes code
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-11-23 12:15:07 -08:00
Pierre-Loup A. Griffais
a551f126cc xfree86: Fix RandR rotation across server generations
245cb8e94f fixed xf86RotateDestroy() to actually run its teardown
code, causing the Damage object to properly be re-allocated after a
server regeneration. However the block that does that still thinks the
Rotate layer BlockHandler is wrapped from the last generation, meaning
the shadow pixmap is never re-allocated and the Damage object is never
re-registered, causing a blank screen, and potentially a driver crash
on the next teardown after the server asks it to free a 0x0 Pixmap.

Signed-off-by: Pierre-Loup A. Griffais <pgriffais@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-11-14 09:14:20 -08:00
Dave Airlie
17416e88dc xf86Crtc: handle no outputs with no modes harder.
If you started an X server with no connected outputs, we pick a default
1024x768 mode, however if you then ran an xvidmode using app against that
server it would segfault the server due to not finding any valid modes.

This was due to the no output mode set code, only adding the modes to the
scrn->modes once, when something called randr 1.2 xf86SetScrnInfoModes would
get called and remove all the modes and we'd end up with 0.

This change fixes xf86SetScrnInfoModes to always report a scrn mode of at
least 1024x768, and pushes the initial configuration to just call it instead
of setting up the mode itself.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=746926

I've seen other bugs like this on other distros so it might also actually fix them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-24 18:09:35 -07:00
Jesse Barnes
3e145d3d67 crtc: match full preferred modes if possible when choosing an initial config
It's fairly common to have multiple, identical monitors plugged in.  In
that case, it's preferable to run the monitor's preferred mode on each
output, rather than just matching the width & height and end up with
different timings or refresh rates.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-10-19 17:19:44 -07:00
Julien Cristau
eabd5532fb xfree86: fix build with xv disabled
https://bugs.freedesktop.org/show_bug.cgi?id=29111

Signed-off-by: Julien Cristau <jcristau@debian.org>
Tested-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Cyril Brulebois <kibi@debian.org>
2011-10-09 17:08:34 -07:00
vdb@picaros.org
e4cddf509e Fix a rare memory leak
Signed-off-by: Servaas Vandenberghe <vdb@picaros.org>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2011-10-04 20:18:17 -07:00
Erkki Seppälä
d3adf2d935 xfree86/modes: Fixed memory leak in xf86InitialConfiguration
There were two memory leaks in the function: one was the lack of free
for "enabled", the other was the full lack of releasing anything when
configuration was too small. The first issue was fixed by adding the
missing free, the other was addressed by replacing the duplicate
memory releasing sequences with one that is gotoed into.

Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Rami Ylimäki <rami.ylimaki@vincit.fi>
Signed-off-by: Erkki Seppälä <erkki.seppala@vincit.fi>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-03-14 13:14:04 -07:00
Keith Packard
365ad68fb9 Merge remote branch 'ajax/for-keithp' 2011-02-24 18:49:40 -08:00
Keith Packard
b833f9b924 Revert "Replace huge argument list in xf86CrtcSetModeTransform with struct"
This reverts commit 8b35118c03.
2011-02-23 11:18:35 -08:00
Keith Packard
a91d33917b Revert "randr: Add sprite position transforms"
This reverts commit 66294afcab.
2011-02-23 11:18:12 -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
793a242c89 Revert "DIX is responsible for ref counting scanout pixmaps."
This reverts commit 96b4d4787b.
2011-02-23 11:17:33 -08:00
Adam Jackson
dc498b433f xfree86: If the driver found modes on an output, don't add more
Inferring modes from sync ranges is only valid if the monitor says it's
valid.  If the monitor says it's valid, then we'll have already added
those modes during EDID block parse.  If it doesn't, then we should
believe it.

If there's no EDID for an output, but sync ranges from the config, we'll
still add default modes as normal.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-23 13:39:22 -05:00
Adam Jackson
994b7b3dc9 xfree86: warning fix
Did you know that anonymous enums with function scope will not only
override the enum values from global scope, but will be treated as
entirely different types?  C's type system just rules.

xf86Crtc.c: In function 'handle_detailed_monrec':
xf86Crtc.c:1555:33: warning: comparison between 'enum det_monrec_source' and 'enum <anonymous>'
xf86Crtc.c:1562:33: warning: comparison between 'enum det_monrec_source' and 'enum <anonymous>'

Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2011-02-08 12:41:04 -05:00
Evan Broder
12b0f7df2c xfree86/modes: Be sure to only use new EDID for physical output dimensions
The EDID processing regards physical dimensions of 0mm x 0mm as
invalid. Previously the old values for height and width would be
preserved if none of the physical dimension specifications in the new
EDID were considered valid.

This will come up in particular if first a monitor is connected to an
output, and then a projector is connected. Since projectors generally
report physical dimensions of 0mm x 0mm, this would result in the
projector claiming to have the physical dimensions of the monitor.

Signed-off-by: Evan Broder <ebroder@mokafive.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2011-02-02 14:58:45 -08:00
Alan Coopersmith
d2c42b1027 Replace alloc+strcpy+strcat with asprintf() & XNFasprintf() calls
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
2010-12-07 11:10:35 -08:00
Keith Packard
96b4d4787b DIX is responsible for ref counting scanout pixmaps.
Remove some extra ref counting inside hw/xfree86/modes

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:54 -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
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
Keith Packard
8b35118c03 Replace huge argument list in xf86CrtcSetModeTransform with struct
xf86CrtcSetModeTransform was starting to get ridiculous with 6
arguments, this change has it take a single structure that contains
all of those values along with a set of flags that says which have
changed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
2010-12-06 20:08:18 -08:00
Keith Packard
5de312a60d Merge remote branch 'alanc/master' 2010-12-06 19:22:52 -08:00
Alan Coopersmith
29e467a1f1 xf86OutputRename: Replace another strlen/malloc/strcpy set with strdup
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2010-11-30 16:18:35 -08:00
Ville Syrjälä
640c8716e0 xfree86/modes: Provide a ModeSet hook in ScrnInfo
Add a new hook ModeSet that will be called after display mode is
changed, or after the display has been panned.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
2010-11-26 18:01:06 +02:00
Cyril Brulebois
b142b0d274 Remove more superfluous if(p!=NULL) checks around free(p).
This patch has been generated by the following Coccinelle semantic patch:

@@
expression E;
@@
- if (E != NULL)
-   free(E);
+ free(E);

Signed-off-by: Cyril Brulebois <kibi@debian.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2010-11-11 08:29:54 +10:00
Ville Syrjälä
390a8466dd xfree86/modes: Allow the driver to specify initial rotation
When the "Rotate" option isn't specified allow the driver to specify
the initial rotation mode. This way the driver can choose to retain
the same settings that were used by software that was used prior to
starting X.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-30 08:47:22 -07:00
Keith Packard
68a9ee8370 Clean up RandR12 bits on screen close (bug 27114)
When resetting the server, pScrn->EnterVT must be unwrapped or the
next server generation will end up wrapping the wrapper and causing an
infinite recursion on EnterVT.

Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Michael Stapelberg <michael+freedesktop@stapelberg.de>
2010-06-15 14:39:25 -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
Ben Skeggs
f7af00e9f0 randr: prevent an unnecessary screen resize with multiple displays
crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we
calculate too small an area for the initial framebuffer and force a resize
to happen.

This commit fixes the code to use desired{X,Y} instead, which contains the
initial output positions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-07 19:59:38 -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
2dc138922b Rename region macros to eliminate screen argument
This is a combination of a huge mechanical patch and a few small
fixups required to finish the job. They were reviewed separately, but
because the server does not build without both pieces, I've merged
them together at this time.

The mechanical changes were performed by running the included
'fix-region' script over the whole tree:

$ git ls-files | grep -v '^fix-' | xargs ./fix-region

And then, the white space errors in the resulting patch were fixed
using the provided fix-patch-whitespace script.

$ sh ./fix-patch-whitespace

Thanks to Jamey Sharp for the mighty fine sed-generating sed script.

The hand-done changes involve removing functions from dix/region.c
that duplicate inline functions in include/regionstr.h, along with
their declarations in regionstr.h, mi.h and mispans.h.

Reviewed-by: Jamey Sharp <jamey@minilop.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-06-05 18:59:00 -07:00
Dave Airlie
5939e39a64 xf86: allow for no outputs connected at startup operation.
When nothing is connected at startup and we canGrow, allow the server to start with a 1024x768 framebuffer, and when the drivers send hotplug events this will expand to the correct size dynamically.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-23 17:30:09 -07:00
Simon Farnsworth
cfc6291488 Add configuration option to disable default modes on an output
Setting 'Option "DefaultModes" "No"' in an output will guarantee that
X will omit the default modes, just picking up modes from the
configuration file and modes provided by the output.

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-05-20 09:15:41 -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
Keith Packard
de86a3a344 Allow for missing or disabled compat_output
When the compat output is missing (I don't think this is actually
possible), or is disabled (and hence has no crtc), we would like to
avoid dereferencing NULL pointers. This patch creates inline functions
to extract the current compat output, crtc or associated RandR crtc
structure, carefully checking for NULL pointers everywhere.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25 12:48:27 -08:00
Keith Packard
fbbadca7e8 Share enum definition for det_monrec_parameter sync_source
There were two separate enum definitions, one inside
det_monrec_parameter struct and one for a local variable (which was then
stored inside the struct). Sharing a single definition makes the
code more obviously correct while making the compiler happier.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-25 12:48:06 -08:00
Simon Farnsworth
93ff1bc588 Always enable outputs that have been forced on in the configuration file
If the user has gone to the effort of manually enabling an output in
the configuration file assume that they know what they're doing.

X.org Bug 14611 <http://bugs.freedesktop.org/show_bug.cgi?id=14611>

Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-02-22 13:28:40 -08:00
Michael Vogt
1e6fd65d0b xfree86/modes: only call gamma_set if its non NULL
I ran accross a crash with xf86-video-nv-2.1.15 [1] and xserver
1.7.3.901. It looks like the problem is that gamma_set is called even
if that is NULL.

[1] https://launchpad.net/bugs/494627

Reviewed-By: Matthias Hopf <mhopf@suse.de>
Signed-off-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
2010-01-27 14:10:48 -08:00
Adam Jackson
a5e59230de randr: Turn on ModeDebug during server setup
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2009-11-06 06:24:10 -08:00
Adam Jackson
7c0803f555 modes: Fix duplicate detection, and do it more consistently
Signed-off-by: Adam Jackson <ajax@redhat.com>
2009-10-29 14:06:00 -04:00
Ma Ling
fc2ec95664 EDID: CEA extension support
Reviewed-by: Adam Jackson <ajax@redhat.com>
2009-10-29 14:04:55 -04:00
Keith Packard
db98b26ee1 Re-fix DGA removal.
Removing DGA ended up breaking any drivers calling into the old
xf86DiDGAInit function as it tried to see if DGA was already enabled
and ended up crashing if the VT wasn't completely initialized. Oops.

Also, if the driver initializes DGA itself, have the DiDGA
initialization overwrite that information as the DiDGA code will call
ReInit on mode detect.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-10-01 11:02:25 +10:00
Keith Packard
0b7c6c728c xfree86/modes: Remove all framebuffer support from DGA
This removes all rendering and mapping code from xf86DiDGA, leaving
just mode setting and raw input device access. The mapping code didn't
have the offset within /dev/mem for the frame buffer and the pixmap
support assumed that the framebuffer was never reallocated.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-09-21 16:20:25 +10:00
Keith Packard
6086a60656 xf8CrtcSetModeTransform: free adjusted_mode name too
The adjusted mode was freed, but any name allocated for that was leaked.

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
Adam Jackson
17545ed80e randr: Fix crtcs using set_mode_major()
We'd never mark the crtc as active, meaning (among other things) gamma
upload wouldn't work.
2009-09-02 14:40:07 -04:00
Adam Jackson
a98acb2907 s/xf86EnableOutputs/xf86CollectEnabledOutputs/ for clarity 2009-07-17 15:23:39 -04:00
Adam Jackson
8fab7f72f2 randr: Add Option "Primary" to Monitor sections 2009-07-17 15:23:30 -04:00
Oliver McFadden
66eabbebaf Coverity Prevent: RESOURCE_LEAK in xf86CrtcSetInitialGamma 2009-07-16 18:50:22 +03:00
Peter Hutterer
d3f6b43a24 Update to xextproto 7.0.99.1.
xextproto had Xlib client headers moved into libXext.
Protocol header files are named fooproto.h, header files with constants
foo.h or fooconst.h where foo.h was already in use for client-side headers.
2009-07-15 17:00:05 +10:00
Dave Airlie
0de58c88ab xfree86: move didLock assignment down to where the function pointer is valid.
crtc->funcs->lock is NULL, so it's no use calling it here. Move it down so
it's actually defined before we use it.

Introduced with 6f59a81600.

Tested-by: Peter Hutterer <peter.hutterer@who-t.net>
2009-06-11 14:24:42 +10:00
Benjamin Defnet
6f59a81600 hw/xf86/modes: Set crtc mode/rotation/transform before calling set_mode_major
This moves code out of each implementation of set_mode_major and back into
the X server. The real feature here is that the transform is now available
in the crtc for use by either xf86CrtcRotate or whatever the driver wants to
do. Without this change, the transform was lost for drivers providing the
set_mode_major interface.

Note that users of this API will want to stop smashing the transformPresent
field, and could also stop setting mode/x/y/rotation for new enough X servers,
but there's no reason to make that change as it will break things when
running against older X servers.

Signed-off-by: Keith Packard <keithp@keithp.com>
Acked-by: Daniel Stone <daniel@fooishbar.org>
2009-06-09 16:23:38 -07:00
Dave Airlie
b6c16fc7da crtc/gamma: check xf86_config is valid before using it.
If you have multiple cards, some that support randr 1.2 and some that don't
you can get a null dereference in here.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-06-05 12:04:03 +10:00
Matthias Hopf
75795637c7 Revert "randr: Setting gamma: inverse logic looks more sane"
This reverts commit 79138eec1b.
2009-06-02 18:41:36 +02:00
Matthias Hopf
79138eec1b randr: Setting gamma: inverse logic looks more sane 2009-05-20 12:43:24 +02:00
Michel Dänzer
fc3ce861cd randr12: Fix calculation of gamma ramp values.
The reciprocal gamma value was missed in the first copy and this mistake was
propagated to the second one.

Signed-off-by: Michel Dänzer <daenzer@vmware.com>
2009-05-14 11:35:25 +02:00
Jesse Barnes
94648bb797 Don't prepare outputs & crtcs if set_mode_major is present
A driver with this hook will take care of preparing the outputs & crtcs,
so calling the prepare functions will just cause unnecessary flicker.

Fixes bug #21077
2009-05-04 15:38:22 -07:00
Matthias Hopf
cadf65a6e1 randr: Nuke broken set_origin shortcut
Shortcut is impossible to implement this way, because we don't know for sure
whether the crtc of an output has changed or not.
2009-03-10 15:49:49 +01:00
Adam Jackson
8a6ed44a8b randr: Fix thinko in xf86TargetPreferred
The only-one-output case would only work right if that also happened to
be the zeroth output.  Oops.
2009-03-02 14:26:23 -05:00
Julien Cristau
ab331aa76f xfree86: ModeDebug is a boolean, not a string
Signed-off-by: Julien Cristau <jcristau@debian.org>
2009-02-16 23:08:09 +01:00
Adam Jackson
bcafdfbed6 RANDR: Validate entire mode list for interlace and doublescan
Otherwise drivers have to refuse interlace twice: once in the output
config, and once in ->valid_mode() to catch output and config modes.
If you can't do interlaced modes, asking nicely for it in the config
isn't going to suddenly make it work.
2009-02-13 14:06:07 -05:00
Keith Packard
7968823cbc Handle the combination of panning and crtc transforms
This patch gets the shadow scanout buffer repainted on panning area changes.
It does not, however, track the mouse correctly.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-02-03 20:21:07 -08:00
Pierre Willenbrock
29b3b88dc7 Prevent double unref of glxdrawables
Found by valgrind. Bug #18917.
2009-02-01 09:06:43 -08:00
Eric Anholt
f716e3f344 modes: Protect xf86_crtc_supports_gamma() from non-RandR 1.2 drivers. 2009-01-30 20:10:21 -08:00
Keith Packard
ea309e4745 Make crtc_notify wrap/unwrap code do nothing unless mode code is inuse
Drivers not using the new hw/xfree86/modes code would crash in DRI due to
that code trying to monitor CRTC changes.

Signed-off-by: Keith Packard <keithp@keithp.com>
2009-01-30 14:19:41 -08:00
Maarten Maathuis
b5736d237a randr/xfree86: Fix initial gamma computation.
- The previous version overflowed sometimes.
2008-12-22 19:54:17 +01:00
Maarten Maathuis
82fba7697f xfree86/randr: Avoid a crash when xf86CrtcConfigPrivateIndex is -1. 2008-12-22 00:33:55 +01:00
Maarten Maathuis
1b244feb4c randr: check for malloc failure 2008-12-18 16:12:12 +01:00
Maarten Maathuis
1001403301 Forgot to fix a comment. 2008-12-18 00:19:06 +01:00
Maarten Maathuis
9fa15bef59 randr: some improvements, fixes and crtc abi bump
- Add active field to crtc.
- Set gamma (only) whenever a crtc becomes active.
- Check for xf86_config being NULL.
- Increase crtc abi to 3.
- A few other fixes.
2008-12-17 23:46:31 +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
Matthias Hopf
8511a964f8 randr: Update EDID_ATOM_NAME to reflect RandR 1.3 name change 2008-12-16 18:21:20 +01:00
Keith Packard
fde2f96103 Use scrn->virtualX/virtualY in xf86CrtcFitsScreen. Fix bug 19017.
pScreen->width/height are not initialized when doing initial mode setting,
which makes this function incorrectly fail. Using scrn->virtualX should work
in all cases though.

Bug 19017 reports a crash in xf86CrtcSetModeTransform when doing a modeset
for output probing, long before the screen array is initialized; that was
caused by a work-around to set pScreen->width/height so that xf86CrtcFitsScreen
could find the right values.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-12-15 11:45:43 -08:00
Keith Packard
1ba4cbb159 Clean up rotation data when crtc is turned off
The shadow frame buffer and other data used for rotation need to be freed
when the crtc is disabled, not just when rotation is disabled.

Signed-off-by: Keith Packard <keithp@keithp.com>
2008-12-15 11:45:42 -08:00
Cooper Yuan
2a61397d17 Fix typo in xf86PickCrtcs() 2008-12-15 10:29:34 -05:00
Matthias Hopf
d41b8960be randr: Fix initial panning border copy
Thanks to Julien Cristau for finding this.
2008-12-11 18:48:02 +01:00
Matthias Hopf
24d6b7d1c5 randr: Fix error message for bad panning config 2008-12-11 18:30:25 +01:00
Matthias Hopf
fdbbe65a7e randr: Add monitor option "Panning" for initial panning configuration 2008-12-11 18:30:25 +01:00
Paulo Cesar Pereira de Andrade
091a50d126 Move _X_EXPORT attribute to header file.
The attribute should be set on header files to make it easier to
manage what symbols are available to modules.
  _X_EXPORT should be used in sources only for special cases, like
symbols that must be visible by non video/input driver/modules but
should not be "advertised" in the sdk.
2008-12-04 18:23:25 -02:00
Matthias Hopf
18a8bac1a1 randr: Rename pan() to set_origin(), and xf86CrtcPan() to xf86CrtcSetOrigin() 2008-12-04 18:16:43 +01:00
Matthias Hopf
b929d721ef randr: Panning support 2008-12-04 18:16:43 +01:00
Matthias Hopf
a475eb9fee randr: Weird enough, crtc->version was never set upon creation. Fix that. 2008-12-04 18:16:42 +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
Kristian Høgsberg
09df7cc5ad Avoid dereferencing NULL pScreen in xf86CrtcSetModeTransform().
We can get there during PreInit as we set a mode for load detection.
At that time there's no pScreen anywhere, so just skip the optimization
then.
2008-12-01 12:41:10 -05:00
Maarten Maathuis
ffb484f7ef randr: Avoid needlessly creating a shadow framebuffer.
- pScreen->width and height were zero, so it didn't "fit" the screen.
2008-11-29 14:30:55 +01:00
Paulo Cesar Pereira de Andrade
31285d063e Make visible symbols required by xorg modules.
This patch exports all symbols required by the compilable
(in a x86 linux computer) xorg/driver/* modules.
  Still missing symbols worth mentioning are:

sunleo
	miFindMaxBand no longer available

intel	(uxa/uxa-accel.c)
	fbShmPutImage no longer available (and should have been static)

mga
	MGAGetClientPointer (should come from matrox's libhal)

  This is not a definitive "visibility" patch, as all it does is to
export missing symbols, but the modules that current don't compile,
may require more symbols once fixed, and third party drivers should
also require more symbols exported.
  A "definitive" patch should export symbols defined in the sdk.
2008-11-28 01:55:11 -02: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
7236fd9dd4 Be careful about copying transforms around; they have allocated memory. 2008-11-24 13:24:41 -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
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
ddc8466137 Initialize and cleanup new filter fields in xf86Crtc. 2008-11-24 13:24:37 -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