Panning now works without modeset
[profile/ivi/libdrm.git] / linux-core / drm_crtc.h
1 /*
2  * Copyright © 2006 Keith Packard
3  * Copyright © 2007 Intel Corporation
4  *   Jesse Barnes <jesse.barnes@intel.com>
5  */
6 #ifndef __DRM_CRTC_H__
7 #define __DRM_CRTC_H__
8
9 #include <linux/i2c.h>
10 #include <linux/spinlock.h>
11 #include <linux/types.h>
12 #include <linux/idr.h>
13
14 #include <linux/fb.h>
15
16 struct drm_device;
17
18 /*
19  * Note on terminology:  here, for brevity and convenience, we refer to output
20  * control chips as 'CRTCs'.  They can control any type of output, VGA, LVDS,
21  * DVI, etc.  And 'screen' refers to the whole of the visible display, which
22  * may span multiple monitors (and therefore multiple CRTC and output
23  * structures).
24  */
25
26 enum drm_mode_status {
27     MODE_OK     = 0,    /* Mode OK */
28     MODE_HSYNC,         /* hsync out of range */
29     MODE_VSYNC,         /* vsync out of range */
30     MODE_H_ILLEGAL,     /* mode has illegal horizontal timings */
31     MODE_V_ILLEGAL,     /* mode has illegal horizontal timings */
32     MODE_BAD_WIDTH,     /* requires an unsupported linepitch */
33     MODE_NOMODE,        /* no mode with a maching name */
34     MODE_NO_INTERLACE,  /* interlaced mode not supported */
35     MODE_NO_DBLESCAN,   /* doublescan mode not supported */
36     MODE_NO_VSCAN,      /* multiscan mode not supported */
37     MODE_MEM,           /* insufficient video memory */
38     MODE_VIRTUAL_X,     /* mode width too large for specified virtual size */
39     MODE_VIRTUAL_Y,     /* mode height too large for specified virtual size */
40     MODE_MEM_VIRT,      /* insufficient video memory given virtual size */
41     MODE_NOCLOCK,       /* no fixed clock available */
42     MODE_CLOCK_HIGH,    /* clock required is too high */
43     MODE_CLOCK_LOW,     /* clock required is too low */
44     MODE_CLOCK_RANGE,   /* clock/mode isn't in a ClockRange */
45     MODE_BAD_HVALUE,    /* horizontal timing was out of range */
46     MODE_BAD_VVALUE,    /* vertical timing was out of range */
47     MODE_BAD_VSCAN,     /* VScan value out of range */
48     MODE_HSYNC_NARROW,  /* horizontal sync too narrow */
49     MODE_HSYNC_WIDE,    /* horizontal sync too wide */
50     MODE_HBLANK_NARROW, /* horizontal blanking too narrow */
51     MODE_HBLANK_WIDE,   /* horizontal blanking too wide */
52     MODE_VSYNC_NARROW,  /* vertical sync too narrow */
53     MODE_VSYNC_WIDE,    /* vertical sync too wide */
54     MODE_VBLANK_NARROW, /* vertical blanking too narrow */
55     MODE_VBLANK_WIDE,   /* vertical blanking too wide */
56     MODE_PANEL,         /* exceeds panel dimensions */
57     MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
58     MODE_ONE_WIDTH,     /* only one width is supported */
59     MODE_ONE_HEIGHT,    /* only one height is supported */
60     MODE_ONE_SIZE,      /* only one resolution is supported */
61     MODE_NO_REDUCED,    /* monitor doesn't accept reduced blanking */
62     MODE_UNVERIFIED = -3, /* mode needs to reverified */
63     MODE_BAD = -2,      /* unspecified reason */
64     MODE_ERROR  = -1    /* error condition */
65 };
66
67 #define DRM_MODE_TYPE_CLOCK_CRTC_C (DRM_MODE_TYPE_CLOCK_C | \
68                                     DRM_MODE_TYPE_CRTC_C)
69
70 #define DRM_MODE(nm, t, c, hd, hss, hse, ht, hsk, vd, vss, vse, vt, vs, f) \
71         .name = nm, .status = 0, .type = (t), .clock = (c), \
72         .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
73         .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
74         .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
75         .vscan = (vs), .flags = (f), .vrefresh = 0
76
77 struct drm_display_mode {
78         /* Header */
79         struct list_head head;
80         char name[DRM_DISPLAY_MODE_LEN];
81         int mode_id;
82         int output_count;
83         enum drm_mode_status status;
84         int type;
85
86         /* Proposed mode values */
87         int clock;
88         int hdisplay;
89         int hsync_start;
90         int hsync_end;
91         int htotal;
92         int hskew;
93         int vdisplay;
94         int vsync_start;
95         int vsync_end;
96         int vtotal;
97         int vscan;
98         unsigned int flags;
99
100         /* Actual mode we give to hw */
101         int clock_index;
102         int synth_clock;
103         int crtc_hdisplay;
104         int crtc_hblank_start;
105         int crtc_hblank_end;
106         int crtc_hsync_start;
107         int crtc_hsync_end;
108         int crtc_htotal;
109         int crtc_hskew;
110         int crtc_vdisplay;
111         int crtc_vblank_start;
112         int crtc_vblank_end;
113         int crtc_vsync_start;
114         int crtc_vsync_end;
115         int crtc_vtotal;
116         int crtc_hadjusted;
117         int crtc_vadjusted;
118
119         /* Driver private mode info */
120         int private_size;
121         int *private;
122         int private_flags;
123
124         int vrefresh;
125         float hsync;
126 };
127
128 /* Video mode flags */
129 #define V_PHSYNC        (1<<0)
130 #define V_NHSYNC        (1<<1)
131 #define V_PVSYNC        (1<<2)
132 #define V_NVSYNC        (1<<3)
133 #define V_INTERLACE     (1<<4)
134 #define V_DBLSCAN       (1<<5)
135 #define V_CSYNC         (1<<6)
136 #define V_PCSYNC        (1<<7)
137 #define V_NCSYNC        (1<<8)
138 #define V_HSKEW         (1<<9) /* hskew provided */
139 #define V_BCAST         (1<<10)
140 #define V_PIXMUX        (1<<11)
141 #define V_DBLCLK        (1<<12)
142 #define V_CLKDIV2       (1<<13)
143
144 #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */
145
146 #define DPMSModeOn 0
147 #define DPMSModeStandby 1
148 #define DPMSModeSuspend 2
149 #define DPMSModeOff 3
150
151 #define ConnectorUnknown 0
152 #define ConnectorVGA 1
153 #define ConnectorDVII 2
154 #define ConnectorDVID 3
155 #define ConnectorDVIA 4
156 #define ConnectorComposite 5
157 #define ConnectorSVIDEO 6
158 #define ConnectorLVDS 7
159 #define ConnectorComponent 8
160 #define Connector9PinDIN 9
161 #define ConnectorDisplayPort 10
162 #define ConnectorHDMIA 11
163 #define ConnectorHDMIB 12
164
165 enum drm_output_status {
166         output_status_connected = 1,
167         output_status_disconnected = 2,
168         output_status_unknown = 3,
169 };
170
171 enum subpixel_order {
172         SubPixelUnknown = 0,
173         SubPixelHorizontalRGB,
174         SubPixelHorizontalBGR,
175         SubPixelVerticalRGB,
176         SubPixelVerticalBGR,
177         SubPixelNone,
178 };
179
180 /*
181  * Describes a given display (e.g. CRT or flat panel) and its limitations.
182  */
183 struct drm_display_info {
184         char name[DRM_DISPLAY_INFO_LEN];
185         /* Input info */
186         bool serration_vsync;
187         bool sync_on_green;
188         bool composite_sync;
189         bool separate_syncs;
190         bool blank_to_black;
191         unsigned char video_level;
192         bool digital;
193         /* Physical size */
194         unsigned int width_mm;
195         unsigned int height_mm;
196
197         /* Display parameters */
198         unsigned char gamma; /* FIXME: storage format */
199         bool gtf_supported;
200         bool standard_color;
201         enum {
202                 monochrome,
203                 rgb,
204                 other,
205                 unknown,
206         } display_type;
207         bool active_off_supported;
208         bool suspend_supported;
209         bool standby_supported;
210
211         /* Color info FIXME: storage format */
212         unsigned short redx, redy;
213         unsigned short greenx, greeny;
214         unsigned short bluex, bluey;
215         unsigned short whitex, whitey;
216
217         /* Clock limits FIXME: storage format */
218         unsigned int min_vfreq, max_vfreq;
219         unsigned int min_hfreq, max_hfreq;
220         unsigned int pixel_clock;
221
222         /* White point indices FIXME: storage format */
223         unsigned int wpx1, wpy1;
224         unsigned int wpgamma1;
225         unsigned int wpx2, wpy2;
226         unsigned int wpgamma2;
227
228         /* Preferred mode (if any) */
229         struct drm_display_mode *preferred_mode;
230         char *raw_edid; /* if any */
231 };
232
233 struct drm_framebuffer {
234         struct drm_device *dev;
235         struct list_head head;
236         int id; /* idr assigned */
237         unsigned int pitch;
238         unsigned long offset;
239         unsigned int width;
240         unsigned int height;
241         /* depth can be 15 or 16 */
242         unsigned int depth;
243         int bits_per_pixel;
244         int flags;
245         struct drm_buffer_object *bo;
246         void *fbdev;
247         u32 pseudo_palette[17];
248         void *virtual_base;
249         struct list_head filp_head;
250 };
251
252 struct drm_property_blob {
253         struct list_head head;
254         unsigned int length;
255         unsigned int id;
256         void *data;
257 };
258
259 struct drm_property_enum {
260         uint64_t value;
261         struct list_head head;
262         unsigned char name[DRM_PROP_NAME_LEN];
263 };
264
265 struct drm_property {
266         struct list_head head;
267         int id; /* idr assigned */
268         uint32_t flags;
269         char name[DRM_PROP_NAME_LEN];
270         uint32_t num_values;
271         uint64_t *values;
272
273         struct list_head enum_blob_list;
274 };
275
276 struct drm_crtc;
277 struct drm_output;
278
279 /**
280  * drm_crtc_funcs - control CRTCs for a given device
281  * @dpms: control display power levels
282  * @save: save CRTC state
283  * @resore: restore CRTC state
284  * @lock: lock the CRTC
285  * @unlock: unlock the CRTC
286  * @shadow_allocate: allocate shadow pixmap
287  * @shadow_create: create shadow pixmap for rotation support
288  * @shadow_destroy: free shadow pixmap
289  * @mode_fixup: fixup proposed mode
290  * @mode_set: set the desired mode on the CRTC
291  * @gamma_set: specify color ramp for CRTC
292  * @cleanup: cleanup driver private state prior to close
293  *
294  * The drm_crtc_funcs structure is the central CRTC management structure
295  * in the DRM.  Each CRTC controls one or more outputs (note that the name
296  * CRTC is simply historical, a CRTC may control LVDS, VGA, DVI, TV out, etc.
297  * outputs, not just CRTs).
298  *
299  * Each driver is responsible for filling out this structure at startup time,
300  * in addition to providing other modesetting features, like i2c and DDC
301  * bus accessors.
302  */
303 struct drm_crtc_funcs {
304         /*
305          * Control power levels on the CRTC.  If the mode passed in is
306          * unsupported, the provider must use the next lowest power level.
307          */
308         void (*dpms)(struct drm_crtc *crtc, int mode);
309
310         /* JJJ:  Are these needed? */
311         /* Save CRTC state */
312         void (*save)(struct drm_crtc *crtc); /* suspend? */
313         /* Restore CRTC state */
314         void (*restore)(struct drm_crtc *crtc); /* resume? */
315         bool (*lock)(struct drm_crtc *crtc);
316         void (*unlock)(struct drm_crtc *crtc);
317
318         void (*prepare)(struct drm_crtc *crtc);
319         void (*commit)(struct drm_crtc *crtc);
320
321         /* Provider can fixup or change mode timings before modeset occurs */
322         bool (*mode_fixup)(struct drm_crtc *crtc,
323                            struct drm_display_mode *mode,
324                            struct drm_display_mode *adjusted_mode);
325         /* Actually set the mode */
326         void (*mode_set)(struct drm_crtc *crtc, struct drm_display_mode *mode,
327                          struct drm_display_mode *adjusted_mode, int x, int y);
328
329         /* Move the crtc on the current fb to the given position *optional* */
330         void (*mode_set_base)(struct drm_crtc *crtc, int x, int y);
331
332         /* Set gamma on the CRTC */
333         void (*gamma_set)(struct drm_crtc *crtc, u16 r, u16 g, u16 b,
334                           int regno);
335         /* Driver cleanup routine */
336         void (*cleanup)(struct drm_crtc *crtc);
337 };
338
339 /**
340  * drm_crtc - central CRTC control structure
341  * @enabled: is this CRTC enabled?
342  * @x: x position on screen
343  * @y: y position on screen
344  * @desired_mode: new desired mode
345  * @desired_x: desired x for desired_mode
346  * @desired_y: desired y for desired_mode
347  * @funcs: CRTC control functions
348  * @driver_private: arbitrary driver data
349  *
350  * Each CRTC may have one or more outputs associated with it.  This structure
351  * allows the CRTC to be controlled.
352  */
353 struct drm_crtc {
354         struct drm_device *dev;
355         struct list_head head;
356
357         int id; /* idr assigned */
358
359         /* framebuffer the output is currently bound to */
360         struct drm_framebuffer *fb;
361
362         bool enabled;
363
364         /* JJJ: are these needed? */
365         bool cursor_in_range;
366         bool cursor_shown;
367
368         struct drm_display_mode mode;
369
370         int x, y;
371         struct drm_display_mode *desired_mode;
372         int desired_x, desired_y;
373         const struct drm_crtc_funcs *funcs;
374         void *driver_private;
375
376         /* RRCrtcPtr randr_crtc? */
377 };
378
379 extern struct drm_crtc *drm_crtc_create(struct drm_device *dev,
380                                         const struct drm_crtc_funcs *funcs);
381
382 /**
383  * drm_output_funcs - control outputs on a given device
384  * @init: setup this output
385  * @dpms: set power state (see drm_crtc_funcs above)
386  * @save: save output state
387  * @restore: restore output state
388  * @mode_valid: is this mode valid on the given output?
389  * @mode_fixup: try to fixup proposed mode for this output
390  * @mode_set: set this mode
391  * @detect: is this output active?
392  * @get_modes: get mode list for this output
393  * @set_property: property for this output may need update
394  * @cleanup: output is going away, cleanup
395  *
396  * Each CRTC may have one or more outputs attached to it.  The functions
397  * below allow the core DRM code to control outputs, enumerate available modes,
398  * etc.
399  */
400 struct drm_output_funcs {
401         void (*init)(struct drm_output *output);
402         void (*dpms)(struct drm_output *output, int mode);
403         void (*save)(struct drm_output *output);
404         void (*restore)(struct drm_output *output);
405         int (*mode_valid)(struct drm_output *output,
406                           struct drm_display_mode *mode);
407         bool (*mode_fixup)(struct drm_output *output,
408                            struct drm_display_mode *mode,
409                            struct drm_display_mode *adjusted_mode);
410         void (*prepare)(struct drm_output *output);
411         void (*commit)(struct drm_output *output);
412         void (*mode_set)(struct drm_output *output,
413                          struct drm_display_mode *mode,
414                          struct drm_display_mode *adjusted_mode);
415         enum drm_output_status (*detect)(struct drm_output *output);
416         int (*get_modes)(struct drm_output *output);
417         /* JJJ: type checking for properties via property value type */
418         bool (*set_property)(struct drm_output *output, struct drm_property *property,
419                              uint64_t val);
420         void (*cleanup)(struct drm_output *output);
421 };
422
423 #define DRM_OUTPUT_MAX_UMODES 16
424 #define DRM_OUTPUT_MAX_PROPERTY 16
425 #define DRM_OUTPUT_LEN 32
426 /**
427  * drm_output - central DRM output control structure
428  * @crtc: CRTC this output is currently connected to, NULL if none
429  * @possible_crtcs: bitmap of CRTCS this output could be attached to
430  * @possible_clones: bitmap of possible outputs this output could clone
431  * @interlace_allowed: can this output handle interlaced modes?
432  * @doublescan_allowed: can this output handle doublescan?
433  * @available_modes: modes available on this output (from get_modes() + user)
434  * @initial_x: initial x position for this output
435  * @initial_y: initial y position for this output
436  * @status: output connected?
437  * @subpixel_order: for this output
438  * @mm_width: displayable width of output in mm
439  * @mm_height: displayable height of output in mm
440  * @funcs: output control functions
441  * @driver_private: private driver data
442  *
443  * Each output may be connected to one or more CRTCs, or may be clonable by
444  * another output if they can share a CRTC.  Each output also has a specific
445  * position in the broader display (referred to as a 'screen' though it could
446  * span multiple monitors).
447  */
448 struct drm_output {
449         struct drm_device *dev;
450         struct list_head head;
451         struct drm_crtc *crtc;
452         int id; /* idr assigned */
453
454         int output_type;
455         int output_type_id;
456         unsigned long possible_crtcs;
457         unsigned long possible_clones;
458         bool interlace_allowed;
459         bool doublescan_allowed;
460         struct list_head modes; /* list of modes on this output */
461
462         /*
463           OptionInfoPtr options;
464           XF86ConfMonitorPtr conf_monitor;
465          */
466         int initial_x, initial_y;
467         enum drm_output_status status;
468
469         /* these are modes added by probing with DDC or the BIOS */
470         struct list_head probed_modes;
471         
472         /* xf86MonPtr MonInfo; */
473         enum subpixel_order subpixel_order;
474         int mm_width, mm_height;
475         struct drm_display_info *monitor_info; /* if any */
476         const struct drm_output_funcs *funcs;
477         void *driver_private;
478   uint32_t make_shit_work;
479         struct list_head user_modes;
480         struct drm_property_blob *edid_blob_ptr;
481         u32 property_ids[DRM_OUTPUT_MAX_PROPERTY];
482         uint64_t property_values[DRM_OUTPUT_MAX_PROPERTY];
483 };
484
485 /**
486  * struct drm_mode_config_funcs - configure CRTCs for a given screen layout
487  * @resize: adjust CRTCs as necessary for the proposed layout
488  *
489  * Currently only a resize hook is available.  DRM will call back into the
490  * driver with a new screen width and height.  If the driver can't support
491  * the proposed size, it can return false.  Otherwise it should adjust
492  * the CRTC<->output mappings as needed and update its view of the screen.
493  */
494 struct drm_mode_config_funcs {
495         bool (*resize)(struct drm_device *dev, int width, int height);
496 };
497
498 /**
499  * drm_mode_config - Mode configuration control structure
500  *
501  */
502 struct drm_mode_config {
503         struct mutex mutex; /* protects configuration and IDR */
504         struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, output, modes - just makes life easier */
505         /* this is limited to one for now */
506         int num_fb;
507         struct list_head fb_list;
508         int num_output;
509         struct list_head output_list;
510
511         /* int compat_output? */
512         int num_crtc;
513         struct list_head crtc_list;
514
515         struct list_head property_list;
516
517         int min_width, min_height;
518         int max_width, max_height;
519         /* DamagePtr rotationDamage? */
520         /* DGA stuff? */
521         struct drm_mode_config_funcs *funcs;
522         unsigned long fb_base;
523
524         /* pointers to standard properties */
525         struct list_head property_blob_list;
526         struct drm_property *edid_property;
527         struct drm_property *dpms_property;
528         struct drm_property *connector_type_property;
529         struct drm_property *connector_num_property;
530 };
531
532 struct drm_output *drm_output_create(struct drm_device *dev,
533                                      const struct drm_output_funcs *funcs,
534                                      int type);
535
536 extern char *drm_get_output_name(struct drm_output *output);
537 extern void drm_output_destroy(struct drm_output *output);
538 extern void drm_fb_release(struct file *filp);
539
540 extern struct edid *drm_get_edid(struct drm_output *output,
541                                  struct i2c_adapter *adapter);
542 extern int drm_add_edid_modes(struct drm_output *output, struct edid *edid);
543 extern void drm_mode_probed_add(struct drm_output *output, struct drm_display_mode *mode);
544 extern void drm_mode_remove(struct drm_output *output, struct drm_display_mode *mode);
545 extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
546                                                    struct drm_display_mode *mode);
547 extern void drm_mode_debug_printmodeline(struct drm_device *dev,
548                                          struct drm_display_mode *mode);
549 extern void drm_mode_config_init(struct drm_device *dev);
550 extern void drm_mode_config_cleanup(struct drm_device *dev);
551 extern void drm_mode_set_name(struct drm_display_mode *mode);
552 extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2);
553 extern void drm_disable_unused_functions(struct drm_device *dev);
554
555 /* for us by fb module */
556 extern int drm_mode_attachmode_crtc(struct drm_device *dev,
557                                     struct drm_crtc *crtc,
558                                     struct drm_display_mode *mode);
559 extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode);
560
561 extern struct drm_display_mode *drm_mode_create(struct drm_device *dev);
562 extern void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
563 extern void drm_mode_list_concat(struct list_head *head,
564                                  struct list_head *new);
565 extern void drm_mode_validate_size(struct drm_device *dev,
566                                    struct list_head *mode_list,
567                                    int maxX, int maxY, int maxPitch);
568 extern void drm_mode_prune_invalid(struct drm_device *dev,
569                                    struct list_head *mode_list, bool verbose);
570 extern void drm_mode_sort(struct list_head *mode_list);
571 extern int drm_mode_vrefresh(struct drm_display_mode *mode);
572 extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
573                                   int adjust_flags);
574 extern void drm_mode_output_list_update(struct drm_output *output);
575 extern int drm_mode_output_update_edid_property(struct drm_output *output, unsigned char *edid);
576 extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev);
577 extern bool drm_initial_config(struct drm_device *dev, bool cangrow);
578 extern void drm_framebuffer_set_object(struct drm_device *dev,
579                                        unsigned long handle);
580 extern struct drm_framebuffer *drm_framebuffer_create(struct drm_device *dev);
581 extern void drm_framebuffer_destroy(struct drm_framebuffer *fb);
582 extern int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
583 extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
584 extern bool drm_crtc_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode,
585                        int x, int y);
586 extern int drm_hotplug_stage_two(struct drm_device *dev, struct drm_output *output);
587
588 extern int drm_output_attach_property(struct drm_output *output,
589                                       struct drm_property *property, uint64_t init_val);
590 extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
591                                                 const char *name, int num_values);
592 extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
593 extern int drm_property_add_enum(struct drm_property *property, int index, 
594                                  uint64_t value, const char *name);
595
596 /* IOCTLs */
597 extern int drm_mode_getresources(struct drm_device *dev,
598                                  void *data, struct drm_file *file_priv);
599
600 extern int drm_mode_getcrtc(struct drm_device *dev,
601                             void *data, struct drm_file *file_priv);
602 extern int drm_mode_getoutput(struct drm_device *dev,
603                               void *data, struct drm_file *file_priv);
604 extern int drm_mode_setcrtc(struct drm_device *dev,
605                             void *data, struct drm_file *file_priv);
606 extern int drm_mode_addfb(struct drm_device *dev,
607                           void *data, struct drm_file *file_priv);
608 extern int drm_mode_rmfb(struct drm_device *dev,
609                          void *data, struct drm_file *file_priv);
610 extern int drm_mode_getfb(struct drm_device *dev,
611                           void *data, struct drm_file *file_priv);
612 extern int drm_mode_addmode_ioctl(struct drm_device *dev,
613                                   void *data, struct drm_file *file_priv);
614 extern int drm_mode_rmmode_ioctl(struct drm_device *dev,
615                                  void *data, struct drm_file *file_priv);
616 extern int drm_mode_attachmode_ioctl(struct drm_device *dev,
617                                      void *data, struct drm_file *file_priv);
618 extern int drm_mode_detachmode_ioctl(struct drm_device *dev,
619                                      void *data, struct drm_file *file_priv);
620
621 extern int drm_mode_getproperty_ioctl(struct drm_device *dev,
622                                       void *data, struct drm_file *file_priv);
623 extern int drm_mode_getblob_ioctl(struct drm_device *dev,
624                                   void *data, struct drm_file *file_priv);
625 extern int drm_mode_output_property_set_ioctl(struct drm_device *dev,
626                                               void *data, struct drm_file *file_priv);
627 #endif /* __DRM_CRTC_H__ */
628