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 #define CRTC_INTERLACE_HALVE_V 0x1 /* halve V values for interlacing */
95 struct drm_display_mode {
97 struct list_head head;
98 struct drm_mode_object base;
100 char name[DRM_DISPLAY_MODE_LEN];
103 enum drm_mode_status status;
106 /* Proposed mode values */
120 /* Addressable image size (may be 0 for projectors, etc.) */
124 /* Actual mode we give to hw */
128 int crtc_hblank_start;
130 int crtc_hsync_start;
135 int crtc_vblank_start;
137 int crtc_vsync_start;
143 /* Driver private mode info */
152 enum drm_connector_status {
153 connector_status_connected = 1,
154 connector_status_disconnected = 2,
155 connector_status_unknown = 3,
158 enum subpixel_order {
160 SubPixelHorizontalRGB,
161 SubPixelHorizontalBGR,
169 * Describes a given display (e.g. CRT or flat panel) and its limitations.
171 struct drm_display_info {
172 char name[DRM_DISPLAY_INFO_LEN];
174 bool serration_vsync;
179 unsigned char video_level;
182 unsigned int width_mm;
183 unsigned int height_mm;
185 /* Display parameters */
186 unsigned char gamma; /* FIXME: storage format */
195 bool active_off_supported;
196 bool suspend_supported;
197 bool standby_supported;
199 /* Color info FIXME: storage format */
200 unsigned short redx, redy;
201 unsigned short greenx, greeny;
202 unsigned short bluex, bluey;
203 unsigned short whitex, whitey;
205 /* Clock limits FIXME: storage format */
206 unsigned int min_vfreq, max_vfreq;
207 unsigned int min_hfreq, max_hfreq;
208 unsigned int pixel_clock;
210 /* White point indices FIXME: storage format */
211 unsigned int wpx1, wpy1;
212 unsigned int wpgamma1;
213 unsigned int wpx2, wpy2;
214 unsigned int wpgamma2;
216 enum subpixel_order subpixel_order;
218 char *raw_edid; /* if any */
221 struct drm_framebuffer_funcs {
222 void (*destroy)(struct drm_framebuffer *framebuffer);
223 int (*create_handle)(struct drm_framebuffer *fb,
224 struct drm_file *file_priv,
225 unsigned int *handle);
228 struct drm_framebuffer {
229 struct drm_device *dev;
230 struct list_head head;
231 struct drm_mode_object base;
232 const struct drm_framebuffer_funcs *funcs;
236 /* depth can be 15 or 16 */
241 u32 pseudo_palette[17];
242 struct list_head filp_head;
245 struct drm_property_blob {
246 struct drm_mode_object base;
247 struct list_head head;
252 struct drm_property_enum {
254 struct list_head head;
255 char name[DRM_PROP_NAME_LEN];
258 struct drm_property {
259 struct list_head head;
260 struct drm_mode_object base;
262 char name[DRM_PROP_NAME_LEN];
266 struct list_head enum_blob_list;
270 struct drm_connector;
274 * drm_crtc_funcs - control CRTCs for a given device
275 * @dpms: control display power levels
276 * @save: save CRTC state
277 * @resore: restore CRTC state
278 * @lock: lock the CRTC
279 * @unlock: unlock the CRTC
280 * @shadow_allocate: allocate shadow pixmap
281 * @shadow_create: create shadow pixmap for rotation support
282 * @shadow_destroy: free shadow pixmap
283 * @mode_fixup: fixup proposed mode
284 * @mode_set: set the desired mode on the CRTC
285 * @gamma_set: specify color ramp for CRTC
286 * @destroy: deinit and free object.
288 * The drm_crtc_funcs structure is the central CRTC management structure
289 * in the DRM. Each CRTC controls one or more connectors (note that the name
290 * CRTC is simply historical, a CRTC may control LVDS, VGA, DVI, TV out, etc.
291 * connectors, not just CRTs).
293 * Each driver is responsible for filling out this structure at startup time,
294 * in addition to providing other modesetting features, like i2c and DDC
297 struct drm_crtc_funcs {
298 /* Save CRTC state */
299 void (*save)(struct drm_crtc *crtc); /* suspend? */
300 /* Restore CRTC state */
301 void (*restore)(struct drm_crtc *crtc); /* resume? */
303 /* cursor controls */
304 int (*cursor_set)(struct drm_crtc *crtc, struct drm_file *file_priv,
305 uint32_t handle, uint32_t width, uint32_t height);
306 int (*cursor_move)(struct drm_crtc *crtc, int x, int y);
308 /* Set gamma on the CRTC */
309 void (*gamma_set)(struct drm_crtc *crtc, u16 *r, u16 *g, u16 *b,
311 /* Object destroy routine */
312 void (*destroy)(struct drm_crtc *crtc);
314 int (*set_config)(struct drm_mode_set *set);
318 * drm_crtc - central CRTC control structure
319 * @enabled: is this CRTC enabled?
320 * @x: x position on screen
321 * @y: y position on screen
322 * @desired_mode: new desired mode
323 * @desired_x: desired x for desired_mode
324 * @desired_y: desired y for desired_mode
325 * @funcs: CRTC control functions
327 * Each CRTC may have one or more connectors associated with it. This structure
328 * allows the CRTC to be controlled.
331 struct drm_device *dev;
332 struct list_head head;
334 struct drm_mode_object base;
336 /* framebuffer the connector is currently bound to */
337 struct drm_framebuffer *fb;
341 struct drm_display_mode mode;
344 struct drm_display_mode *desired_mode;
345 int desired_x, desired_y;
346 const struct drm_crtc_funcs *funcs;
348 /* CRTC gamma size for reporting to userspace */
350 uint16_t *gamma_store;
352 /* if you are using the helper */
353 void *helper_private;
358 * drm_connector_funcs - control connectors on a given device
359 * @dpms: set power state (see drm_crtc_funcs above)
360 * @save: save connector state
361 * @restore: restore connector state
362 * @mode_valid: is this mode valid on the given connector?
363 * @mode_fixup: try to fixup proposed mode for this connector
364 * @mode_set: set this mode
365 * @detect: is this connector active?
366 * @get_modes: get mode list for this connector
367 * @set_property: property for this connector may need update
368 * @destroy: make object go away
370 * Each CRTC may have one or more connectors attached to it. The functions
371 * below allow the core DRM code to control connectors, enumerate available modes,
374 struct drm_connector_funcs {
375 void (*dpms)(struct drm_connector *connector, int mode);
376 void (*save)(struct drm_connector *connector);
377 void (*restore)(struct drm_connector *connector);
378 enum drm_connector_status (*detect)(struct drm_connector *connector);
379 void (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
380 int (*set_property)(struct drm_connector *connector, struct drm_property *property,
382 void (*destroy)(struct drm_connector *connector);
385 struct drm_encoder_funcs {
386 void (*destroy)(struct drm_encoder *encoder);
389 #define DRM_CONNECTOR_MAX_UMODES 16
390 #define DRM_CONNECTOR_MAX_PROPERTY 16
391 #define DRM_CONNECTOR_LEN 32
392 #define DRM_CONNECTOR_MAX_ENCODER 2
395 * drm_encoder - central DRM encoder structure
398 struct drm_device *dev;
399 struct list_head head;
401 struct drm_mode_object base;
403 uint32_t possible_crtcs;
404 uint32_t possible_clones;
406 struct drm_crtc *crtc;
407 const struct drm_encoder_funcs *funcs;
408 void *helper_private;
412 * drm_connector - central DRM connector control structure
413 * @crtc: CRTC this connector is currently connected to, NULL if none
414 * @interlace_allowed: can this connector handle interlaced modes?
415 * @doublescan_allowed: can this connector handle doublescan?
416 * @available_modes: modes available on this connector (from get_modes() + user)
417 * @initial_x: initial x position for this connector
418 * @initial_y: initial y position for this connector
419 * @status: connector connected?
420 * @funcs: connector control functions
422 * Each connector may be connected to one or more CRTCs, or may be clonable by
423 * another connector if they can share a CRTC. Each connector also has a specific
424 * position in the broader display (referred to as a 'screen' though it could
425 * span multiple monitors).
427 struct drm_connector {
428 struct drm_device *dev;
430 struct device_attribute *attr;
431 struct list_head head;
433 struct drm_mode_object base;
436 int connector_type_id;
437 bool interlace_allowed;
438 bool doublescan_allowed;
439 struct list_head modes; /* list of modes on this connector */
441 int initial_x, initial_y;
442 enum drm_connector_status status;
444 /* these are modes added by probing with DDC or the BIOS */
445 struct list_head probed_modes;
447 struct drm_display_info display_info;
448 const struct drm_connector_funcs *funcs;
450 struct list_head user_modes;
451 struct drm_property_blob *edid_blob_ptr;
452 u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY];
453 uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY];
455 void *helper_private;
457 uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
458 uint32_t force_encoder_id;
459 struct drm_encoder *encoder; /* currently active encoder */
463 * struct drm_mode_set
465 * Represents a single crtc the connectors that it drives with what mode
466 * and from which framebuffer it scans out from.
468 * This is used to set modes.
470 struct drm_mode_set {
471 struct list_head head;
473 struct drm_framebuffer *fb;
474 struct drm_crtc *crtc;
475 struct drm_display_mode *mode;
480 struct drm_connector **connectors;
481 size_t num_connectors;
485 * struct drm_mode_config_funcs - configure CRTCs for a given screen layout
486 * @resize: adjust CRTCs as necessary for the proposed layout
488 * Currently only a resize hook is available. DRM will call back into the
489 * driver with a new screen width and height. If the driver can't support
490 * the proposed size, it can return false. Otherwise it should adjust
491 * the CRTC<->connector mappings as needed and update its view of the screen.
493 struct drm_mode_config_funcs {
494 int (*resize_fb)(struct drm_device *dev, struct drm_file *file_priv, struct drm_framebuffer *fb, struct drm_mode_fb_cmd *mode_cmd);
495 struct drm_framebuffer *(*fb_create)(struct drm_device *dev, struct drm_file *file_priv, struct drm_mode_fb_cmd *mode_cmd);
496 int (*fb_changed)(struct drm_device *dev);
499 struct drm_mode_group {
501 uint32_t num_encoders;
502 uint32_t num_connectors;
504 /* list of object IDs for this group */
509 * drm_mode_config - Mode configuration control structure
512 struct drm_mode_config {
513 struct mutex mutex; /* protects configuration and IDR */
514 struct idr crtc_idr; /* use this idr for all IDs, fb, crtc, connector, modes - just makes life easier */
515 /* this is limited to one for now */
517 struct list_head fb_list;
519 struct list_head connector_list;
521 struct list_head encoder_list;
524 struct list_head crtc_list;
526 struct list_head property_list;
528 /* in-kernel framebuffers - hung of filp_head in drm_framebuffer */
529 struct list_head fb_kernel_list;
531 int min_width, min_height;
532 int max_width, max_height;
533 struct drm_mode_config_funcs *funcs;
534 unsigned long fb_base;
536 /* pointers to standard properties */
537 struct list_head property_blob_list;
538 struct drm_property *edid_property;
539 struct drm_property *dpms_property;
541 /* DVI-I properties */
542 struct drm_property *dvi_i_subconnector_property;
543 struct drm_property *dvi_i_select_subconnector_property;
546 struct drm_property *tv_subconnector_property;
547 struct drm_property *tv_select_subconnector_property;
548 struct drm_property *tv_mode_property;
549 struct drm_property *tv_left_margin_property;
550 struct drm_property *tv_right_margin_property;
551 struct drm_property *tv_top_margin_property;
552 struct drm_property *tv_bottom_margin_property;
554 /* Optional properties */
555 struct drm_property *scaling_mode_property;
556 struct drm_property *dithering_mode_property;
559 uint32_t hotplug_counter;
562 #define obj_to_crtc(x) container_of(x, struct drm_crtc, base)
563 #define obj_to_connector(x) container_of(x, struct drm_connector, base)
564 #define obj_to_encoder(x) container_of(x, struct drm_encoder, base)
565 #define obj_to_mode(x) container_of(x, struct drm_display_mode, base)
566 #define obj_to_fb(x) container_of(x, struct drm_framebuffer, base)
567 #define obj_to_property(x) container_of(x, struct drm_property, base)
568 #define obj_to_blob(x) container_of(x, struct drm_property_blob, base)
571 extern void drm_crtc_init(struct drm_device *dev,
572 struct drm_crtc *crtc,
573 const struct drm_crtc_funcs *funcs);
574 extern void drm_crtc_cleanup(struct drm_crtc *crtc);
576 extern void drm_connector_init(struct drm_device *dev,
577 struct drm_connector *connector,
578 const struct drm_connector_funcs *funcs,
581 extern void drm_connector_cleanup(struct drm_connector *connector);
583 extern void drm_encoder_init(struct drm_device *dev,
584 struct drm_encoder *encoder,
585 const struct drm_encoder_funcs *funcs,
588 extern void drm_encoder_cleanup(struct drm_encoder *encoder);
590 extern char *drm_get_connector_name(struct drm_connector *connector);
591 extern char *drm_get_dpms_name(int val);
592 extern char *drm_get_select_subconnector_name(int val);
593 extern char *drm_get_subconnector_name(int val);
594 extern void drm_fb_release(struct file *filp);
595 extern int drm_mode_group_init_legacy_group(struct drm_device *dev, struct drm_mode_group *group);
596 extern struct edid *drm_get_edid(struct drm_connector *connector,
597 struct i2c_adapter *adapter);
598 extern unsigned char *drm_do_probe_ddc_edid(struct i2c_adapter *adapter);
599 extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid);
600 extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode);
601 extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode);
602 extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
603 struct drm_display_mode *mode);
604 extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode);
605 extern void drm_mode_config_init(struct drm_device *dev);
606 extern void drm_mode_config_cleanup(struct drm_device *dev);
607 extern void drm_mode_set_name(struct drm_display_mode *mode);
608 extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2);
609 extern int drm_mode_width(struct drm_display_mode *mode);
610 extern int drm_mode_height(struct drm_display_mode *mode);
612 /* for us by fb module */
613 extern int drm_mode_attachmode_crtc(struct drm_device *dev,
614 struct drm_crtc *crtc,
615 struct drm_display_mode *mode);
616 extern int drm_mode_detachmode_crtc(struct drm_device *dev, struct drm_display_mode *mode);
618 extern struct drm_display_mode *drm_mode_create(struct drm_device *dev);
619 extern void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode);
620 extern void drm_mode_list_concat(struct list_head *head,
621 struct list_head *new);
622 extern void drm_mode_validate_size(struct drm_device *dev,
623 struct list_head *mode_list,
624 int maxX, int maxY, int maxPitch);
625 extern void drm_mode_prune_invalid(struct drm_device *dev,
626 struct list_head *mode_list, bool verbose);
627 extern void drm_mode_sort(struct list_head *mode_list);
628 extern int drm_mode_vrefresh(struct drm_display_mode *mode);
629 extern void drm_mode_set_crtcinfo(struct drm_display_mode *p,
631 extern void drm_mode_connector_list_update(struct drm_connector *connector);
632 extern int drm_mode_connector_update_edid_property(struct drm_connector *connector,
634 extern int drm_connector_property_set_value(struct drm_connector *connector,
635 struct drm_property *property,
637 extern int drm_connector_property_get_value(struct drm_connector *connector,
638 struct drm_property *property,
640 extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev);
641 extern void drm_framebuffer_set_object(struct drm_device *dev,
642 unsigned long handle);
643 extern struct drm_framebuffer *drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb,
644 const struct drm_framebuffer_funcs *funcs);
645 extern void drm_framebuffer_cleanup(struct drm_framebuffer *fb);
646 extern int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc);
647 extern int drmfb_remove(struct drm_device *dev, struct drm_framebuffer *fb);
648 extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY);
649 extern bool drm_crtc_in_use(struct drm_crtc *crtc);
651 extern int drm_connector_attach_property(struct drm_connector *connector,
652 struct drm_property *property, uint64_t init_val);
653 extern struct drm_property *drm_property_create(struct drm_device *dev, int flags,
654 const char *name, int num_values);
655 extern void drm_property_destroy(struct drm_device *dev, struct drm_property *property);
656 extern int drm_property_add_enum(struct drm_property *property, int index,
657 uint64_t value, const char *name);
658 extern int drm_mode_create_dvi_i_properties(struct drm_device *dev);
659 extern int drm_mode_create_tv_properties(struct drm_device *dev, int num_formats,
661 extern int drm_mode_create_scaling_mode_property(struct drm_device *dev);
662 extern int drm_mode_create_dithering_property(struct drm_device *dev);
663 extern char *drm_get_encoder_name(struct drm_encoder *encoder);
665 extern int drm_mode_connector_attach_encoder(struct drm_connector *connector,
666 struct drm_encoder *encoder);
667 extern void drm_mode_connector_detach_encoder(struct drm_connector *connector,
668 struct drm_encoder *encoder);
669 extern bool drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc,
671 extern void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type);
673 extern int drm_mode_getresources(struct drm_device *dev,
674 void *data, struct drm_file *file_priv);
676 extern int drm_mode_getcrtc(struct drm_device *dev,
677 void *data, struct drm_file *file_priv);
678 extern int drm_mode_getconnector(struct drm_device *dev,
679 void *data, struct drm_file *file_priv);
680 extern int drm_mode_setcrtc(struct drm_device *dev,
681 void *data, struct drm_file *file_priv);
682 extern int drm_mode_cursor_ioctl(struct drm_device *dev,
683 void *data, struct drm_file *file_priv);
684 extern int drm_mode_addfb(struct drm_device *dev,
685 void *data, struct drm_file *file_priv);
686 extern int drm_mode_rmfb(struct drm_device *dev,
687 void *data, struct drm_file *file_priv);
688 extern int drm_mode_getfb(struct drm_device *dev,
689 void *data, struct drm_file *file_priv);
690 extern int drm_mode_addmode_ioctl(struct drm_device *dev,
691 void *data, struct drm_file *file_priv);
692 extern int drm_mode_rmmode_ioctl(struct drm_device *dev,
693 void *data, struct drm_file *file_priv);
694 extern int drm_mode_attachmode_ioctl(struct drm_device *dev,
695 void *data, struct drm_file *file_priv);
696 extern int drm_mode_detachmode_ioctl(struct drm_device *dev,
697 void *data, struct drm_file *file_priv);
699 extern int drm_mode_getproperty_ioctl(struct drm_device *dev,
700 void *data, struct drm_file *file_priv);
701 extern int drm_mode_getblob_ioctl(struct drm_device *dev,
702 void *data, struct drm_file *file_priv);
703 extern int drm_mode_connector_property_set_ioctl(struct drm_device *dev,
704 void *data, struct drm_file *file_priv);
705 extern int drm_mode_hotplug_ioctl(struct drm_device *dev,
706 void *data, struct drm_file *file_priv);
707 extern int drm_mode_replacefb(struct drm_device *dev,
708 void *data, struct drm_file *file_priv);
709 extern int drm_mode_getencoder(struct drm_device *dev,
710 void *data, struct drm_file *file_priv);
711 extern int drm_mode_gamma_get_ioctl(struct drm_device *dev,
712 void *data, struct drm_file *file_priv);
713 extern int drm_mode_gamma_set_ioctl(struct drm_device *dev,
714 void *data, struct drm_file *file_priv);
715 #endif /* __DRM_CRTC_H__ */