2 * Copyright © 2006 Keith Packard
3 * Copyright © 2007 Intel Corporation
4 * Jesse Barnes <jesse.barnes@intel.com>
10 #include <linux/spinlock.h>
11 #include <linux/types.h>
12 #include <linux/idr.h>
18 struct drm_framebuffer;
21 #define DRM_MODE_OBJECT_CRTC 0xcccccccc
22 #define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0
23 #define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0
24 #define DRM_MODE_OBJECT_MODE 0xdededede
25 #define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0
26 #define DRM_MODE_OBJECT_FB 0xfbfbfbfb
27 #define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb
29 struct drm_mode_object {
35 * Note on terminology: here, for brevity and convenience, we refer to connector
36 * control chips as 'CRTCs'. They can control any type of connector, VGA, LVDS,
37 * DVI, etc. And 'screen' refers to the whole of the visible display, which
38 * may span multiple monitors (and therefore multiple CRTC and connector
42 enum drm_mode_status {
43 MODE_OK = 0, /* Mode OK */
44 MODE_HSYNC, /* hsync out of range */
45 MODE_VSYNC, /* vsync out of range */
46 MODE_H_ILLEGAL, /* mode has illegal horizontal timings */
47 MODE_V_ILLEGAL, /* mode has illegal horizontal timings */
48 MODE_BAD_WIDTH, /* requires an unsupported linepitch */
49 MODE_NOMODE, /* no mode with a maching name */
50 MODE_NO_INTERLACE, /* interlaced mode not supported */
51 MODE_NO_DBLESCAN, /* doublescan mode not supported */
52 MODE_NO_VSCAN, /* multiscan mode not supported */
53 MODE_MEM, /* insufficient video memory */
54 MODE_VIRTUAL_X, /* mode width too large for specified virtual size */
55 MODE_VIRTUAL_Y, /* mode height too large for specified virtual size */
56 MODE_MEM_VIRT, /* insufficient video memory given virtual size */
57 MODE_NOCLOCK, /* no fixed clock available */
58 MODE_CLOCK_HIGH, /* clock required is too high */
59 MODE_CLOCK_LOW, /* clock required is too low */
60 MODE_CLOCK_RANGE, /* clock/mode isn't in a ClockRange */
61 MODE_BAD_HVALUE, /* horizontal timing was out of range */
62 MODE_BAD_VVALUE, /* vertical timing was out of range */
63 MODE_BAD_VSCAN, /* VScan value out of range */
64 MODE_HSYNC_NARROW, /* horizontal sync too narrow */
65 MODE_HSYNC_WIDE, /* horizontal sync too wide */
66 MODE_HBLANK_NARROW, /* horizontal blanking too narrow */
67 MODE_HBLANK_WIDE, /* horizontal blanking too wide */
68 MODE_VSYNC_NARROW, /* vertical sync too narrow */
69 MODE_VSYNC_WIDE, /* vertical sync too wide */
70 MODE_VBLANK_NARROW, /* vertical blanking too narrow */
71 MODE_VBLANK_WIDE, /* vertical blanking too wide */
72 MODE_PANEL, /* exceeds panel dimensions */
73 MODE_INTERLACE_WIDTH, /* width too large for interlaced mode */
74 MODE_ONE_WIDTH, /* only one width is supported */
75 MODE_ONE_HEIGHT, /* only one height is supported */
76 MODE_ONE_SIZE, /* only one resolution is supported */
77 MODE_NO_REDUCED, /* monitor doesn't accept reduced blanking */
78 MODE_UNVERIFIED = -3, /* mode needs to reverified */
79 MODE_BAD = -2, /* unspecified reason */
80 MODE_ERROR = -1 /* error condition */
83 #define DRM_MODE_TYPE_CLOCK_CRTC_C (DRM_MODE_TYPE_CLOCK_C | \
86 #define DRM_MODE(nm, t, c, hd, hss, hse, ht, hsk, vd, vss, vse, vt, vs, f) \
87 .name = nm, .status = 0, .type = (t), .clock = (c), \
88 .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \
89 .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \
90 .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \
91 .vscan = (vs), .flags = (f), .vrefresh = 0
93 struct drm_display_mode {
95 struct list_head head;
96 struct drm_mode_object base;
98 char name[DRM_DISPLAY_MODE_LEN];
101 enum drm_mode_status status;
104 /* Proposed mode values */
118 /* Addressable image size (may be 0 for projectors, etc.) */
122 /* Actual mode we give to hw */
126 int crtc_hblank_start;
128 int crtc_hsync_start;
133 int crtc_vblank_start;
135 int crtc_vsync_start;
141 /* Driver private mode info */
150 /* Video mode flags */
151 #define V_PHSYNC (1<<0)
152 #define V_NHSYNC (1<<1)
153 #define V_PVSYNC (1<<2)
154 #define V_NVSYNC (1<<3)
155 #define V_INTERLACE (1<<4)
156 #define V_DBLSCAN (1<<5)
157 #define V_CSYNC (1<<6)
158 #define V_PCSYNC (1<<7)
159 #define V_NCSYNC (1<<8)
160 #define V_HSKEW (1<<9) /* hskew provided */
161 #define V_BCAST (1<<10)
162 #define V_PIXMUX (1<<11)
163 #define V_DBLCLK (1<<12)
164 #define V_CLKDIV2 (1<<13)
166 #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */
169 #define DPMSModeStandby 1
170 #define DPMSModeSuspend 2
171 #define DPMSModeOff 3
173 #define DRM_MODE_CONNECTOR_Unknown 0
174 #define DRM_MODE_CONNECTOR_VGA 1
175 #define DRM_MODE_CONNECTOR_DVII 2
176 #define DRM_MODE_CONNECTOR_DVID 3
177 #define DRM_MODE_CONNECTOR_DVIA 4
178 #define DRM_MODE_CONNECTOR_Composite 5
179 #define DRM_MODE_CONNECTOR_SVIDEO 6
180 #define DRM_MODE_CONNECTOR_LVDS 7
181 #define DRM_MODE_CONNECTOR_Component 8
182 #define DRM_MODE_CONNECTOR_9PinDIN 9
183 #define DRM_MODE_CONNECTOR_DisplayPort 10
184 #define DRM_MODE_CONNECTOR_HDMIA 11
185 #define DRM_MODE_CONNECTOR_HDMIB 12
187 enum drm_connector_status {
188 connector_status_connected = 1,
189 connector_status_disconnected = 2,
190 connector_status_unknown = 3,
193 enum subpixel_order {
195 SubPixelHorizontalRGB,
196 SubPixelHorizontalBGR,
204 * Describes a given display (e.g. CRT or flat panel) and its limitations.
206 struct drm_display_info {
207 char name[DRM_DISPLAY_INFO_LEN];
209 bool serration_vsync;
214 unsigned char video_level;
217 unsigned int width_mm;
218 unsigned int height_mm;
220 /* Display parameters */
221 unsigned char gamma; /* FIXME: storage format */
230 bool active_off_supported;
231 bool suspend_supported;
232 bool standby_supported;
234 /* Color info FIXME: storage format */
235 unsigned short redx, redy;
236 unsigned short greenx, greeny;
237 unsigned short bluex, bluey;
238 unsigned short whitex, whitey;
240 /* Clock limits FIXME: storage format */
241 unsigned int min_vfreq, max_vfreq;
242 unsigned int min_hfreq, max_hfreq;
243 unsigned int pixel_clock;
245 /* White point indices FIXME: storage format */
246 unsigned int wpx1, wpy1;
247 unsigned int wpgamma1;
248 unsigned int wpx2, wpy2;
249 unsigned int wpgamma2;
251 enum subpixel_order subpixel_order;
253 char *raw_edid; /* if any */
256 struct drm_framebuffer_funcs {
257 void (*destroy)(struct drm_framebuffer *framebuffer);
260 struct drm_framebuffer {
261 struct drm_device *dev;
262 struct list_head head;
263 struct drm_mode_object base;
264 const struct drm_framebuffer_funcs *funcs;
268 /* depth can be 15 or 16 */
273 u32 pseudo_palette[17];
274 struct list_head filp_head;
278 struct drm_property_blob {
279 struct drm_mode_object base;
280 struct list_head head;
285 struct drm_property_enum {
287 struct list_head head;
288 char name[DRM_PROP_NAME_LEN];
291 struct drm_property {
292 struct list_head head;
293 struct drm_mode_object base;
295 char name[DRM_PROP_NAME_LEN];
299 struct list_head enum_blob_list;
303 struct drm_connector;
307 * drm_crtc_funcs - control CRTCs for a given device
308 * @dpms: control display power levels
309 * @save: save CRTC state
310 * @resore: restore CRTC state
311 * @lock: lock the CRTC
312 * @unlock: unlock the CRTC
313 * @shadow_allocate: allocate shadow pixmap
314 * @shadow_create: create shadow pixmap for rotation support
315 * @shadow_destroy: free shadow pixmap
316 * @mode_fixup: fixup proposed mode
317 * @mode_set: set the desired mode on the CRTC
318 * @gamma_set: specify color ramp for CRTC
319 * @destroy: deinit and free object.
321 * The drm_crtc_funcs structure is the central CRTC management structure
322 * in the DRM. Each CRTC controls one or more connectors (note that the name
323 * CRTC is simply historical, a CRTC may control LVDS, VGA, DVI, TV out, etc.
324 * connectors, not just CRTs).
326 * Each driver is responsible for filling out this structure at startup time,
327 * in addition to providing other modesetting features, like i2c and DDC
330 struct drm_crtc_funcs {
331 /* Save CRTC state */
332 void (*save)(struct drm_crtc *crtc); /* suspend? */
333 /* Restore CRTC state */
334 void (*restore)(struct drm_crtc *crtc); /* resume? */
336 /* cursor controls */
337 int (*cursor_set)(struct drm_crtc *crtc, uint32_t buffer_handle,
338 uint32_t width, uint32_t height);
339 int (*cursor_move)(struct drm_crtc *crtc, int x, int y);
341 /* Set gamma on the CRTC */
342 void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
344 /* Object destroy routine */
345 void (*destroy)(struct drm_crtc *crtc);
347 int (*set_config)(struct drm_mode_set *set);
351 * drm_crtc - central CRTC control structure
352 * @enabled: is this CRTC enabled?
353 * @x: x position on screen
354 * @y: y position on screen
355 * @desired_mode: new desired mode
356 * @desired_x: desired x for desired_mode
357 * @desired_y: desired y for desired_mode
358 * @funcs: CRTC control functions
360 * Each CRTC may have one or more connectors associated with it. This structure
361 * allows the CRTC to be controlled.
364 struct drm_device *dev;
365 struct list_head head;
367 struct drm_mode_object base;
369 /* framebuffer the connector is currently bound to */
370 struct drm_framebuffer *fb;
374 struct drm_display_mode mode;
377 struct drm_display_mode *desired_mode;
378 int desired_x, desired_y;
379 const struct drm_crtc_funcs *funcs;
381 /* CRTC gamma size for reporting to userspace */
383 uint16_t *gamma_store;
385 /* if you are using the helper */
386 void *helper_private;
391 * drm_connector_funcs - control connectors on a given device
392 * @dpms: set power state (see drm_crtc_funcs above)
393 * @save: save connector state
394 * @restore: restore connector state
395 * @mode_valid: is this mode valid on the given connector?
396 * @mode_fixup: try to fixup proposed mode for this connector
397 * @mode_set: set this mode
398 * @detect: is this connector active?
399 * @get_modes: get mode list for this connector
400 * @set_property: property for this connector may need update
401 * @destroy: make object go away
403 * Each CRTC may have one or more connectors attached to it. The functions
404 * below allow the core DRM code to control connectors, enumerate available modes,
407 struct drm_connector_funcs {
408 void (*dpms)(struct drm_connector *connector, int mode);
409 void (*save)(struct drm_connector *connector);
410 void (*restore)(struct drm_connector *connector);
411 enum drm_connector_status (*detect)(struct drm_connector *connector);
412 void (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
413 bool (*set_property)(struct drm_connector *connector, struct drm_property *property,
415 void (*destroy)(struct drm_connector *connector);
418 struct drm_encoder_funcs {
419 void (*destroy)(struct drm_encoder *encoder);
422 #define DRM_CONNECTOR_MAX_UMODES 16
423 #define DRM_CONNECTOR_MAX_PROPERTY 16
424 #define DRM_CONNECTOR_LEN 32
425 #define DRM_CONNECTOR_MAX_ENCODER 2
428 * drm_encoder - central DRM encoder structure
431 struct drm_device *dev;
432 struct list_head head;
434 struct drm_mode_object base;
436 uint32_t possible_crtcs;
437 uint32_t possible_clones;
439 struct drm_crtc *crtc;
440 const struct drm_encoder_funcs *funcs;
441 void *helper_private;
445 * drm_connector - central DRM connector control structure
446 * @crtc: CRTC this connector is currently connected to, NULL if none
447 * @interlace_allowed: can this connector handle interlaced modes?
448 * @doublescan_allowed: can this connector handle doublescan?
449 * @available_modes: modes available on this connector (from get_modes() + user)
450 * @initial_x: initial x position for this connector
451 * @initial_y: initial y position for this connector
452 * @status: connector connected?
453 * @funcs: connector control functions
455 * Each connector may be connected to one or more CRTCs, or may be clonable by
456 * another connector if they can share a CRTC. Each connector also has a specific
457 * position in the broader display (referred to as a 'screen' though it could
458 * span multiple monitors).
460 struct drm_connector {
461 struct drm_device *dev;
463 struct device_attribute *attr;
464 struct list_head head;
466 struct drm_mode_object base;
469 int connector_type_id;
470 bool interlace_allowed;
471 bool doublescan_allowed;
472 struct list_head modes; /* list of modes on this connector */
474 int initial_x, initial_y;
475 enum drm_connector_status status;
477 /* these are modes added by probing with DDC or the BIOS */
478 struct list_head probed_modes;
480 struct drm_display_info display_info;
481 const struct drm_connector_funcs *funcs;
483 struct list_head user_modes;
484 struct drm_property_blob *edid_blob_ptr;
485 u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY];
486 uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY];
488 void *helper_private;
490 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
491 uint32_t force_encoder_id;
492 struct drm_encoder *encoder; /* currently active encoder */
496 * struct drm_mode_set
498 * Represents a single crtc the connectors that it drives with what mode
499 * and from which framebuffer it scans out from.
501 * This is used to set modes.
503 struct drm_mode_set {
504 struct list_head head;
506 struct drm_framebuffer *fb;
507 struct drm_crtc *crtc;
508 struct drm_display_mode *mode;
513 struct drm_connector **connectors;
514 size_t num_connectors;
518 * struct drm_mode_config_funcs - configure CRTCs for a given screen layout
519 * @resize: adjust CRTCs as necessary for the proposed layout
521 * Currently only a resize hook is available. DRM will call back into the
522 * driver with a new screen width and height. If the driver can't support
523 * the proposed size, it can return false. Otherwise it should adjust
524 * the CRTC<->connector mappings as needed and update its view of the screen.
526 struct drm_mode_config_funcs {
527 int (*resize_fb)(struct drm_device *dev, struct drm_file *file_priv, struct drm_framebuffer *fb, struct drm_mode_fb_cmd *mode_cmd);
528 struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd);
529 int (*fb_changed)(struct drm_device *dev);
532 struct drm_mode_group {
534 uint32_t num_encoders;
535 uint32_t num_connectors;
537 /* list of object IDs for this group */
542 * drm_mode_config - Mode configuration control structure
545 struct drm_mode_config {
546 struct mutex mutex; /* protects configuration and IDR */
547 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */
548 /* this is limited to one for now */
550 struct list_head fb_list;
552 struct list_head connector_list;
554 struct list_head encoder_list;
557 struct list_head crtc_list;
559 struct list_head property_list;
561 /* in-kernel framebuffers - hung of filp_head in drm_framebuffer */
562 struct list_head fb_kernel_list;
564 /* currently in use generation id */
565 int current_generation;
567 int min_width, min_height;
568 int max_width, max_height;
569 struct drm_mode_config_funcs *funcs;
570 unsigned long fb_base;
572 /* pointers to standard properties */
573 struct list_head property_blob_list;
574 struct drm_property *edid_property;
575 struct drm_property *dpms_property;
578 struct drm_property *tv_mode_property;
579 struct drm_property *tv_left_margin_property;
580 struct drm_property *tv_right_margin_property;
581 struct drm_property *tv_top_margin_property;
582 struct drm_property *tv_bottom_margin_property;
585 uint32_t hotplug_counter;
588 #define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
589 #define obj_to_connector(x) container_of(x, struct drm_connector, base)
590 #define obj_to_encoder(x) container_of(x, struct drm_encoder, base)
591 #define obj_to_mode(x) container_of(x, struct drm_display_mode, base)
592 #define obj_to_fb(x) container_of(x, struct drm_framebuffer, base)
593 #define obj_to_property(x) container_of(x, struct drm_property, base)
594 #define obj_to_blob(x) container_of(x, struct drm_property_blob, base)
597 extern void drm_crtc_init(struct drm_device *dev,
598 struct drm_crtc *crtc,
599 const struct drm_crtc_funcs *funcs);
600 extern void drm_crtc_cleanup(struct drm_crtc *crtc);
602 extern void drm_connector_init(struct drm_device *dev,
603 struct drm_connector *connector,
604 const struct drm_connector_funcs *funcs,
607 extern void drm_connector_cleanup(struct drm_connector *connector);
609 extern void drm_encoder_init(struct drm_device *dev,
610 struct drm_encoder *encoder,
611 const struct drm_encoder_funcs *funcs,
614 extern void drm_encoder_cleanup(struct drm_encoder *encoder);
616 extern char *drm_get_connector_name(struct drm_connector *connector);
617 extern char *drm_get_dpms_name(int val);
618 extern void drm_fb_release(struct file *filp);
619 extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
620 extern struct edid *drm_get_edid(struct drm_connector *connector,
621 struct i2c_adapter *adapter);
622 extern unsigned char *drm_do_probe_ddc_edid(struct i2c_adapter *adapter);
623 extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
624 extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
625 extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode);
626 extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
627 struct drm_display_mode *mode);
628 extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
629 extern void drm_mode_config_init(struct drm_device *dev);
630 extern void drm_mode_config_cleanup(struct drm_device *dev);
631 extern void drm_mode_set_name(struct drm_display_mode *mode);
632 extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2);
634 /* for us by fb module */
635 extern int drm_mode_attachmode_crtc(struct drm_device *dev,
636 struct drm_crtc *crtc,
637 struct drm_display_mode *mode);
638 extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode);
640 extern struct drm_display_mode *drm_mode_create(struct drm_device *dev);
641 extern void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
642 extern void drm_mode_list_concat(struct list_head *head,
643 struct list_head *new);
644 extern void drm_mode_validate_size(struct drm_device *dev,
645 struct list_head *mode_list,
646 int maxX, int maxY, int maxPitch);
647 extern void drm_mode_prune_invalid(struct drm_device *dev,
648 struct list_head *mode_list, bool verbose);
649 extern void drm_mode_sort(struct list_head *mode_list);
650 extern int drm_mode_vrefresh(struct drm_display_mode *mode);
651 extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
653 extern void drm_mode_connector_list_update(struct drm_connector *connector);
654 extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
656 extern int drm_connector_property_set_value(struct drm_connector *connector,
657 struct drm_property *property,
659 extern int drm_connector_property_get_value(struct drm_connector *connector,
660 struct drm_property *property,
662 extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev);
663 extern void drm_framebuffer_set_object(struct drm_device *dev,
664 unsigned long handle);
665 extern struct drm_framebuffer *drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb,
666 const struct drm_framebuffer_funcs *funcs);
667 extern void drm_framebuffer_cleanup(struct drm_framebuffer *fb);
668 extern int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
669 extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
670 extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY);
671 extern bool drm_crtc_in_use(struct drm_crtc *crtc);
673 extern int drm_connector_attach_property(struct drm_connector *connector,
674 struct drm_property *property, uint64_t init_val);
675 extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
676 const char *name, int num_values);
677 extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
678 extern int drm_property_add_enum(struct drm_property *property, int index,
679 uint64_t value, const char *name);
680 extern bool drm_create_tv_properties(struct drm_device *dev, int num_formats,
682 extern char *drm_get_encoder_name(struct drm_encoder *encoder);
684 extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
685 struct drm_encoder *encoder);
686 extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
687 struct drm_encoder *encoder);
688 extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
691 extern int drm_mode_getresources(struct drm_device *dev,
692 void *data, struct drm_file *file_priv);
694 extern int drm_mode_getcrtc(struct drm_device *dev,
695 void *data, struct drm_file *file_priv);
696 extern int drm_mode_getconnector(struct drm_device *dev,
697 void *data, struct drm_file *file_priv);
698 extern int drm_mode_setcrtc(struct drm_device *dev,
699 void *data, struct drm_file *file_priv);
700 extern int drm_mode_cursor_ioctl(struct drm_device *dev,
701 void *data, struct drm_file *file_priv);
702 extern int drm_mode_addfb(struct drm_device *dev,
703 void *data, struct drm_file *file_priv);
704 extern int drm_mode_rmfb(struct drm_device *dev,
705 void *data, struct drm_file *file_priv);
706 extern int drm_mode_getfb(struct drm_device *dev,
707 void *data, struct drm_file *file_priv);
708 extern int drm_mode_addmode_ioctl(struct drm_device *dev,
709 void *data, struct drm_file *file_priv);
710 extern int drm_mode_rmmode_ioctl(struct drm_device *dev,
711 void *data, struct drm_file *file_priv);
712 extern int drm_mode_attachmode_ioctl(struct drm_device *dev,
713 void *data, struct drm_file *file_priv);
714 extern int drm_mode_detachmode_ioctl(struct drm_device *dev,
715 void *data, struct drm_file *file_priv);
717 extern int drm_mode_getproperty_ioctl(struct drm_device *dev,
718 void *data, struct drm_file *file_priv);
719 extern int drm_mode_getblob_ioctl(struct drm_device *dev,
720 void *data, struct drm_file *file_priv);
721 extern int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
722 void *data, struct drm_file *file_priv);
723 extern int drm_mode_hotplug_ioctl(struct drm_device *dev,
724 void *data, struct drm_file *file_priv);
725 extern int drm_mode_replacefb(struct drm_device *dev,
726 void *data, struct drm_file *file_priv);
727 extern int drm_mode_getencoder(struct drm_device *dev,
728 void *data, struct drm_file *file_priv);
729 extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
730 void *data, struct drm_file *file_priv);
731 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
732 void *data, struct drm_file *file_priv);
733 #endif /* __DRM_CRTC_H__ */