DRI uses a non-screen block/wakeup handler which will be executed after the
screen block handler finishes. To ensure that the rotation block handler is
executed under the DRI lock, dynamically wrap the screen block handler for
rotation.
By default, use the screen monitor section for output 0, however, a driver
can change which output gets the screen monitor by calling
xf86OutputUseScreenMonitor.
(cherry picked from commit f4a8e54caf)
The rotation state is stored in the xf86_config structure which is not
re-initialized at server reset time. Clean it up at CloseScreen time.
(cherry picked from commit f8db7665dc)
Rotation block handler was re-registering the rotation damage structure,
creating an infinite loop in the damage code. Track registration of the
damage structure to avoid this.
(cherry picked from commit b14f003b0e)
This moves most of the cursor management code out of the intel driver and
into the general server code. Of course, the hope is that this code will be
useful for other driver writers as well.
Check out xf86Crtc.h for the usage information, making sure you add the
needed hooks to the crtc funcs structure for your driver.
(cherry picked from commit 4d81c99a46)
xf86SetDesiredModes applies the desired modes to each crtc (as selected by
xf86InitialConfiguration initially and modified by successful mode settings
afterwards). For crtcs without a desired mode, pScrn->currentMode is used to
select something workable.
(cherry picked from commit bcade98cca)
This function applies a single mode to the screen (as from RandR 1.1,
XFree86-VidModeExtension or XFree86-DGA) using a policy that selects one
output to reconfigure to the requested mode and then makes all other outputs
fit within that size.
(cherry picked from commit 5a595c1f76)
canGrow indicates to the DDX that the driver can enlarge the desktop via the
xf86_config->funcs->resize hook. If so, xf86InitialConfiguration will set
virtual[XY] to match the configuration it chooses and will leave the crtc config
size ranges alone. If FALSE, it will bloat the screen to fit the largest probed
mode and also set the crtc config max size to limit the desktop to the initial
virtual[XY] size.
This hook is called when the DDX needs to resize the screen. The driver is
responsible for changing virtualX and virtualY, along with any other related
screen properties (devPrivate.ptr, devKind, displayWidth, etc.).
Use the size range from the crtc config instead of randrp->virtual[XY] when
reporting the min and max screen sizes to the DDX.
New modes header files required a few minor changes to be used by external
drivers, the most notable of which is the publication of the config file
parser header files.
Add monitor "Rotate" option taking one of "normal", "left", "inverted" or
"right". However, because initial mode selection is made before the screen
is completely initialized, we cannot create the shadow pixmap object at this
point. Pend the shadow pixmap creation until the block handler.
Note that this code is not completely functional yet.
RandR 1.0 sizeID must be computed the same way every time, so when reporting
it in the ScreenChangeNotify event, just construct the usual 1.0 data block
and use that.
subpixel geometry information can be computed by looking at the connected
outputs and finding any with subpixel geometry and using one of those for
the global screen subpixel geometry. This might be improved by reporting
None if more than one screen has information and they conflict.
This code comes from the intel driver, so there's no history in this tree.
As the crtc/output-based mode selection code uses ddc, the ddc and i2c
modules have been merged into the server. Attempts to load them are safely
ignored now.