Commit Graph

69 Commits

Author SHA1 Message Date
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
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
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
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
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
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
fd77ce9f88 randr: Oops, miscalculated panning rectangle's coordinates 2008-12-11 18:30:25 +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
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
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
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
Julien Cristau
01264f1792 Add swapped dispatch for randr 1.2 requests 2008-08-21 09:24:02 +02:00
Eamon Walsh
2d17f47cc7 Merge branch 'master' into XACE-SELINUX
Conflicts:

	hw/xnest/Pixmap.c
	include/dix.h
2007-11-19 18:10:46 -05:00
Adam Jackson
70e50fa51f Allocate RRCrtcRecs with calloc. 2007-11-15 17:00:37 -05:00
Eamon Walsh
1603130236 Merge branch 'master' into XACE-SELINUX
Conflicts:

	Xext/xace.c
	Xext/xace.h
2007-11-14 13:35:50 -05:00
Matthias Hopf
f7dd0c72b8 Only clear crtc of output if it is the one we're actually working on.
Upon recreation of the RandR internal data structures in RRCrtcNotify() the
crtc of an output could be NULLed if the crtc was shared (cloned) between two
outputs and one of them got another crtc assigned.
2007-11-12 15:12:21 +01:00
Eamon Walsh
fe97f7c54a registry: Add some missing #include's. 2007-10-15 22:46:08 -04:00
Eamon Walsh
6adeba1730 dix: Add a new "registry" mechanism for registering string names of things.
Supports protocol requests, events, and errors, and resource names.
Modify XRES extension to use it.
2007-10-11 14:18:59 -04:00
Gustavo Pichorim Boiko
5b424b562e Set the crtc before the output change is notified
Set the new randr crtc of the output before the output change notification is
delivered to the clients.
Remove RROutputSetCrtc as it is not really necessary. All we have to do is set
the output's crtc on RRCrtcNotify
2007-07-23 14:47:45 -07:00
Keith Packard
8773ad023e Screen size bounds check in ProcRRSetCrtcConfig not masking out reflections.
When checking how to validate the selected mode and position against the
current screen size, the test against 90/270 rotation did not mask out
reflection, so that when reflection was specified, the 90/270 test would
never succeed. This caused incorrect bounds checking and would return
an error to the user instead of rotating the screen.
2007-07-14 09:03:47 -07:00
Keith Packard
b5823ea3e1 RandR 1.2 spec says CRTC info contains screen-relative geometry.
Was reporting mode size instead of adjusting for rotation.
(cherry picked from commit e2e7c47a52)
2007-04-16 08:11:30 -03:00
Keith Packard
804080a709 Make pending properties force mode set. And, remove AttachScreen calls.
Yes, two changes in one commit. Sorry 'bout that.

The first change ensures that when pending property values have been
changed, a mode set to the current mode will actually do something, rather
than being identified as a no-op. In addition, the driver no longer needs to
manage the migration of pending to current values, that is handled both
within the xf86 mode setting code (to deal with non-RandR changes) as well
as within the RandR extension itself.

The second change eliminates the two-call Create/AttachScreen stuff that was
done in a failed attempt to create RandR resources before the screen
structures were allocated. Merging these back into the Create function is
cleaner.
(cherry picked from commit 57e87e0d00)

Conflicts:

	randr/randrstr.h
	randr/rrcrtc.c

I think master and server-1.3-branch are more in sync now.
2007-03-24 00:01:47 -07:00
Keith Packard
86d76390eb Make sure RandR events are delivered from RRCrtcSet.
Some paths were skipping the event delivery stage.
(cherry picked from commit 9ca7ba5d60)
2007-03-23 01:30:32 -07:00
Keith Packard
2489dae9f7 Correct ref counting of RRMode structures
RRModes are referenced by the resource db, RROutput and RRCrtc structures.
Ensure that the mode reference count is decremented each time a reference is
lost from one of these sources. The missing destroys were in
RRCrtcDestroyResource and RROutputDestroyResource, which only happen at
server reset time, so modes would be unavailable in subsequent server
generations.
2007-03-17 23:38:28 -07:00
Keith Packard
2c93083edd Add support for user-defined modelines in RandR.
The RandR protocol spec has several requests in support of user-defined
modes, but the implementation was stubbed out inside the X server. Fill out
the DIX portion and start on the xf86 DDX portion. It might be necessary to
add more code to the DDX to insert the user-defined modes into the output
mode list.
(cherry picked from commit 63cc2a51ef)

Conflicts:

	randr/randrstr.h

Updated code to work in master with recent security API changes.
2007-03-17 23:20:07 -07:00
Jens Granseuer
689d52b624 Bugzilla #7145: fix build with gcc 2.95
Bugzilla #7145: <http://bugs.freedesktop.org/show_bug.cgi?id=7145>
Patch #8987: <http://bugs.freedesktop.org/attachment.cgi?id=8987>
2007-03-05 15:31:44 -08:00
Aaron Plattner
06c3021aec Don't crash setting a NULL mode with a randr classic DDX. Also remember to update the screen size during modesets. 2007-02-28 16:13:13 -08:00
Aaron Plattner
8b24575884 Return BadMatch if a client tries to clone non-cloneable outputs. 2007-02-28 12:35:50 -08:00
Eric Anholt
4f2f3233c8 Fix the size expectations of xRRSetCrtcGamma.
It was using REQUEST_SIZE_MATCH (client request length must equal request size)
rather than REQUEST_AT_LEAST_SIZE (client request length must be at least
big enough for request size), and this request has data following the request
structure.
2007-02-01 15:10:29 -08:00
Eric Anholt
a53586eebc Warning fix for RRCrtcSetRotations(). 2007-01-24 13:36:25 -08:00
Keith Packard
b6b8559321 Make Xinearama screen information reflect CRTC rotation. 2007-01-24 13:34:58 -08:00
Eric Anholt
42a48786ac Add a setter for randr_crtc->rotations. 2007-01-17 14:34:42 -08:00
Keith Packard
670bbb8731 RandR 1.2 rotation code must adjust width/height.
Mode lines reflect the monitor mode, not the projected size into the frame
buffer. Flip width/height around so that the dimensions are oriented
correctly.
(cherry picked from 612a8e6180 commit)
2006-12-15 18:32:32 +11:00
Keith Packard
628c7daeb1 RandR: config time updates when hardware config changes.
The config time in the RandR protocol reflects when the hardware state has
changed. It was getting changed anytime the driver changed the usage
of the hardware as well.
(cherry picked from 98d18a6578 commit)
2006-12-15 18:32:18 +11:00
Eamon Walsh
6c46645cfc Naming change: Security*Access -> Dix*Access 2006-12-14 14:45:42 -05:00