drm: Remove display_info->min/max_(h|v)max
[cascardo/linux.git] / include / drm / drm_connector.h
1 /*
2  * Copyright (c) 2016 Intel Corporation
3  *
4  * Permission to use, copy, modify, distribute, and sell this software and its
5  * documentation for any purpose is hereby granted without fee, provided that
6  * the above copyright notice appear in all copies and that both that copyright
7  * notice and this permission notice appear in supporting documentation, and
8  * that the name of the copyright holders not be used in advertising or
9  * publicity pertaining to distribution of the software without specific,
10  * written prior permission.  The copyright holders make no representations
11  * about the suitability of this software for any purpose.  It is provided "as
12  * is" without express or implied warranty.
13  *
14  * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15  * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16  * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17  * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
20  * OF THIS SOFTWARE.
21  */
22
23 #ifndef __DRM_CONNECTOR_H__
24 #define __DRM_CONNECTOR_H__
25
26 #include <linux/list.h>
27 #include <linux/ctype.h>
28 #include <drm/drm_modeset.h>
29
30 struct drm_connector_helper_funcs;
31 struct drm_device;
32 struct drm_crtc;
33 struct drm_encoder;
34 struct drm_property;
35 struct drm_property_blob;
36 struct edid;
37
38 enum drm_connector_force {
39         DRM_FORCE_UNSPECIFIED,
40         DRM_FORCE_OFF,
41         DRM_FORCE_ON,         /* force on analog part normally */
42         DRM_FORCE_ON_DIGITAL, /* for DVI-I use digital connector */
43 };
44
45 /**
46  * enum drm_connector_status - status for a &drm_connector
47  *
48  * This enum is used to track the connector status. There are no separate
49  * #defines for the uapi!
50  */
51 enum drm_connector_status {
52         /**
53          * @connector_status_connected: The connector is definitely connected to
54          * a sink device, and can be enabled.
55          */
56         connector_status_connected = 1,
57         /**
58          * @connector_status_disconnected: The connector isn't connected to a
59          * sink device which can be autodetect. For digital outputs like DP or
60          * HDMI (which can be realiable probed) this means there's really
61          * nothing there. It is driver-dependent whether a connector with this
62          * status can be lit up or not.
63          */
64         connector_status_disconnected = 2,
65         /**
66          * @connector_status_unknown: The connector's status could not be
67          * reliably detected. This happens when probing would either cause
68          * flicker (like load-detection when the connector is in use), or when a
69          * hardware resource isn't available (like when load-detection needs a
70          * free CRTC). It should be possible to light up the connector with one
71          * of the listed fallback modes. For default configuration userspace
72          * should only try to light up connectors with unknown status when
73          * there's not connector with @connector_status_connected.
74          */
75         connector_status_unknown = 3,
76 };
77
78 enum subpixel_order {
79         SubPixelUnknown = 0,
80         SubPixelHorizontalRGB,
81         SubPixelHorizontalBGR,
82         SubPixelVerticalRGB,
83         SubPixelVerticalBGR,
84         SubPixelNone,
85 };
86
87 /*
88  * Describes a given display (e.g. CRT or flat panel) and its limitations.
89  */
90 struct drm_display_info {
91         char name[DRM_DISPLAY_INFO_LEN];
92
93         /* Physical size */
94         unsigned int width_mm;
95         unsigned int height_mm;
96
97         unsigned int pixel_clock;
98         unsigned int bpc;
99
100         enum subpixel_order subpixel_order;
101
102 #define DRM_COLOR_FORMAT_RGB444         (1<<0)
103 #define DRM_COLOR_FORMAT_YCRCB444       (1<<1)
104 #define DRM_COLOR_FORMAT_YCRCB422       (1<<2)
105
106         u32 color_formats;
107
108         const u32 *bus_formats;
109         unsigned int num_bus_formats;
110
111 #define DRM_BUS_FLAG_DE_LOW             (1<<0)
112 #define DRM_BUS_FLAG_DE_HIGH            (1<<1)
113 /* drive data on pos. edge */
114 #define DRM_BUS_FLAG_PIXDATA_POSEDGE    (1<<2)
115 /* drive data on neg. edge */
116 #define DRM_BUS_FLAG_PIXDATA_NEGEDGE    (1<<3)
117
118         u32 bus_flags;
119
120         /* Mask of supported hdmi deep color modes */
121         u8 edid_hdmi_dc_modes;
122
123         u8 cea_rev;
124 };
125
126 /**
127  * struct drm_connector_state - mutable connector state
128  * @connector: backpointer to the connector
129  * @crtc: CRTC to connect connector to, NULL if disabled
130  * @best_encoder: can be used by helpers and drivers to select the encoder
131  * @state: backpointer to global drm_atomic_state
132  */
133 struct drm_connector_state {
134         struct drm_connector *connector;
135
136         struct drm_crtc *crtc;  /* do not write directly, use drm_atomic_set_crtc_for_connector() */
137
138         struct drm_encoder *best_encoder;
139
140         struct drm_atomic_state *state;
141 };
142
143 /**
144  * struct drm_connector_funcs - control connectors on a given device
145  *
146  * Each CRTC may have one or more connectors attached to it.  The functions
147  * below allow the core DRM code to control connectors, enumerate available modes,
148  * etc.
149  */
150 struct drm_connector_funcs {
151         /**
152          * @dpms:
153          *
154          * Legacy entry point to set the per-connector DPMS state. Legacy DPMS
155          * is exposed as a standard property on the connector, but diverted to
156          * this callback in the drm core. Note that atomic drivers don't
157          * implement the 4 level DPMS support on the connector any more, but
158          * instead only have an on/off "ACTIVE" property on the CRTC object.
159          *
160          * Drivers implementing atomic modeset should use
161          * drm_atomic_helper_connector_dpms() to implement this hook.
162          *
163          * RETURNS:
164          *
165          * 0 on success or a negative error code on failure.
166          */
167         int (*dpms)(struct drm_connector *connector, int mode);
168
169         /**
170          * @reset:
171          *
172          * Reset connector hardware and software state to off. This function isn't
173          * called by the core directly, only through drm_mode_config_reset().
174          * It's not a helper hook only for historical reasons.
175          *
176          * Atomic drivers can use drm_atomic_helper_connector_reset() to reset
177          * atomic state using this hook.
178          */
179         void (*reset)(struct drm_connector *connector);
180
181         /**
182          * @detect:
183          *
184          * Check to see if anything is attached to the connector. The parameter
185          * force is set to false whilst polling, true when checking the
186          * connector due to a user request. force can be used by the driver to
187          * avoid expensive, destructive operations during automated probing.
188          *
189          * FIXME:
190          *
191          * Note that this hook is only called by the probe helper. It's not in
192          * the helper library vtable purely for historical reasons. The only DRM
193          * core entry point to probe connector state is @fill_modes.
194          *
195          * RETURNS:
196          *
197          * drm_connector_status indicating the connector's status.
198          */
199         enum drm_connector_status (*detect)(struct drm_connector *connector,
200                                             bool force);
201
202         /**
203          * @force:
204          *
205          * This function is called to update internal encoder state when the
206          * connector is forced to a certain state by userspace, either through
207          * the sysfs interfaces or on the kernel cmdline. In that case the
208          * @detect callback isn't called.
209          *
210          * FIXME:
211          *
212          * Note that this hook is only called by the probe helper. It's not in
213          * the helper library vtable purely for historical reasons. The only DRM
214          * core entry point to probe connector state is @fill_modes.
215          */
216         void (*force)(struct drm_connector *connector);
217
218         /**
219          * @fill_modes:
220          *
221          * Entry point for output detection and basic mode validation. The
222          * driver should reprobe the output if needed (e.g. when hotplug
223          * handling is unreliable), add all detected modes to connector->modes
224          * and filter out any the device can't support in any configuration. It
225          * also needs to filter out any modes wider or higher than the
226          * parameters max_width and max_height indicate.
227          *
228          * The drivers must also prune any modes no longer valid from
229          * connector->modes. Furthermore it must update connector->status and
230          * connector->edid.  If no EDID has been received for this output
231          * connector->edid must be NULL.
232          *
233          * Drivers using the probe helpers should use
234          * drm_helper_probe_single_connector_modes() or
235          * drm_helper_probe_single_connector_modes_nomerge() to implement this
236          * function.
237          *
238          * RETURNS:
239          *
240          * The number of modes detected and filled into connector->modes.
241          */
242         int (*fill_modes)(struct drm_connector *connector, uint32_t max_width, uint32_t max_height);
243
244         /**
245          * @set_property:
246          *
247          * This is the legacy entry point to update a property attached to the
248          * connector.
249          *
250          * Drivers implementing atomic modeset should use
251          * drm_atomic_helper_connector_set_property() to implement this hook.
252          *
253          * This callback is optional if the driver does not support any legacy
254          * driver-private properties.
255          *
256          * RETURNS:
257          *
258          * 0 on success or a negative error code on failure.
259          */
260         int (*set_property)(struct drm_connector *connector, struct drm_property *property,
261                              uint64_t val);
262
263         /**
264          * @late_register:
265          *
266          * This optional hook can be used to register additional userspace
267          * interfaces attached to the connector, light backlight control, i2c,
268          * DP aux or similar interfaces. It is called late in the driver load
269          * sequence from drm_connector_register() when registering all the
270          * core drm connector interfaces. Everything added from this callback
271          * should be unregistered in the early_unregister callback.
272          *
273          * Returns:
274          *
275          * 0 on success, or a negative error code on failure.
276          */
277         int (*late_register)(struct drm_connector *connector);
278
279         /**
280          * @early_unregister:
281          *
282          * This optional hook should be used to unregister the additional
283          * userspace interfaces attached to the connector from
284          * late_unregister(). It is called from drm_connector_unregister(),
285          * early in the driver unload sequence to disable userspace access
286          * before data structures are torndown.
287          */
288         void (*early_unregister)(struct drm_connector *connector);
289
290         /**
291          * @destroy:
292          *
293          * Clean up connector resources. This is called at driver unload time
294          * through drm_mode_config_cleanup(). It can also be called at runtime
295          * when a connector is being hot-unplugged for drivers that support
296          * connector hotplugging (e.g. DisplayPort MST).
297          */
298         void (*destroy)(struct drm_connector *connector);
299
300         /**
301          * @atomic_duplicate_state:
302          *
303          * Duplicate the current atomic state for this connector and return it.
304          * The core and helpers gurantee that any atomic state duplicated with
305          * this hook and still owned by the caller (i.e. not transferred to the
306          * driver by calling ->atomic_commit() from struct
307          * &drm_mode_config_funcs) will be cleaned up by calling the
308          * @atomic_destroy_state hook in this structure.
309          *
310          * Atomic drivers which don't subclass struct &drm_connector_state should use
311          * drm_atomic_helper_connector_duplicate_state(). Drivers that subclass the
312          * state structure to extend it with driver-private state should use
313          * __drm_atomic_helper_connector_duplicate_state() to make sure shared state is
314          * duplicated in a consistent fashion across drivers.
315          *
316          * It is an error to call this hook before connector->state has been
317          * initialized correctly.
318          *
319          * NOTE:
320          *
321          * If the duplicate state references refcounted resources this hook must
322          * acquire a reference for each of them. The driver must release these
323          * references again in @atomic_destroy_state.
324          *
325          * RETURNS:
326          *
327          * Duplicated atomic state or NULL when the allocation failed.
328          */
329         struct drm_connector_state *(*atomic_duplicate_state)(struct drm_connector *connector);
330
331         /**
332          * @atomic_destroy_state:
333          *
334          * Destroy a state duplicated with @atomic_duplicate_state and release
335          * or unreference all resources it references
336          */
337         void (*atomic_destroy_state)(struct drm_connector *connector,
338                                      struct drm_connector_state *state);
339
340         /**
341          * @atomic_set_property:
342          *
343          * Decode a driver-private property value and store the decoded value
344          * into the passed-in state structure. Since the atomic core decodes all
345          * standardized properties (even for extensions beyond the core set of
346          * properties which might not be implemented by all drivers) this
347          * requires drivers to subclass the state structure.
348          *
349          * Such driver-private properties should really only be implemented for
350          * truly hardware/vendor specific state. Instead it is preferred to
351          * standardize atomic extension and decode the properties used to expose
352          * such an extension in the core.
353          *
354          * Do not call this function directly, use
355          * drm_atomic_connector_set_property() instead.
356          *
357          * This callback is optional if the driver does not support any
358          * driver-private atomic properties.
359          *
360          * NOTE:
361          *
362          * This function is called in the state assembly phase of atomic
363          * modesets, which can be aborted for any reason (including on
364          * userspace's request to just check whether a configuration would be
365          * possible). Drivers MUST NOT touch any persistent state (hardware or
366          * software) or data structures except the passed in @state parameter.
367          *
368          * Also since userspace controls in which order properties are set this
369          * function must not do any input validation (since the state update is
370          * incomplete and hence likely inconsistent). Instead any such input
371          * validation must be done in the various atomic_check callbacks.
372          *
373          * RETURNS:
374          *
375          * 0 if the property has been found, -EINVAL if the property isn't
376          * implemented by the driver (which shouldn't ever happen, the core only
377          * asks for properties attached to this connector). No other validation
378          * is allowed by the driver. The core already checks that the property
379          * value is within the range (integer, valid enum value, ...) the driver
380          * set when registering the property.
381          */
382         int (*atomic_set_property)(struct drm_connector *connector,
383                                    struct drm_connector_state *state,
384                                    struct drm_property *property,
385                                    uint64_t val);
386
387         /**
388          * @atomic_get_property:
389          *
390          * Reads out the decoded driver-private property. This is used to
391          * implement the GETCONNECTOR IOCTL.
392          *
393          * Do not call this function directly, use
394          * drm_atomic_connector_get_property() instead.
395          *
396          * This callback is optional if the driver does not support any
397          * driver-private atomic properties.
398          *
399          * RETURNS:
400          *
401          * 0 on success, -EINVAL if the property isn't implemented by the
402          * driver (which shouldn't ever happen, the core only asks for
403          * properties attached to this connector).
404          */
405         int (*atomic_get_property)(struct drm_connector *connector,
406                                    const struct drm_connector_state *state,
407                                    struct drm_property *property,
408                                    uint64_t *val);
409 };
410
411 /* mode specified on the command line */
412 struct drm_cmdline_mode {
413         bool specified;
414         bool refresh_specified;
415         bool bpp_specified;
416         int xres, yres;
417         int bpp;
418         int refresh;
419         bool rb;
420         bool interlace;
421         bool cvt;
422         bool margins;
423         enum drm_connector_force force;
424 };
425
426 /**
427  * struct drm_connector - central DRM connector control structure
428  * @dev: parent DRM device
429  * @kdev: kernel device for sysfs attributes
430  * @attr: sysfs attributes
431  * @head: list management
432  * @base: base KMS object
433  * @name: human readable name, can be overwritten by the driver
434  * @connector_type: one of the DRM_MODE_CONNECTOR_<foo> types from drm_mode.h
435  * @connector_type_id: index into connector type enum
436  * @interlace_allowed: can this connector handle interlaced modes?
437  * @doublescan_allowed: can this connector handle doublescan?
438  * @stereo_allowed: can this connector handle stereo modes?
439  * @registered: is this connector exposed (registered) with userspace?
440  * @modes: modes available on this connector (from fill_modes() + user)
441  * @status: one of the drm_connector_status enums (connected, not, or unknown)
442  * @probed_modes: list of modes derived directly from the display
443  * @funcs: connector control functions
444  * @edid_blob_ptr: DRM property containing EDID if present
445  * @properties: property tracking for this connector
446  * @dpms: current dpms state
447  * @helper_private: mid-layer private data
448  * @cmdline_mode: mode line parsed from the kernel cmdline for this connector
449  * @force: a DRM_FORCE_<foo> state for forced mode sets
450  * @override_edid: has the EDID been overwritten through debugfs for testing?
451  * @encoder_ids: valid encoders for this connector
452  * @encoder: encoder driving this connector, if any
453  * @eld: EDID-like data, if present
454  * @dvi_dual: dual link DVI, if found
455  * @max_tmds_clock: max clock rate, if found
456  * @latency_present: AV delay info from ELD, if found
457  * @video_latency: video latency info from ELD, if found
458  * @audio_latency: audio latency info from ELD, if found
459  * @null_edid_counter: track sinks that give us all zeros for the EDID
460  * @bad_edid_counter: track sinks that give us an EDID with invalid checksum
461  * @edid_corrupt: indicates whether the last read EDID was corrupt
462  * @debugfs_entry: debugfs directory for this connector
463  * @state: current atomic state for this connector
464  * @has_tile: is this connector connected to a tiled monitor
465  * @tile_group: tile group for the connected monitor
466  * @tile_is_single_monitor: whether the tile is one monitor housing
467  * @num_h_tile: number of horizontal tiles in the tile group
468  * @num_v_tile: number of vertical tiles in the tile group
469  * @tile_h_loc: horizontal location of this tile
470  * @tile_v_loc: vertical location of this tile
471  * @tile_h_size: horizontal size of this tile.
472  * @tile_v_size: vertical size of this tile.
473  *
474  * Each connector may be connected to one or more CRTCs, or may be clonable by
475  * another connector if they can share a CRTC.  Each connector also has a specific
476  * position in the broader display (referred to as a 'screen' though it could
477  * span multiple monitors).
478  */
479 struct drm_connector {
480         struct drm_device *dev;
481         struct device *kdev;
482         struct device_attribute *attr;
483         struct list_head head;
484
485         struct drm_mode_object base;
486
487         char *name;
488
489         /**
490          * @index: Compacted connector index, which matches the position inside
491          * the mode_config.list for drivers not supporting hot-add/removing. Can
492          * be used as an array index. It is invariant over the lifetime of the
493          * connector.
494          */
495         unsigned index;
496
497         int connector_type;
498         int connector_type_id;
499         bool interlace_allowed;
500         bool doublescan_allowed;
501         bool stereo_allowed;
502         bool registered;
503         struct list_head modes; /* list of modes on this connector */
504
505         enum drm_connector_status status;
506
507         /* these are modes added by probing with DDC or the BIOS */
508         struct list_head probed_modes;
509
510         /**
511          * @display_info: Display information is filled from EDID information
512          * when a display is detected. For non hot-pluggable displays such as
513          * flat panels in embedded systems, the driver should initialize the
514          * display_info.width_mm and display_info.height_mm fields with the
515          * physical size of the display.
516          */
517         struct drm_display_info display_info;
518         const struct drm_connector_funcs *funcs;
519
520         struct drm_property_blob *edid_blob_ptr;
521         struct drm_object_properties properties;
522
523         /**
524          * @path_blob_ptr:
525          *
526          * DRM blob property data for the DP MST path property.
527          */
528         struct drm_property_blob *path_blob_ptr;
529
530         /**
531          * @tile_blob_ptr:
532          *
533          * DRM blob property data for the tile property (used mostly by DP MST).
534          * This is meant for screens which are driven through separate display
535          * pipelines represented by &drm_crtc, which might not be running with
536          * genlocked clocks. For tiled panels which are genlocked, like
537          * dual-link LVDS or dual-link DSI, the driver should try to not expose
538          * the tiling and virtualize both &drm_crtc and &drm_plane if needed.
539          */
540         struct drm_property_blob *tile_blob_ptr;
541
542 /* should we poll this connector for connects and disconnects */
543 /* hot plug detectable */
544 #define DRM_CONNECTOR_POLL_HPD (1 << 0)
545 /* poll for connections */
546 #define DRM_CONNECTOR_POLL_CONNECT (1 << 1)
547 /* can cleanly poll for disconnections without flickering the screen */
548 /* DACs should rarely do this without a lot of testing */
549 #define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
550
551         /**
552          * @polled:
553          *
554          * Connector polling mode, a combination of
555          *
556          * DRM_CONNECTOR_POLL_HPD
557          *     The connector generates hotplug events and doesn't need to be
558          *     periodically polled. The CONNECT and DISCONNECT flags must not
559          *     be set together with the HPD flag.
560          *
561          * DRM_CONNECTOR_POLL_CONNECT
562          *     Periodically poll the connector for connection.
563          *
564          * DRM_CONNECTOR_POLL_DISCONNECT
565          *     Periodically poll the connector for disconnection.
566          *
567          * Set to 0 for connectors that don't support connection status
568          * discovery.
569          */
570         uint8_t polled;
571
572         /* requested DPMS state */
573         int dpms;
574
575         const struct drm_connector_helper_funcs *helper_private;
576
577         /* forced on connector */
578         struct drm_cmdline_mode cmdline_mode;
579         enum drm_connector_force force;
580         bool override_edid;
581
582 #define DRM_CONNECTOR_MAX_ENCODER 3
583         uint32_t encoder_ids[DRM_CONNECTOR_MAX_ENCODER];
584         struct drm_encoder *encoder; /* currently active encoder */
585
586 #define MAX_ELD_BYTES   128
587         /* EDID bits */
588         uint8_t eld[MAX_ELD_BYTES];
589         bool dvi_dual;
590         int max_tmds_clock;     /* in MHz */
591         bool latency_present[2];
592         int video_latency[2];   /* [0]: progressive, [1]: interlaced */
593         int audio_latency[2];
594         int null_edid_counter; /* needed to workaround some HW bugs where we get all 0s */
595         unsigned bad_edid_counter;
596
597         /* Flag for raw EDID header corruption - used in Displayport
598          * compliance testing - * Displayport Link CTS Core 1.2 rev1.1 4.2.2.6
599          */
600         bool edid_corrupt;
601
602         struct dentry *debugfs_entry;
603
604         struct drm_connector_state *state;
605
606         /* DisplayID bits */
607         bool has_tile;
608         struct drm_tile_group *tile_group;
609         bool tile_is_single_monitor;
610
611         uint8_t num_h_tile, num_v_tile;
612         uint8_t tile_h_loc, tile_v_loc;
613         uint16_t tile_h_size, tile_v_size;
614 };
615
616 #define obj_to_connector(x) container_of(x, struct drm_connector, base)
617
618 int drm_connector_init(struct drm_device *dev,
619                        struct drm_connector *connector,
620                        const struct drm_connector_funcs *funcs,
621                        int connector_type);
622 int drm_connector_register(struct drm_connector *connector);
623 void drm_connector_unregister(struct drm_connector *connector);
624 int drm_mode_connector_attach_encoder(struct drm_connector *connector,
625                                       struct drm_encoder *encoder);
626
627 void drm_connector_cleanup(struct drm_connector *connector);
628 static inline unsigned drm_connector_index(struct drm_connector *connector)
629 {
630         return connector->index;
631 }
632
633 /**
634  * drm_connector_lookup - lookup connector object
635  * @dev: DRM device
636  * @id: connector object id
637  *
638  * This function looks up the connector object specified by id
639  * add takes a reference to it.
640  */
641 static inline struct drm_connector *drm_connector_lookup(struct drm_device *dev,
642                 uint32_t id)
643 {
644         struct drm_mode_object *mo;
645         mo = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_CONNECTOR);
646         return mo ? obj_to_connector(mo) : NULL;
647 }
648
649 /**
650  * drm_connector_reference - incr the connector refcnt
651  * @connector: connector
652  *
653  * This function increments the connector's refcount.
654  */
655 static inline void drm_connector_reference(struct drm_connector *connector)
656 {
657         drm_mode_object_reference(&connector->base);
658 }
659
660 /**
661  * drm_connector_unreference - unref a connector
662  * @connector: connector to unref
663  *
664  * This function decrements the connector's refcount and frees it if it drops to zero.
665  */
666 static inline void drm_connector_unreference(struct drm_connector *connector)
667 {
668         drm_mode_object_unreference(&connector->base);
669 }
670
671 const char *drm_get_connector_status_name(enum drm_connector_status status);
672 const char *drm_get_subpixel_order_name(enum subpixel_order order);
673 const char *drm_get_dpms_name(int val);
674 const char *drm_get_dvi_i_subconnector_name(int val);
675 const char *drm_get_dvi_i_select_name(int val);
676 const char *drm_get_tv_subconnector_name(int val);
677 const char *drm_get_tv_select_name(int val);
678
679 int drm_mode_create_dvi_i_properties(struct drm_device *dev);
680 int drm_mode_create_tv_properties(struct drm_device *dev,
681                                   unsigned int num_modes,
682                                   const char * const modes[]);
683 int drm_mode_create_scaling_mode_property(struct drm_device *dev);
684 int drm_mode_create_aspect_ratio_property(struct drm_device *dev);
685 int drm_mode_create_suggested_offset_properties(struct drm_device *dev);
686
687 int drm_mode_connector_set_path_property(struct drm_connector *connector,
688                                          const char *path);
689 int drm_mode_connector_set_tile_property(struct drm_connector *connector);
690 int drm_mode_connector_update_edid_property(struct drm_connector *connector,
691                                             const struct edid *edid);
692 #endif