2 * Copyright © 2006 Keith Packard
3 * Copyright © 2011 Aaron Plattner
5 * Permission to use, copy, modify, distribute, and sell this software and its
6 * documentation for any purpose is hereby granted without fee, provided that
7 * the above copyright notice appear in all copies and that both that copyright
8 * notice and this permission notice appear in supporting documentation, and
9 * that the name of the copyright holders not be used in advertising or
10 * publicity pertaining to distribution of the software without specific,
11 * written prior permission. The copyright holders make no representations
12 * about the suitability of this software for any purpose. It is provided "as
13 * is" without express or implied warranty.
15 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
16 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
17 * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
18 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
19 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
20 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
28 #include "xf86Modes.h"
29 #include "xf86Cursor.h"
32 #include "picturestr.h"
34 /* Compat definitions for older X Servers. */
36 #define M_T_PREFERRED 0x08
39 #define M_T_DRIVER 0x40
42 #define M_T_USERPREF 0x80
44 #ifndef HARDWARE_CURSOR_ARGB
45 #define HARDWARE_CURSOR_ARGB 0x00004000
48 typedef struct _xf86Crtc xf86CrtcRec, *xf86CrtcPtr;
49 typedef struct _xf86Output xf86OutputRec, *xf86OutputPtr;
51 /* define a standard for connector types */
52 typedef enum _xf86ConnectorType {
58 XF86ConnectorComposite,
60 XF86ConnectorComponent,
62 XF86ConnectorProprietary,
64 XF86ConnectorDisplayPort,
67 typedef enum _xf86OutputStatus {
68 XF86OutputStatusConnected,
69 XF86OutputStatusDisconnected,
70 XF86OutputStatusUnknown
73 typedef struct _xf86CrtcFuncs {
75 * Turns the crtc on/off, or sets intermediate power levels if available.
77 * Unsupported intermediate modes drop to the lower power setting. If the
78 * mode is DPMSModeOff, the crtc must be disabled sufficiently for it to
79 * be safe to call mode_set.
82 (*dpms) (xf86CrtcPtr crtc, int mode);
85 * Saves the crtc's state for restoration on VT switch.
88 (*save) (xf86CrtcPtr crtc);
91 * Restore's the crtc's state at VT switch.
94 (*restore) (xf86CrtcPtr crtc);
97 * Lock CRTC prior to mode setting, mostly for DRI.
98 * Returns whether unlock is needed
101 (*lock) (xf86CrtcPtr crtc);
104 * Unlock CRTC after mode setting, mostly for DRI
107 (*unlock) (xf86CrtcPtr crtc);
110 * Callback to adjust the mode to be set in the CRTC.
112 * This allows a CRTC to adjust the clock or even the entire set of
113 * timings, which is used for panels with fixed timings or for
114 * buses with clock limitations.
117 (*mode_fixup) (xf86CrtcPtr crtc,
118 DisplayModePtr mode, DisplayModePtr adjusted_mode);
121 * Prepare CRTC for an upcoming mode set.
124 (*prepare) (xf86CrtcPtr crtc);
127 * Callback for setting up a video mode after fixups have been made.
130 (*mode_set) (xf86CrtcPtr crtc,
132 DisplayModePtr adjusted_mode, int x, int y);
135 * Commit mode changes to a CRTC
138 (*commit) (xf86CrtcPtr crtc);
140 /* Set the color ramps for the CRTC to the given values. */
142 (*gamma_set) (xf86CrtcPtr crtc, CARD16 *red, CARD16 *green, CARD16 *blue,
146 * Allocate the shadow area, delay the pixmap creation until needed
148 void *(*shadow_allocate) (xf86CrtcPtr crtc, int width, int height);
151 * Create shadow pixmap for rotation support
154 (*shadow_create) (xf86CrtcPtr crtc, void *data, int width, int height);
157 * Destroy shadow pixmap
160 (*shadow_destroy) (xf86CrtcPtr crtc, PixmapPtr pPixmap, void *data);
166 (*set_cursor_colors) (xf86CrtcPtr crtc, int bg, int fg);
169 * Set cursor position
172 (*set_cursor_position) (xf86CrtcPtr crtc, int x, int y);
178 (*show_cursor) (xf86CrtcPtr crtc);
184 (*hide_cursor) (xf86CrtcPtr crtc);
187 * Load monochrome image
190 (*load_cursor_image) (xf86CrtcPtr crtc, CARD8 *image);
192 (*load_cursor_image_check) (xf86CrtcPtr crtc, CARD8 *image);
198 (*load_cursor_argb) (xf86CrtcPtr crtc, CARD32 *image);
200 (*load_cursor_argb_check) (xf86CrtcPtr crtc, CARD32 *image);
203 * Clean up driver-specific bits of the crtc
206 (*destroy) (xf86CrtcPtr crtc);
209 * Less fine-grained mode setting entry point for kernel modesetting
212 (*set_mode_major) (xf86CrtcPtr crtc, DisplayModePtr mode,
213 Rotation rotation, int x, int y);
216 * Callback for panning. Doesn't change the mode.
217 * Added in ABI version 2
220 (*set_origin) (xf86CrtcPtr crtc, int x, int y);
225 (*set_scanout_pixmap)(xf86CrtcPtr crtc, PixmapPtr pixmap);
227 } xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
229 #define XF86_CRTC_VERSION 5
238 * Associated ScrnInfo
243 * Desired state of this CRTC
245 * Set when this CRTC should be driving one or more outputs
252 * This reflects the mode as set in the CRTC currently
253 * It will be cleared when the VT is not active or
254 * during server startup
258 PixmapPtr rotatedPixmap;
264 * Locates this CRTC within the frame buffer
271 * This is set to the requested mode, independent of
272 * whether the VT is active. In particular, it receives
273 * the startup configured mode and saves the active mode
276 DisplayModeRec desiredMode;
277 Rotation desiredRotation;
278 int desiredX, desiredY;
280 /** crtc-specific functions */
281 const xf86CrtcFuncsRec *funcs;
286 * Holds driver-private information
288 void *driver_private;
290 #ifdef RANDR_12_INTERFACE
294 * When RandR 1.2 is available, this
295 * points at the associated crtc object
297 RRCrtcPtr randr_crtc;
303 * Current cursor is ARGB
307 * Track whether cursor is within CRTC range
309 Bool cursor_in_range;
311 * Track state of cursor associated with this CRTC
316 * Current transformation matrix
318 PictTransform crtc_to_framebuffer;
319 /* framebuffer_to_crtc was removed in ABI 2 */
320 struct pict_f_transform f_crtc_to_framebuffer; /* ABI 2 */
321 struct pict_f_transform f_framebuffer_to_crtc; /* ABI 2 */
322 PictFilterPtr filter; /* ABI 2 */
323 xFixed *params; /* ABI 2 */
324 int nparams; /* ABI 2 */
325 int filter_width; /* ABI 2 */
326 int filter_height; /* ABI 2 */
327 Bool transform_in_use;
328 RRTransformRec transform; /* ABI 2 */
329 Bool transformPresent; /* ABI 2 */
330 RRTransformRec desiredTransform; /* ABI 2 */
331 Bool desiredTransformPresent; /* ABI 2 */
333 * Bounding box in screen space
338 * TotalArea: total panning area, larger than CRTC's size
339 * TrackingArea: Area of the pointer for which the CRTC is panned
340 * border: Borders of the displayed CRTC area which induces panning if the pointer reaches them
341 * Added in ABI version 2
343 BoxRec panningTotalArea;
344 BoxRec panningTrackingArea;
345 INT16 panningBorder[4];
348 * Current gamma, especially useful after initial config.
349 * Added in ABI version 3
357 * Actual state of this CRTC
359 * Set to TRUE after modesetting, set to FALSE if no outputs are connected
360 * Added in ABI version 3
369 * Indicates that the driver is handling the transform, so the shadow
370 * surface should be disabled. The driver writes this field before calling
371 * xf86CrtcRotate to indicate that it is handling the transform (including
372 * rotation and reflection).
374 * Setting this flag also causes the server to stop adjusting the cursor
375 * image and position.
377 * Added in ABI version 4
379 Bool driverIsPerformingTransform;
381 /* Added in ABI version 5
383 PixmapPtr current_scanout;
386 typedef struct _xf86OutputFuncs {
388 * Called to allow the output a chance to create properties after the
389 * RandR objects have been created.
392 (*create_resources) (xf86OutputPtr output);
395 * Turns the output on/off, or sets intermediate power levels if available.
397 * Unsupported intermediate modes drop to the lower power setting. If the
398 * mode is DPMSModeOff, the output must be disabled, as the DPLL may be
399 * disabled afterwards.
402 (*dpms) (xf86OutputPtr output, int mode);
405 * Saves the output's state for restoration on VT switch.
408 (*save) (xf86OutputPtr output);
411 * Restore's the output's state at VT switch.
414 (*restore) (xf86OutputPtr output);
417 * Callback for testing a video mode for a given output.
419 * This function should only check for cases where a mode can't be supported
420 * on the output specifically, and not represent generic CRTC limitations.
422 * \return MODE_OK if the mode is valid, or another MODE_* otherwise.
425 (*mode_valid) (xf86OutputPtr output, DisplayModePtr pMode);
428 * Callback to adjust the mode to be set in the CRTC.
430 * This allows an output to adjust the clock or even the entire set of
431 * timings, which is used for panels with fixed timings or for
432 * buses with clock limitations.
435 (*mode_fixup) (xf86OutputPtr output,
436 DisplayModePtr mode, DisplayModePtr adjusted_mode);
439 * Callback for preparing mode changes on an output
442 (*prepare) (xf86OutputPtr output);
445 * Callback for committing mode changes on an output
448 (*commit) (xf86OutputPtr output);
451 * Callback for setting up a video mode after fixups have been made.
453 * This is only called while the output is disabled. The dpms callback
454 * must be all that's necessary for the output, to turn the output on
455 * after this function is called.
458 (*mode_set) (xf86OutputPtr output,
459 DisplayModePtr mode, DisplayModePtr adjusted_mode);
462 * Probe for a connected output, and return detect_status.
464 xf86OutputStatus(*detect) (xf86OutputPtr output);
467 * Query the device for the modes it provides.
469 * This function may also update MonInfo, mm_width, and mm_height.
471 * \return singly-linked list of modes or NULL if no modes found.
473 DisplayModePtr(*get_modes) (xf86OutputPtr output);
475 #ifdef RANDR_12_INTERFACE
477 * Callback when an output's property has changed.
480 (*set_property) (xf86OutputPtr output,
481 Atom property, RRPropertyValuePtr value);
483 #ifdef RANDR_13_INTERFACE
485 * Callback to get an updated property value
488 (*get_property) (xf86OutputPtr output, Atom property);
490 #ifdef RANDR_GET_CRTC_INTERFACE
492 * Callback to get current CRTC for a given output
494 xf86CrtcPtr(*get_crtc) (xf86OutputPtr output);
497 * Clean up driver-specific bits of the output
500 (*destroy) (xf86OutputPtr output);
502 //#ifdef _F_STEREOSCOPIC_SEND_FBSIZE_TO_WM_
505 * Gets the expected width & height of framebuffer after stereo mode setting
507 void (*get_stereo_buffer_size)(xf86OutputPtr output, int planeID,
508 short* width, short* height);
511 * Gets the geometry of drawing rectangle after stereo mode setting
513 void (*get_drawing_rect)(xf86OutputPtr output, int planeID,
514 DrawRect* rect[RECT_MAX]);
516 } xf86OutputFuncsRec, *xf86OutputFuncsPtr;
518 #define XF86_OUTPUT_VERSION 2
527 * Associated ScrnInfo
532 * Currently connected crtc (if any)
534 * If this output is not in use, this field will be NULL.
539 * Possible CRTCs for this output as a mask of crtc indices
541 CARD32 possible_crtcs;
544 * Possible outputs to share the same CRTC as a mask of output indices
546 CARD32 possible_clones;
549 * Whether this output can support interlaced modes
551 Bool interlaceAllowed;
554 * Whether this output can support double scan modes
556 Bool doubleScanAllowed;
559 * List of available modes on this output.
561 * This should be the list from get_modes(), plus perhaps additional
562 * compatible modes added later.
564 DisplayModePtr probed_modes;
567 * Options parsed from the related monitor section
569 OptionInfoPtr options;
572 * Configured monitor section
574 XF86ConfMonitorPtr conf_monitor;
577 * Desired initial position
579 int initial_x, initial_y;
582 * Desired initial rotation
584 Rotation initial_rotation;
587 * Current connection status
589 * This indicates whether a monitor is known to be connected
590 * to this output or not, or whether there is no way to tell
592 xf86OutputStatus status;
594 /** EDID monitor information */
597 /** subpixel order */
600 /** Physical size of the currently attached output device. */
601 int mm_width, mm_height;
606 /** output-specific functions */
607 const xf86OutputFuncsRec *funcs;
609 /** driver private information */
610 void *driver_private;
612 /** Whether to use the old per-screen Monitor config section */
613 Bool use_screen_monitor;
615 #ifdef RANDR_12_INTERFACE
617 * RandR 1.2 output structure.
619 * When RandR 1.2 is available, this points at the associated
620 * RandR output structure and is created when this output is created
622 RROutputPtr randr_output;
627 * Desired initial panning
628 * Added in ABI version 2
630 BoxRec initialTotalArea;
631 BoxRec initialTrackingArea;
632 INT16 initialBorder[4];
635 typedef struct _xf86ProviderFuncs {
637 * Called to allow the provider a chance to create properties after the
638 * RandR objects have been created.
641 (*create_resources) (ScrnInfoPtr scrn);
644 * Callback when an provider's property has changed.
647 (*set_property) (ScrnInfoPtr scrn,
648 Atom property, RRPropertyValuePtr value);
651 * Callback to get an updated property value
654 (*get_property) (ScrnInfoPtr provider, Atom property);
656 } xf86ProviderFuncsRec, *xf86ProviderFuncsPtr;
658 typedef struct _xf86CrtcConfigFuncs {
660 * Requests that the driver resize the screen.
662 * The driver is responsible for updating scrn->virtualX and scrn->virtualY.
663 * If the requested size cannot be set, the driver should leave those values
664 * alone and return FALSE.
666 * A naive driver that cannot reallocate the screen may simply change
667 * virtual[XY]. A more advanced driver will want to also change the
668 * devPrivate.ptr and devKind of the screen pixmap, update any offscreen
669 * pixmaps it may have moved, and change pScrn->displayWidth.
672 (*resize) (ScrnInfoPtr scrn, int width, int height);
673 } xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr;
675 typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen);
677 typedef struct _xf86CrtcConfig {
679 xf86OutputPtr *output;
681 * compat_output is used whenever we deal
682 * with legacy code that only understands a single
683 * output. pScrn->modes will be loaded from this output,
684 * adjust frame will whack this output, etc.
691 int minWidth, minHeight;
692 int maxWidth, maxHeight;
694 /* For crtc-based rotation */
695 DamagePtr rotation_damage;
696 Bool rotation_damage_registered;
699 unsigned int dga_flags;
700 unsigned long dga_address;
701 DGAModePtr dga_modes;
703 int dga_width, dga_height, dga_stride;
704 DisplayModePtr dga_save_mode;
706 const xf86CrtcConfigFuncsRec *funcs;
708 CreateScreenResourcesProcPtr CreateScreenResources;
710 CloseScreenProcPtr CloseScreen;
712 /* Cursor information */
713 xf86CursorInfoPtr cursor_info;
717 CARD32 cursor_fg, cursor_bg;
720 * Options parsed from the related device section
722 OptionInfoPtr options;
726 /* wrap screen BlockHandler for rotation */
727 ScreenBlockHandlerProcPtr BlockHandler;
729 /* callback when crtc configuration changes */
730 xf86_crtc_notify_proc_ptr xf86_crtc_notify;
733 const xf86ProviderFuncsRec *provider_funcs;
734 #ifdef RANDR_12_INTERFACE
735 RRProviderPtr randr_provider;
737 void *randr_provider;
739 } xf86CrtcConfigRec, *xf86CrtcConfigPtr;
741 extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
743 #define XF86_CRTC_CONFIG_PTR(p) ((xf86CrtcConfigPtr) ((p)->privates[xf86CrtcConfigPrivateIndex].ptr))
745 static _X_INLINE xf86OutputPtr
746 xf86CompatOutput(ScrnInfoPtr pScrn)
748 xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
750 return config->output[config->compat_output];
753 static _X_INLINE xf86CrtcPtr
754 xf86CompatCrtc(ScrnInfoPtr pScrn)
756 xf86OutputPtr compat_output = xf86CompatOutput(pScrn);
760 return compat_output->crtc;
763 static _X_INLINE RRCrtcPtr
764 xf86CompatRRCrtc(ScrnInfoPtr pScrn)
766 xf86CrtcPtr compat_crtc = xf86CompatCrtc(pScrn);
770 return compat_crtc->randr_crtc;
774 * Initialize xf86CrtcConfig structure
777 extern _X_EXPORT void
778 xf86CrtcConfigInit(ScrnInfoPtr scrn, const xf86CrtcConfigFuncsRec * funcs);
780 extern _X_EXPORT void
782 xf86CrtcSetSizeRange(ScrnInfoPtr scrn,
783 int minWidth, int minHeight, int maxWidth, int maxHeight);
788 extern _X_EXPORT xf86CrtcPtr
789 xf86CrtcCreate(ScrnInfoPtr scrn, const xf86CrtcFuncsRec * funcs);
791 extern _X_EXPORT void
792 xf86CrtcDestroy(xf86CrtcPtr crtc);
795 * Sets the given video mode on the given crtc
798 extern _X_EXPORT Bool
800 xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode,
801 Rotation rotation, RRTransformPtr transform, int x,
804 extern _X_EXPORT Bool
806 xf86CrtcSetMode(xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
809 extern _X_EXPORT void
810 xf86CrtcSetOrigin(xf86CrtcPtr crtc, int x, int y);
813 * Assign crtc rotation during mode set
815 extern _X_EXPORT Bool
816 xf86CrtcRotate(xf86CrtcPtr crtc);
819 * Clean up any rotation data, used when a crtc is turned off
820 * as well as when rotation is disabled.
822 extern _X_EXPORT void
823 xf86RotateDestroy(xf86CrtcPtr crtc);
826 * free shadow memory allocated for all crtcs
828 extern _X_EXPORT void
829 xf86RotateFreeShadow(ScrnInfoPtr pScrn);
832 * Clean up rotation during CloseScreen
834 extern _X_EXPORT void
835 xf86RotateCloseScreen(ScreenPtr pScreen);
838 * Return whether any output is assigned to the crtc
840 extern _X_EXPORT Bool
841 xf86CrtcInUse(xf86CrtcPtr crtc);
846 extern _X_EXPORT xf86OutputPtr
847 xf86OutputCreate(ScrnInfoPtr scrn,
848 const xf86OutputFuncsRec * funcs, const char *name);
850 extern _X_EXPORT void
851 xf86OutputUseScreenMonitor(xf86OutputPtr output, Bool use_screen_monitor);
853 extern _X_EXPORT Bool
854 xf86OutputRename(xf86OutputPtr output, const char *name);
856 extern _X_EXPORT void
857 xf86OutputDestroy(xf86OutputPtr output);
859 extern _X_EXPORT void
860 xf86ProbeOutputModes(ScrnInfoPtr pScrn, int maxX, int maxY);
862 extern _X_EXPORT void
863 xf86SetScrnInfoModes(ScrnInfoPtr pScrn);
865 #ifdef RANDR_13_INTERFACE
866 #define ScreenInitRetType int
868 #define ScreenInitRetType Bool
871 extern _X_EXPORT ScreenInitRetType xf86CrtcScreenInit(ScreenPtr pScreen);
873 extern _X_EXPORT Bool
874 xf86InitialConfiguration(ScrnInfoPtr pScrn, Bool canGrow);
876 extern _X_EXPORT void
877 xf86DPMSSet(ScrnInfoPtr pScrn, int PowerManagementMode, int flags);
879 extern _X_EXPORT Bool
880 xf86SaveScreen(ScreenPtr pScreen, int mode);
882 //#ifdef _F_XF86_DISABLE_UNUSED_FUNC_RESCHANGE_
883 extern _X_EXPORT void
884 xf86DisableUnusedFunctionsResChange(ScrnInfoPtr pScrn, Bool is_res_change);
887 extern _X_EXPORT void
888 xf86DisableUnusedFunctions(ScrnInfoPtr pScrn);
890 extern _X_EXPORT DisplayModePtr
891 xf86OutputFindClosestMode(xf86OutputPtr output, DisplayModePtr desired);
893 extern _X_EXPORT Bool
895 xf86SetSingleMode(ScrnInfoPtr pScrn, DisplayModePtr desired, Rotation rotation);
898 * Set the EDID information for the specified output
900 extern _X_EXPORT void
901 xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon);
904 * Return the list of modes supported by the EDID information
907 extern _X_EXPORT DisplayModePtr xf86OutputGetEDIDModes(xf86OutputPtr output);
909 extern _X_EXPORT xf86MonPtr
910 xf86OutputGetEDID(xf86OutputPtr output, I2CBusPtr pDDCBus);
913 * Initialize dga for this screen
917 extern _X_EXPORT Bool
918 xf86DiDGAInit(ScreenPtr pScreen, unsigned long dga_address);
920 /* this is the real function, used only internally */
922 _xf86_di_dga_init_internal(ScreenPtr pScreen);
925 * Re-initialize dga for this screen (as when the set of modes changes)
928 extern _X_EXPORT Bool
929 xf86DiDGAReInit(ScreenPtr pScreen);
932 /* This is the real function, used only internally */
934 _xf86_di_dga_reinit_internal(ScreenPtr pScreen);
937 * Set the subpixel order reported for the screen using
938 * the information from the outputs
941 extern _X_EXPORT void
942 xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen);
945 * Get a standard string name for a connector type
947 extern _X_EXPORT const char *xf86ConnectorGetName(xf86ConnectorType connector);
950 * Using the desired mode information in each crtc, set
951 * modes (used in EnterVT functions, or at server startup)
954 extern _X_EXPORT Bool
955 xf86SetDesiredModes(ScrnInfoPtr pScrn);
958 * Initialize the CRTC-based cursor code. CRTC function vectors must
959 * contain relevant cursor setting functions.
961 * Driver should call this from ScreenInit function
963 extern _X_EXPORT Bool
964 xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags);
967 * Called when anything on the screen is reconfigured.
969 * Reloads cursor images as needed, then adjusts cursor positions.
971 * Driver should call this from crtc commit function.
973 extern _X_EXPORT void
974 xf86_reload_cursors(ScreenPtr screen);
977 * Called from EnterVT to turn the cursors back on
979 extern _X_EXPORT void
980 xf86_show_cursors(ScrnInfoPtr scrn);
983 * Called by the driver to turn cursors off
985 extern _X_EXPORT void
986 xf86_hide_cursors(ScrnInfoPtr scrn);
989 * Clean up CRTC-based cursor code. Driver must call this at CloseScreen time.
991 extern _X_EXPORT void
992 xf86_cursors_fini(ScreenPtr screen);
995 * Transform the cursor's coordinates based on the crtc transform. Normally
996 * this is done by the server, but if crtc->driverIsPerformingTransform is TRUE,
997 * then the server does not transform the cursor position automatically.
999 extern _X_EXPORT void
1000 xf86CrtcTransformCursorPos(xf86CrtcPtr crtc, int *x, int *y);
1004 * For overlay video, compute the relevant CRTC and
1005 * clip video to that.
1006 * wraps xf86XVClipVideoHelper()
1009 extern _X_EXPORT Bool
1011 xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn,
1012 xf86CrtcPtr * crtc_ret,
1013 xf86CrtcPtr desired_crtc,
1019 RegionPtr reg, INT32 width, INT32 height);
1022 extern _X_EXPORT xf86_crtc_notify_proc_ptr
1023 xf86_wrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr new);
1025 extern _X_EXPORT void
1026 xf86_unwrap_crtc_notify(ScreenPtr pScreen, xf86_crtc_notify_proc_ptr old);
1028 extern _X_EXPORT void
1029 xf86_crtc_notify(ScreenPtr pScreen);
1035 extern _X_EXPORT Bool
1036 xf86_crtc_supports_gamma(ScrnInfoPtr pScrn);
1038 extern _X_EXPORT void
1039 xf86ProviderSetup(ScrnInfoPtr scrn,
1040 const xf86ProviderFuncsRec * funcs, const char *name);
1042 extern _X_EXPORT void
1043 xf86DetachAllCrtc(ScrnInfoPtr scrn);
1045 #endif /* _XF86CRTC_H_ */