~ubuntu-branches/ubuntu/precise/xorg-server/precise

« back to all changes in this revision

Viewing changes to hw/xfree86/modes/xf86Crtc.h

  • Committer: Bazaar Package Importer
  • Author(s): Christopher James Halse Rogers
  • Date: 2011-01-31 19:45:19 UTC
  • mfrom: (1.1.38 upstream) (0.1.19 experimental)
  • Revision ID: james.westby@ubuntu.com-20110131194519-fx30d1zsg83invba
Tags: 2:1.9.99.901+git20110131.be3be758-0ubuntu1
* Merge from (unreleased) debian-experimental.  Remaining Ubuntu changes:
  - rules:
    + Disable SELinux, libaudit-dev is not in main yet. (LP: #406226)
    + Enable xcsecurity. (LP: #247537)
    + Add --with-extra-module-dir to support GL alternatives.
  - control: 
    + Xvfb depends on xauth, x11-xkb-utils. (LP: #500102)
    + Add breaks for incompatible drivers. (LP: #614993)
    + Drop libaudit-dev from build-deps.
  - local/xvfb-run*: Add correct docs about error codes. (LP #328205)
  - debian/patches:
    + 100_rethrow_signals.patch:
      When aborting, re-raise signals for apport
    + 109_fix-swcursor-crash.patch:
      Avoid dereferencing null pointer while reloading cursors during
      resume. (LP: #371405)
    + 111_armel-drv-fallbacks.patch:
      Add support for armel driver fallbacks.
    + 121_only_switch_vt_when_active.diff:
      Add a check to prevent the X server from changing the VT when killing
      GDM from the console.
    + 122_xext_fix_card32_overflow_in_xauth.patch:
      Fix server crash when “xauth generate” is called with large timeout.
    + 157_check_null_modes.patch, 162_null_crtc_in_rotation.patch,
      166_nullptr_xinerama_keyrepeat.patch, 167_nullptr_xisbread.patch
      169_mipointer_nullptr_checks.patch,
      172_cwgetbackingpicture_nullptr_check.patch:
      Fix various segfaults in xserver by checking pointers for NULL
      values before dereferencing them.
    + 165_man_xorg_conf_no_device_ident.patch
      Correct man page
    + 168_glibc_trace_to_stderr.patch:
      Report abort traces to stderr instead of terminal
    + 184_virtual_devices_autodetect.patch:
      Use vesa for qemu device, which is not supported by cirrus
    + 188_default_primary_to_first_busid.patch:
      Pick the first device and carry on (LP: #459512)
    + 190_cache-xkbcomp_output_for_fast_start_up.patch:
    + 191-Xorg-add-an-extra-module-path.patch:
      Add support for the alternatives module path.
    + 198_nohwaccess.patch:
      Adds a -nohwaccess argument to make X not access the hardware
      ports directly.
    + 200_randr-null.patch:
      Clarify a pointer initialization.
    + 206_intel_8xx_default_to_fbdev.patch:
      Makes 8xx class intel GPUs default to fbdev for stability. (LP: #633593)
* Refresh 121_only_switch_vt_when_active.diff for new upstream.
* Drop 187_edid_quirk_hp_nc8430.patch; upstream.
* Drop 189_xserver_1.5.0_bg_none_root.patch; functionality now upstream.
* Refresh 190_cache-xkbcomp_output_for_fast_start_up.patch for new upstream.
* Drop 197_xvfb-randr.patch:
  - miRandR, which this used, has been removed from the server. 
* Drop 204_fix-neg-sync-transition.patch; upstream.
* Drop 207_dga_master_device.patch; upstream.
* Drop 208_switch_on_release.diff; upstream.
* debian/patches/209_add_legacy_bgnone_option.patch:
  - Add "-nr" as a synonym for "-background none" to ease the transition from
    the old 189_xserver_1.5.0_bg_none_root.patch patch.  Can be dropped once
    all the ?DM have been updated to use the new option.
* debian/control:
  - Add Breaks: to xserver-xorg-video-8 and current fglrx.  These proprietary
    drivers don't yet have appropriate dependency information, so manually
    handle them here to prevent broken upgrades.

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
   XF86OutputStatusUnknown
73
73
} xf86OutputStatus;
74
74
 
 
75
typedef enum _xf86CrtcSetFlags {
 
76
    XF86CrtcSetMode = 1,                /* mode */
 
77
    XF86CrtcSetOutput = 2,              /* outputs */
 
78
    XF86CrtcSetOrigin = 4,              /* x/y */
 
79
    XF86CrtcSetTransform = 8,           /* transform */
 
80
    XF86CrtcSetRotation = 16,           /* rotation */
 
81
    XF86CrtcSetProperty = 32,           /* output property */
 
82
    XF86CrtcSetScanoutPixmap = 64,      /* scanout pixmap */
 
83
} xf86CrtcSetFlags;
 
84
 
 
85
typedef struct _xf86CrtcSet {
 
86
    xf86CrtcSetFlags    flags;
 
87
    DisplayModePtr      mode;
 
88
    Rotation            rotation;
 
89
    RRTransformPtr      transform;
 
90
    int                 x, y;
 
91
    PixmapPtr           scanout_pixmap;
 
92
} xf86CrtcSetRec;
 
93
 
75
94
typedef struct _xf86CrtcFuncs {
76
95
   /**
77
96
    * Turns the crtc on/off, or sets intermediate power levels if available.
221
240
    void
222
241
    (*set_origin)(xf86CrtcPtr crtc, int x, int y);
223
242
 
 
243
    /**
 
244
     * General mode setting entry point that does everything
 
245
     */
 
246
    Bool
 
247
    (*set)(xf86CrtcPtr crtc, xf86CrtcSetFlags flags);
 
248
 
224
249
} xf86CrtcFuncsRec, *xf86CrtcFuncsPtr;
225
250
 
226
251
#define XF86_CRTC_VERSION 3
254
279
    Rotation        rotation;
255
280
    PixmapPtr       rotatedPixmap;
256
281
    void            *rotatedData;
 
282
    PixmapPtr       scanoutPixmap;
257
283
    
258
284
    /**
259
285
     * Position on screen
322
348
    int             filter_width; /* ABI 2 */
323
349
    int             filter_height; /* ABI 2 */
324
350
    Bool            transform_in_use;
 
351
    Bool            sprite_transform_in_use;
325
352
    RRTransformRec  transform; /* ABI 2 */
326
353
    Bool            transformPresent; /* ABI 2 */
327
354
    RRTransformRec  desiredTransform; /* ABI 2 */
361
388
     * Clear the shadow
362
389
     */
363
390
    Bool            shadowClear;
 
391
 
 
392
    /**
 
393
     * Sprite position transforms
 
394
     */
 
395
 
 
396
    /* Transform a screen coordinate to a crtc coordinate */
 
397
    struct pixman_f_transform f_screen_to_crtc;
 
398
 
 
399
    /* The user-specified portion of the screen to crtc conversion */
 
400
    struct pixman_f_transform user_sprite_position_transform;
 
401
 
 
402
    /* Transform a hardware cursor coordinate to a cursor coordinate */
 
403
    struct pixman_f_transform f_crtc_to_cursor;
 
404
 
 
405
    /* The user-specified portion of the cursor to hardware transform */
 
406
    struct pixman_f_transform user_sprite_image_transform;
364
407
};
365
408
 
366
409
typedef struct _xf86OutputFuncs {
607
650
    INT16           initialBorder[4];
608
651
};
609
652
 
 
653
typedef enum _xf86SetConfigResponse {
 
654
    xf86SetConfigFailed,                /* set_config failed */
 
655
    xf86SetConfigChecked,               /* set_config validated the configuration */
 
656
    xf86SetConfigDone,                  /* set_config finished the work */
 
657
} xf86SetConfigResponse;
 
658
 
 
659
typedef struct _xf86CrtcSetConfig {
 
660
    xf86CrtcPtr                 crtc;
 
661
    int                         x, y;
 
662
    DisplayModeRec              mode;
 
663
    Rotation                    rotation;
 
664
    int                         numOutputs;
 
665
    xf86OutputPtr               *outputs;
 
666
    struct pict_f_transform     sprite_position_transform;
 
667
    struct pict_f_transform     sprite_image_transform;
 
668
 
 
669
    /* Probably want some internal structure for the pixmap so that
 
670
     * this can be set before the server is running
 
671
     */
 
672
    PixmapPtr                   pixmap;
 
673
    int                         pixmap_x, pixmap_y;
 
674
} xf86CrtcSetConfigRec, *xf86CrtcSetConfigPtr;
 
675
 
 
676
typedef struct _xf86CrtcScanoutFormat {
 
677
    int             depth;
 
678
    int             bitsPerPixel;
 
679
    int             maxWidth, maxHeight;
 
680
    Rotation        rotations;
 
681
    PictFormatShort format;
 
682
} xf86CrtcScanoutFormat;
 
683
 
610
684
typedef struct _xf86CrtcConfigFuncs {
611
685
    /**
612
686
     * Requests that the driver resize the screen.
624
698
    (*resize)(ScrnInfoPtr       scrn,
625
699
              int               width,
626
700
              int               height);
 
701
 
 
702
    xf86SetConfigResponse
 
703
    (*set_config) (ScrnInfoPtr          scrn,
 
704
                   RRScreenConfigPtr    screen_config,
 
705
                   xf86CrtcSetConfigPtr crtc_configs,
 
706
                   int                  num_configs);
 
707
 
 
708
    /**
 
709
     * Create a scanout pixmap
 
710
     */
 
711
    PixmapPtr
 
712
    (*create_scanout_pixmap)(ScrnInfoPtr                scrn,
 
713
                             int                        width,
 
714
                             int                        height,
 
715
                             Rotation                   rotations,
 
716
                             xf86CrtcScanoutFormat      *format);
 
717
 
627
718
} xf86CrtcConfigFuncsRec, *xf86CrtcConfigFuncsPtr;
628
719
 
629
720
typedef void (*xf86_crtc_notify_proc_ptr) (ScreenPtr pScreen);
683
774
    /* callback when crtc configuration changes */
684
775
    xf86_crtc_notify_proc_ptr  xf86_crtc_notify;
685
776
 
 
777
    /*
 
778
     * Supported scanout pixmap formats
 
779
     */
 
780
    int                 num_scanout_formats;
 
781
    xf86CrtcScanoutFormat       *scanout_formats;
686
782
} xf86CrtcConfigRec, *xf86CrtcConfigPtr;
687
783
 
688
784
extern _X_EXPORT int xf86CrtcConfigPrivateIndex;
728
824
                      int minWidth, int minHeight,
729
825
                      int maxWidth, int maxHeight);
730
826
 
 
827
extern _X_EXPORT void
 
828
xf86CrtcSetScanoutFormats (ScrnInfoPtr                  scrn,
 
829
                           int                          num_formats,
 
830
                           xf86CrtcScanoutFormat        *formats);
 
831
 
731
832
/*
732
833
 * Crtc functions
733
834
 */
738
839
extern _X_EXPORT void
739
840
xf86CrtcDestroy (xf86CrtcPtr            crtc);
740
841
 
741
 
 
742
842
/**
743
 
 * Sets the given video mode on the given crtc
 
843
 * Change a crtc configuration (modes, outputs, etc)
744
844
 */
745
845
 
746
846
extern _X_EXPORT Bool
747
 
xf86CrtcSetModeTransform (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
748
 
                          RRTransformPtr transform, int x, int y);
749
 
 
750
 
extern _X_EXPORT Bool
751
 
xf86CrtcSetMode (xf86CrtcPtr crtc, DisplayModePtr mode, Rotation rotation,
752
 
                 int x, int y);
 
847
xf86CrtcSet (xf86CrtcPtr crtc, xf86CrtcSetRec *set);
753
848
 
754
849
extern _X_EXPORT void
755
850
xf86CrtcSetOrigin (xf86CrtcPtr crtc, int x, int y);
760
855
extern _X_EXPORT Bool
761
856
xf86CrtcRotate (xf86CrtcPtr crtc);
762
857
 
 
858
 
 
859
/*
 
860
 * Update cursor transform matrices after user changes
 
861
 * This is just the cursor subset of xf86CrtcRotate
 
862
 */
 
863
extern _X_EXPORT void
 
864
xf86CrtcRotateCursor (xf86CrtcPtr crtc);
 
865
 
763
866
/*
764
867
 * Clean up any rotation data, used when a crtc is turned off
765
868
 * as well as when rotation is disabled.