54e0c0005d6912d082a014616f768109f223483b
[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         /* Set gamma on the CRTC */
329         void (*gamma_set)(struct drm_crtc *crtc, u16 r, u16 g, u16 b,
330                           int regno);
331         /* Driver cleanup routine */
332         void (*cleanup)(struct drm_crtc *crtc);
333 };
334
335 /**
336  * drm_crtc - central CRTC control structure
337  * @enabled: is this CRTC enabled?
338  * @x: x position on screen
339  * @y: y position on screen
340  * @desired_mode: new desired mode
341  * @desired_x: desired x for desired_mode
342  * @desired_y: desired y for desired_mode
343  * @funcs: CRTC control functions
344  * @driver_private: arbitrary driver data
345  *
346  * Each CRTC may have one or more outputs associated with it.  This structure
347  * allows the CRTC to be controlled.
348  */
349 struct drm_crtc {
350         struct drm_device *dev;
351         struct list_head head;
352
353         int id; /* idr assigned */
354
355         /* framebuffer the output is currently bound to */
356         struct drm_framebuffer *fb;
357
358         bool enabled;
359
360         /* JJJ: are these needed? */
361         bool cursor_in_range;
362         bool cursor_shown;
363
364         struct drm_display_mode mode;
365
366         int x, y;
367         struct drm_display_mode *desired_mode;
368         int desired_x, desired_y;
369         const struct drm_crtc_funcs *funcs;
370         void *driver_private;
371
372         /* RRCrtcPtr randr_crtc? */
373 };
374
375 extern struct drm_crtc *drm_crtc_create(struct drm_device *dev,
376                                         const struct drm_crtc_funcs *funcs);
377
378 /**
379  * drm_output_funcs - control outputs on a given device
380  * @init: setup this output
381  * @dpms: set power state (see drm_crtc_funcs above)
382  * @save: save output state
383  * @restore: restore output state
384  * @mode_valid: is this mode valid on the given output?
385  * @mode_fixup: try to fixup proposed mode for this output
386  * @mode_set: set this mode
387  * @detect: is this output active?
388  * @get_modes: get mode list for this output
389  * @set_property: property for this output may need update
390  * @cleanup: output is going away, cleanup
391  *
392  * Each CRTC may have one or more outputs attached to it.  The functions
393  * below allow the core DRM code to control outputs, enumerate available modes,
394  * etc.
395  */
396 struct drm_output_funcs {
397         void (*init)(struct drm_output *output);
398         void (*dpms)(struct drm_output *output, int mode);
399         void (*save)(struct drm_output *output);
400         void (*restore)(struct drm_output *output);
401         int (*mode_valid)(struct drm_output *output,
402                           struct drm_display_mode *mode);
403         bool (*mode_fixup)(struct drm_output *output,
404                            struct drm_display_mode *mode,
405                            struct drm_display_mode *adjusted_mode);
406         void (*prepare)(struct drm_output *output);
407         void (*commit)(struct drm_output *output);
408         void (*mode_set)(struct drm_output *output,
409                          struct drm_display_mode *mode,
410                          struct drm_display_mode *adjusted_mode);
411         enum drm_output_status (*detect)(struct drm_output *output);
412         int (*get_modes)(struct drm_output *output);
413         /* JJJ: type checking for properties via property value type */
414         bool (*set_property)(struct drm_output *output, struct drm_property *property,
415                              uint64_t val);
416         void (*cleanup)(struct drm_output *output);
417 };
418
419 #define DRM_OUTPUT_MAX_UMODES 16
420 #define DRM_OUTPUT_MAX_PROPERTY 16
421 #define DRM_OUTPUT_LEN 32
422 /**
423  * drm_output - central DRM output control structure
424  * @crtc: CRTC this output is currently connected to, NULL if none
425  * @possible_crtcs: bitmap of CRTCS this output could be attached to
426  * @possible_clones: bitmap of possible outputs this output could clone
427  * @interlace_allowed: can this output handle interlaced modes?
428  * @doublescan_allowed: can this output handle doublescan?
429  * @available_modes: modes available on this output (from get_modes() + user)
430  * @initial_x: initial x position for this output
431  * @initial_y: initial y position for this output
432  * @status: output connected?
433  * @subpixel_order: for this output
434  * @mm_width: displayable width of output in mm
435  * @mm_height: displayable height of output in mm
436  * @funcs: output control functions
437  * @driver_private: private driver data
438  *
439  * Each output may be connected to one or more CRTCs, or may be clonable by
440  * another output if they can share a CRTC.  Each output also has a specific
441  * position in the broader display (referred to as a 'screen' though it could
442  * span multiple monitors).
443  */
444 struct drm_output {
445         struct drm_device *dev;
446         struct list_head head;
447         struct drm_crtc *crtc;
448         int id; /* idr assigned */
449
450         int output_type;
451         int output_type_id;
452         unsigned long possible_crtcs;
453         unsigned long possible_clones;
454         bool interlace_allowed;
455         bool doublescan_allowed;
456         struct list_head modes; /* list of modes on this output */
457
458         /*
459           OptionInfoPtr options;
460           XF86ConfMonitorPtr conf_monitor;
461          */
462         int initial_x, initial_y;
463         enum drm_output_status status;
464
465         /* these are modes added by probing with DDC or the BIOS */
466         struct list_head probed_modes;
467         
468         /* xf86MonPtr MonInfo; */
469         enum subpixel_order subpixel_order;
470         int mm_width, mm_height;
471         struct drm_display_info *monitor_info; /* if any */
472         const struct drm_output_funcs *funcs;
473         void *driver_private;
474   uint32_t make_shit_work;
475         struct list_head user_modes;
476         struct drm_property_blob *edid_blob_ptr;
477         u32 property_ids[DRM_OUTPUT_MAX_PROPERTY];
478         uint64_t property_values[DRM_OUTPUT_MAX_PROPERTY];
479 };
480
481 /**
482  * struct drm_mode_config_funcs - configure CRTCs for a given screen layout
483  * @resize: adjust CRTCs as necessary for the proposed layout
484  *
485  * Currently only a resize hook is available.  DRM will call back into the
486  * driver with a new screen width and height.  If the driver can't support
487  * the proposed size, it can return false.  Otherwise it should adjust
488  * the CRTC<->output mappings as needed and update its view of the screen.
489  */
490 struct drm_mode_config_funcs {
491         bool (*resize)(struct drm_device *dev, int width, int height);
492 };
493
494 /**
495  * drm_mode_config - Mode configuration control structure
496  *
497  */
498 struct drm_mode_config {
499         struct mutex mutex; /* protects configuration and IDR */
500         struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, output, modes - just makes life easier */
501         /* this is limited to one for now */
502         int num_fb;
503         struct list_head fb_list;
504         int num_output;
505         struct list_head output_list;
506
507         /* int compat_output? */
508         int num_crtc;
509         struct list_head crtc_list;
510
511         struct list_head property_list;
512
513         int min_width, min_height;
514         int max_width, max_height;
515         /* DamagePtr rotationDamage? */
516         /* DGA stuff? */
517         struct drm_mode_config_funcs *funcs;
518         unsigned long fb_base;
519
520         /* pointers to standard properties */
521         struct list_head property_blob_list;
522         struct drm_property *edid_property;
523         struct drm_property *dpms_property;
524         struct drm_property *connector_type_property;
525         struct drm_property *connector_num_property;
526 };
527
528 struct drm_output *drm_output_create(struct drm_device *dev,
529                                      const struct drm_output_funcs *funcs,
530                                      int type);
531
532 extern char *drm_get_output_name(struct drm_output *output);
533 extern void drm_output_destroy(struct drm_output *output);
534 extern void drm_fb_release(struct file *filp);
535
536 extern struct edid *drm_get_edid(struct drm_output *output,
537                                  struct i2c_adapter *adapter);
538 extern int drm_add_edid_modes(struct drm_output *output, struct edid *edid);
539 extern void drm_mode_probed_add(struct drm_output *output, struct drm_display_mode *mode);
540 extern void drm_mode_remove(struct drm_output *output, struct drm_display_mode *mode);
541 extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
542                                                    struct drm_display_mode *mode);
543 extern void drm_mode_debug_printmodeline(struct drm_device *dev,
544                                          struct drm_display_mode *mode);
545 extern void drm_mode_config_init(struct drm_device *dev);
546 extern void drm_mode_config_cleanup(struct drm_device *dev);
547 extern void drm_mode_set_name(struct drm_display_mode *mode);
548 extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2);
549 extern void drm_disable_unused_functions(struct drm_device *dev);
550
551 /* for us by fb module */
552 extern int drm_mode_attachmode_crtc(struct drm_device *dev,
553                                     struct drm_crtc *crtc,
554                                     struct drm_display_mode *mode);
555 extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode);
556
557 extern struct drm_display_mode *drm_mode_create(struct drm_device *dev);
558 extern void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
559 extern void drm_mode_list_concat(struct list_head *head,
560                                  struct list_head *new);
561 extern void drm_mode_validate_size(struct drm_device *dev,
562                                    struct list_head *mode_list,
563                                    int maxX, int maxY, int maxPitch);
564 extern void drm_mode_prune_invalid(struct drm_device *dev,
565                                    struct list_head *mode_list, bool verbose);
566 extern void drm_mode_sort(struct list_head *mode_list);
567 extern int drm_mode_vrefresh(struct drm_display_mode *mode);
568 extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
569                                   int adjust_flags);
570 extern void drm_mode_output_list_update(struct drm_output *output);
571 extern int drm_mode_output_update_edid_property(struct drm_output *output, unsigned char *edid);
572 extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev);
573 extern bool drm_initial_config(struct drm_device *dev, bool cangrow);
574 extern void drm_framebuffer_set_object(struct drm_device *dev,
575                                        unsigned long handle);
576 extern struct drm_framebuffer *drm_framebuffer_create(struct drm_device *dev);
577 extern void drm_framebuffer_destroy(struct drm_framebuffer *fb);
578 extern int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
579 extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
580 extern bool drm_crtc_set_mode(struct drm_crtc *crtc, struct drm_display_mode *mode,
581                        int x, int y);
582 extern int drm_hotplug_stage_two(struct drm_device *dev, struct drm_output *output);
583
584 extern int drm_output_attach_property(struct drm_output *output,
585                                       struct drm_property *property, uint64_t init_val);
586 extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
587                                                 const char *name, int num_values);
588 extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
589 extern int drm_property_add_enum(struct drm_property *property, int index, 
590                                  uint64_t value, const char *name);
591
592 /* IOCTLs */
593 extern int drm_mode_getresources(struct drm_device *dev,
594                                  void *data, struct drm_file *file_priv);
595
596 extern int drm_mode_getcrtc(struct drm_device *dev,
597                             void *data, struct drm_file *file_priv);
598 extern int drm_mode_getoutput(struct drm_device *dev,
599                               void *data, struct drm_file *file_priv);
600 extern int drm_mode_setcrtc(struct drm_device *dev,
601                             void *data, struct drm_file *file_priv);
602 extern int drm_mode_addfb(struct drm_device *dev,
603                           void *data, struct drm_file *file_priv);
604 extern int drm_mode_rmfb(struct drm_device *dev,
605                          void *data, struct drm_file *file_priv);
606 extern int drm_mode_getfb(struct drm_device *dev,
607                           void *data, struct drm_file *file_priv);
608 extern int drm_mode_addmode_ioctl(struct drm_device *dev,
609                                   void *data, struct drm_file *file_priv);
610 extern int drm_mode_rmmode_ioctl(struct drm_device *dev,
611                                  void *data, struct drm_file *file_priv);
612 extern int drm_mode_attachmode_ioctl(struct drm_device *dev,
613                                      void *data, struct drm_file *file_priv);
614 extern int drm_mode_detachmode_ioctl(struct drm_device *dev,
615                                      void *data, struct drm_file *file_priv);
616
617 extern int drm_mode_getproperty_ioctl(struct drm_device *dev,
618                                       void *data, struct drm_file *file_priv);
619 extern int drm_mode_getblob_ioctl(struct drm_device *dev,
620                                   void *data, struct drm_file *file_priv);
621 extern int drm_mode_output_property_set_ioctl(struct drm_device *dev,
622                                               void *data, struct drm_file *file_priv);
623 #endif /* __DRM_CRTC_H__ */
624