2 * Copyright (C) 2008 Maarten Maathuis.
5 * Permission is hereby granted, free of charge, to any person obtaining
6 * a copy of this software and associated documentation files (the
7 * "Software"), to deal in the Software without restriction, including
8 * without limitation the rights to use, copy, modify, merge, publish,
9 * distribute, sublicense, and/or sell copies of the Software, and to
10 * permit persons to whom the Software is furnished to do so, subject to
11 * the following conditions:
13 * The above copyright notice and this permission notice (including the
14 * next paragraph) shall be included in all copies or substantial
15 * portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE COPYRIGHT OWNER(S) AND/OR ITS SUPPLIERS BE
21 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
22 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
29 #include "drm_crtc_helper.h"
30 #include "nouveau_reg.h"
31 #include "nouveau_drv.h"
32 #include "nouveau_encoder.h"
33 #include "nouveau_crtc.h"
34 #include "nouveau_connector.h"
35 #include "nouveau_hw.h"
37 static inline struct drm_encoder_slave_funcs *
38 get_slave_funcs(struct nouveau_encoder *enc)
40 return to_encoder_slave(to_drm_encoder(enc))->slave_funcs;
43 static struct nouveau_encoder *
44 find_encoder_by_type(struct drm_connector *connector, int type)
46 struct drm_device *dev = connector->dev;
47 struct nouveau_encoder *nv_encoder;
48 struct drm_mode_object *obj;
51 for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
52 id = connector->encoder_ids[i];
56 obj = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER);
59 nv_encoder = nouveau_encoder(obj_to_encoder(obj));
61 if (type == OUTPUT_ANY || nv_encoder->dcb->type == type)
68 struct nouveau_connector *
69 nouveau_encoder_connector_get(struct nouveau_encoder *encoder)
71 struct drm_device *dev = to_drm_encoder(encoder)->dev;
72 struct drm_connector *drm_connector;
74 list_for_each_entry(drm_connector, &dev->mode_config.connector_list, head) {
75 if (drm_connector->encoder == to_drm_encoder(encoder))
76 return nouveau_connector(drm_connector);
84 nouveau_connector_destroy(struct drm_connector *drm_connector)
86 struct nouveau_connector *nv_connector =
87 nouveau_connector(drm_connector);
88 struct drm_device *dev = nv_connector->base.dev;
90 NV_DEBUG_KMS(dev, "\n");
95 kfree(nv_connector->edid);
96 drm_sysfs_connector_remove(drm_connector);
97 drm_connector_cleanup(drm_connector);
102 nouveau_connector_ddc_prepare(struct drm_connector *connector, int *flags)
104 struct drm_nouveau_private *dev_priv = connector->dev->dev_private;
106 if (dev_priv->card_type >= NV_50)
110 if (NVLockVgaCrtcs(dev_priv->dev, false))
112 if (nv_heads_tied(dev_priv->dev))
116 NVSetOwner(dev_priv->dev, 0); /* necessary? */
120 nouveau_connector_ddc_finish(struct drm_connector *connector, int flags)
122 struct drm_nouveau_private *dev_priv = connector->dev->dev_private;
124 if (dev_priv->card_type >= NV_50)
128 NVSetOwner(dev_priv->dev, 4);
130 NVLockVgaCrtcs(dev_priv->dev, true);
133 static struct nouveau_i2c_chan *
134 nouveau_connector_ddc_detect(struct drm_connector *connector,
135 struct nouveau_encoder **pnv_encoder)
137 struct drm_device *dev = connector->dev;
138 uint8_t out_buf[] = { 0x0, 0x0}, buf[2];
141 struct i2c_msg msgs[] = {
156 for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
157 struct nouveau_i2c_chan *i2c = NULL;
158 struct nouveau_encoder *nv_encoder;
159 struct drm_mode_object *obj;
162 id = connector->encoder_ids[i];
166 obj = drm_mode_object_find(dev, id, DRM_MODE_OBJECT_ENCODER);
169 nv_encoder = nouveau_encoder(obj_to_encoder(obj));
171 if (nv_encoder->dcb->i2c_index < 0xf)
172 i2c = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
176 nouveau_connector_ddc_prepare(connector, &flags);
177 ret = i2c_transfer(&i2c->adapter, msgs, 2);
178 nouveau_connector_ddc_finish(connector, flags);
181 *pnv_encoder = nv_encoder;
190 nouveau_connector_set_encoder(struct drm_connector *connector,
191 struct nouveau_encoder *nv_encoder)
193 struct nouveau_connector *nv_connector = nouveau_connector(connector);
194 struct drm_nouveau_private *dev_priv = connector->dev->dev_private;
195 struct drm_device *dev = connector->dev;
197 if (nv_connector->detected_encoder == nv_encoder)
199 nv_connector->detected_encoder = nv_encoder;
201 if (nv_encoder->dcb->type == OUTPUT_LVDS ||
202 nv_encoder->dcb->type == OUTPUT_TMDS) {
203 connector->doublescan_allowed = false;
204 connector->interlace_allowed = false;
206 connector->doublescan_allowed = true;
207 if (dev_priv->card_type == NV_20 ||
208 (dev_priv->card_type == NV_10 &&
209 (dev->pci_device & 0x0ff0) != 0x0100 &&
210 (dev->pci_device & 0x0ff0) != 0x0150))
212 connector->interlace_allowed = false;
214 connector->interlace_allowed = true;
217 if (connector->connector_type == DRM_MODE_CONNECTOR_DVII) {
218 drm_connector_property_set_value(connector,
219 dev->mode_config.dvi_i_subconnector_property,
220 nv_encoder->dcb->type == OUTPUT_TMDS ?
221 DRM_MODE_SUBCONNECTOR_DVID :
222 DRM_MODE_SUBCONNECTOR_DVIA);
226 static enum drm_connector_status
227 nouveau_connector_detect(struct drm_connector *connector)
229 struct drm_device *dev = connector->dev;
230 struct nouveau_connector *nv_connector = nouveau_connector(connector);
231 struct nouveau_encoder *nv_encoder = NULL;
232 struct nouveau_i2c_chan *i2c;
235 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
236 nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
237 if (nv_encoder && nv_connector->native_mode) {
238 nouveau_connector_set_encoder(connector, nv_encoder);
239 return connector_status_connected;
242 kfree(nv_connector->edid);
243 nv_connector->edid = NULL;
245 i2c = nouveau_connector_ddc_detect(connector, &nv_encoder);
247 nouveau_connector_ddc_prepare(connector, &flags);
248 nv_connector->edid = drm_get_edid(connector, &i2c->adapter);
249 nouveau_connector_ddc_finish(connector, flags);
250 drm_mode_connector_update_edid_property(connector,
252 if (!nv_connector->edid) {
253 NV_ERROR(dev, "DDC responded, but no EDID for %s\n",
254 drm_get_connector_name(connector));
255 return connector_status_disconnected;
258 if (nv_encoder->dcb->type == OUTPUT_DP &&
259 !nouveau_dp_detect(to_drm_encoder(nv_encoder))) {
260 NV_ERROR(dev, "Detected %s, but failed init\n",
261 drm_get_connector_name(connector));
262 return connector_status_disconnected;
265 /* Override encoder type for DVI-I based on whether EDID
266 * says the display is digital or analog, both use the
267 * same i2c channel so the value returned from ddc_detect
268 * isn't necessarily correct.
270 if (connector->connector_type == DRM_MODE_CONNECTOR_DVII) {
271 if (nv_connector->edid->input & DRM_EDID_INPUT_DIGITAL)
274 type = OUTPUT_ANALOG;
276 nv_encoder = find_encoder_by_type(connector, type);
278 NV_ERROR(dev, "Detected %d encoder on %s, "
279 "but no object!\n", type,
280 drm_get_connector_name(connector));
281 return connector_status_disconnected;
285 nouveau_connector_set_encoder(connector, nv_encoder);
286 return connector_status_connected;
289 nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG);
291 nv_encoder = find_encoder_by_type(connector, OUTPUT_TV);
293 struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
294 struct drm_encoder_helper_funcs *helper =
295 encoder->helper_private;
297 if (helper->detect(encoder, connector) ==
298 connector_status_connected) {
299 nouveau_connector_set_encoder(connector, nv_encoder);
300 return connector_status_connected;
305 return connector_status_disconnected;
309 nouveau_connector_force(struct drm_connector *connector)
311 struct drm_device *dev = connector->dev;
312 struct nouveau_encoder *nv_encoder;
315 if (connector->connector_type == DRM_MODE_CONNECTOR_DVII) {
316 if (connector->force == DRM_FORCE_ON_DIGITAL)
319 type = OUTPUT_ANALOG;
323 nv_encoder = find_encoder_by_type(connector, type);
325 NV_ERROR(dev, "can't find encoder to force %s on!\n",
326 drm_get_connector_name(connector));
327 connector->status = connector_status_disconnected;
331 nouveau_connector_set_encoder(connector, nv_encoder);
335 nouveau_connector_set_property(struct drm_connector *connector,
336 struct drm_property *property, uint64_t value)
338 struct nouveau_connector *nv_connector = nouveau_connector(connector);
339 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
340 struct drm_device *dev = connector->dev;
344 if (property == dev->mode_config.scaling_mode_property) {
345 struct nouveau_crtc *nv_crtc = NULL;
346 bool modeset = false;
349 case DRM_MODE_SCALE_NONE:
350 case DRM_MODE_SCALE_FULLSCREEN:
351 case DRM_MODE_SCALE_CENTER:
352 case DRM_MODE_SCALE_ASPECT:
358 /* LVDS always needs gpu scaling */
359 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS &&
360 value == DRM_MODE_SCALE_NONE)
363 /* Changing between GPU and panel scaling requires a full
366 if ((nv_connector->scaling_mode == DRM_MODE_SCALE_NONE) ||
367 (value == DRM_MODE_SCALE_NONE))
369 nv_connector->scaling_mode = value;
371 if (connector->encoder && connector->encoder->crtc)
372 nv_crtc = nouveau_crtc(connector->encoder->crtc);
376 if (modeset || !nv_crtc->set_scale) {
377 ret = drm_crtc_helper_set_mode(&nv_crtc->base,
380 nv_crtc->base.y, NULL);
384 ret = nv_crtc->set_scale(nv_crtc, value, true);
393 if (property == dev->mode_config.dithering_mode_property) {
394 struct nouveau_crtc *nv_crtc = NULL;
396 if (value == DRM_MODE_DITHERING_ON)
397 nv_connector->use_dithering = true;
399 nv_connector->use_dithering = false;
401 if (connector->encoder && connector->encoder->crtc)
402 nv_crtc = nouveau_crtc(connector->encoder->crtc);
404 if (!nv_crtc || !nv_crtc->set_dither)
407 return nv_crtc->set_dither(nv_crtc, nv_connector->use_dithering,
411 if (nv_encoder && nv_encoder->dcb->type == OUTPUT_TV)
412 return get_slave_funcs(nv_encoder)->
413 set_property(to_drm_encoder(nv_encoder), connector, property, value);
418 static struct drm_display_mode *
419 nouveau_connector_native_mode(struct nouveau_connector *connector)
421 struct drm_device *dev = connector->base.dev;
422 struct drm_display_mode *mode, *largest = NULL;
423 int high_w = 0, high_h = 0, high_v = 0;
425 /* Use preferred mode if there is one.. */
426 list_for_each_entry(mode, &connector->base.probed_modes, head) {
427 if (mode->type & DRM_MODE_TYPE_PREFERRED) {
428 NV_DEBUG_KMS(dev, "native mode from preferred\n");
429 return drm_mode_duplicate(dev, mode);
433 /* Otherwise, take the resolution with the largest width, then height,
434 * then vertical refresh
436 list_for_each_entry(mode, &connector->base.probed_modes, head) {
437 if (mode->hdisplay < high_w)
440 if (mode->hdisplay == high_w && mode->vdisplay < high_h)
443 if (mode->hdisplay == high_w && mode->vdisplay == high_h &&
444 mode->vrefresh < high_v)
447 high_w = mode->hdisplay;
448 high_h = mode->vdisplay;
449 high_v = mode->vrefresh;
453 NV_DEBUG_KMS(dev, "native mode from largest: %dx%d@%d\n",
454 high_w, high_h, high_v);
455 return largest ? drm_mode_duplicate(dev, largest) : NULL;
463 static struct moderec scaler_modes[] = {
482 nouveau_connector_scaler_modes_add(struct drm_connector *connector)
484 struct nouveau_connector *nv_connector = nouveau_connector(connector);
485 struct drm_display_mode *native = nv_connector->native_mode, *m;
486 struct drm_device *dev = connector->dev;
487 struct moderec *mode = &scaler_modes[0];
493 while (mode->hdisplay) {
494 if (mode->hdisplay <= native->hdisplay &&
495 mode->vdisplay <= native->vdisplay) {
496 m = drm_cvt_mode(dev, mode->hdisplay, mode->vdisplay,
497 drm_mode_vrefresh(native), false,
502 m->type |= DRM_MODE_TYPE_DRIVER;
504 drm_mode_probed_add(connector, m);
515 nouveau_connector_get_modes(struct drm_connector *connector)
517 struct drm_device *dev = connector->dev;
518 struct nouveau_connector *nv_connector = nouveau_connector(connector);
519 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
522 /* If we're not LVDS, destroy the previous native mode, the attached
523 * monitor could have changed.
525 if (connector->connector_type != DRM_MODE_CONNECTOR_LVDS &&
526 nv_connector->native_mode) {
527 drm_mode_destroy(dev, nv_connector->native_mode);
528 nv_connector->native_mode = NULL;
531 if (nv_connector->edid)
532 ret = drm_add_edid_modes(connector, nv_connector->edid);
534 /* Find the native mode if this is a digital panel, if we didn't
535 * find any modes through DDC previously add the native mode to
538 if (!nv_connector->native_mode)
539 nv_connector->native_mode =
540 nouveau_connector_native_mode(nv_connector);
541 if (ret == 0 && nv_connector->native_mode) {
542 struct drm_display_mode *mode;
544 mode = drm_mode_duplicate(dev, nv_connector->native_mode);
545 drm_mode_probed_add(connector, mode);
549 if (nv_encoder->dcb->type == OUTPUT_TV)
550 ret = get_slave_funcs(nv_encoder)->
551 get_modes(to_drm_encoder(nv_encoder), connector);
553 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
554 ret += nouveau_connector_scaler_modes_add(connector);
560 nouveau_connector_mode_valid(struct drm_connector *connector,
561 struct drm_display_mode *mode)
563 struct drm_nouveau_private *dev_priv = connector->dev->dev_private;
564 struct nouveau_connector *nv_connector = nouveau_connector(connector);
565 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder;
566 unsigned min_clock = 25000, max_clock = min_clock;
567 unsigned clock = mode->clock;
569 switch (nv_encoder->dcb->type) {
571 BUG_ON(!nv_connector->native_mode);
572 if (mode->hdisplay > nv_connector->native_mode->hdisplay ||
573 mode->vdisplay > nv_connector->native_mode->vdisplay)
580 if ((dev_priv->card_type >= NV_50 && !nouveau_duallink) ||
581 (dev_priv->card_type < NV_50 &&
582 !nv_encoder->dcb->duallink_possible))
588 max_clock = nv_encoder->dcb->crtconf.maxfreq;
593 return get_slave_funcs(nv_encoder)->
594 mode_valid(to_drm_encoder(nv_encoder), mode);
596 if (nv_encoder->dp.link_bw == DP_LINK_BW_2_7)
597 max_clock = nv_encoder->dp.link_nr * 270000;
599 max_clock = nv_encoder->dp.link_nr * 162000;
605 if (clock < min_clock)
606 return MODE_CLOCK_LOW;
608 if (clock > max_clock)
609 return MODE_CLOCK_HIGH;
614 static struct drm_encoder *
615 nouveau_connector_best_encoder(struct drm_connector *connector)
617 struct nouveau_connector *nv_connector = nouveau_connector(connector);
619 if (nv_connector->detected_encoder)
620 return to_drm_encoder(nv_connector->detected_encoder);
625 static const struct drm_connector_helper_funcs
626 nouveau_connector_helper_funcs = {
627 .get_modes = nouveau_connector_get_modes,
628 .mode_valid = nouveau_connector_mode_valid,
629 .best_encoder = nouveau_connector_best_encoder,
632 static const struct drm_connector_funcs
633 nouveau_connector_funcs = {
634 .dpms = drm_helper_connector_dpms,
637 .detect = nouveau_connector_detect,
638 .destroy = nouveau_connector_destroy,
639 .fill_modes = drm_helper_probe_single_connector_modes,
640 .set_property = nouveau_connector_set_property,
641 .force = nouveau_connector_force
645 nouveau_connector_create_lvds(struct drm_device *dev,
646 struct drm_connector *connector)
648 struct nouveau_connector *nv_connector = nouveau_connector(connector);
649 struct drm_nouveau_private *dev_priv = dev->dev_private;
650 struct nouveau_i2c_chan *i2c = NULL;
651 struct nouveau_encoder *nv_encoder;
652 struct drm_display_mode native, *mode, *temp;
653 bool dummy, if_is_24bit = false;
656 nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
660 ret = nouveau_bios_parse_lvds_table(dev, 0, &dummy, &if_is_24bit);
662 NV_ERROR(dev, "Error parsing LVDS table, disabling LVDS\n");
665 nv_connector->use_dithering = !if_is_24bit;
667 /* Firstly try getting EDID over DDC, if allowed and I2C channel
670 if (!dev_priv->VBIOS.pub.fp_no_ddc && nv_encoder->dcb->i2c_index < 0xf)
671 i2c = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
674 nouveau_connector_ddc_prepare(connector, &flags);
675 nv_connector->edid = drm_get_edid(connector, &i2c->adapter);
676 nouveau_connector_ddc_finish(connector, flags);
679 /* If no EDID found above, and the VBIOS indicates a hardcoded
680 * modeline is avalilable for the panel, set it as the panel's
681 * native mode and exit.
683 if (!nv_connector->edid && nouveau_bios_fp_mode(dev, &native) &&
684 (nv_encoder->dcb->lvdsconf.use_straps_for_mode ||
685 dev_priv->VBIOS.pub.fp_no_ddc)) {
686 nv_connector->native_mode = drm_mode_duplicate(dev, &native);
690 /* Still nothing, some VBIOS images have a hardcoded EDID block
691 * stored for the panel stored in them.
693 if (!nv_connector->edid && !nv_connector->native_mode &&
694 !dev_priv->VBIOS.pub.fp_no_ddc) {
696 (struct edid *)nouveau_bios_embedded_edid(dev);
698 nv_connector->edid = kmalloc(EDID_LENGTH, GFP_KERNEL);
699 *(nv_connector->edid) = *edid;
703 if (!nv_connector->edid)
706 /* We didn't find/use a panel mode from the VBIOS, so parse the EDID
707 * block and look for the preferred mode there.
709 ret = drm_add_edid_modes(connector, nv_connector->edid);
712 nv_connector->detected_encoder = nv_encoder;
713 nv_connector->native_mode = nouveau_connector_native_mode(nv_connector);
714 list_for_each_entry_safe(mode, temp, &connector->probed_modes, head)
715 drm_mode_remove(connector, mode);
718 if (!nv_connector->native_mode) {
719 NV_ERROR(dev, "LVDS present in DCB table, but couldn't "
720 "determine its native mode. Disabling.\n");
724 drm_mode_connector_update_edid_property(connector, nv_connector->edid);
729 nouveau_connector_create(struct drm_device *dev, int index, int type)
731 struct drm_nouveau_private *dev_priv = dev->dev_private;
732 struct nouveau_connector *nv_connector = NULL;
733 struct drm_connector *connector;
734 struct drm_encoder *encoder;
737 NV_DEBUG_KMS(dev, "\n");
739 nv_connector = kzalloc(sizeof(*nv_connector), GFP_KERNEL);
742 nv_connector->dcb = nouveau_bios_connector_entry(dev, index);
743 connector = &nv_connector->base;
746 case DRM_MODE_CONNECTOR_VGA:
747 NV_INFO(dev, "Detected a VGA connector\n");
749 case DRM_MODE_CONNECTOR_DVID:
750 NV_INFO(dev, "Detected a DVI-D connector\n");
752 case DRM_MODE_CONNECTOR_DVII:
753 NV_INFO(dev, "Detected a DVI-I connector\n");
755 case DRM_MODE_CONNECTOR_LVDS:
756 NV_INFO(dev, "Detected a LVDS connector\n");
758 case DRM_MODE_CONNECTOR_TV:
759 NV_INFO(dev, "Detected a TV connector\n");
761 case DRM_MODE_CONNECTOR_DisplayPort:
762 NV_INFO(dev, "Detected a DisplayPort connector\n");
765 NV_ERROR(dev, "Unknown connector, this is not good.\n");
769 /* defaults, will get overridden in detect() */
770 connector->interlace_allowed = false;
771 connector->doublescan_allowed = false;
773 drm_connector_init(dev, connector, &nouveau_connector_funcs, type);
774 drm_connector_helper_add(connector, &nouveau_connector_helper_funcs);
776 /* Init DVI-I specific properties */
777 if (type == DRM_MODE_CONNECTOR_DVII) {
778 drm_mode_create_dvi_i_properties(dev);
779 drm_connector_attach_property(connector, dev->mode_config.dvi_i_subconnector_property, 0);
780 drm_connector_attach_property(connector, dev->mode_config.dvi_i_select_subconnector_property, 0);
783 if (type != DRM_MODE_CONNECTOR_LVDS)
784 nv_connector->use_dithering = false;
786 if (type == DRM_MODE_CONNECTOR_DVID ||
787 type == DRM_MODE_CONNECTOR_DVII ||
788 type == DRM_MODE_CONNECTOR_LVDS ||
789 type == DRM_MODE_CONNECTOR_DisplayPort) {
790 nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN;
792 drm_connector_attach_property(connector, dev->mode_config.scaling_mode_property,
793 nv_connector->scaling_mode);
794 drm_connector_attach_property(connector, dev->mode_config.dithering_mode_property,
795 nv_connector->use_dithering ? DRM_MODE_DITHERING_ON
796 : DRM_MODE_DITHERING_OFF);
799 nv_connector->scaling_mode = DRM_MODE_SCALE_NONE;
801 if (type == DRM_MODE_CONNECTOR_VGA &&
802 dev_priv->card_type >= NV_50) {
803 drm_connector_attach_property(connector,
804 dev->mode_config.scaling_mode_property,
805 nv_connector->scaling_mode);
809 /* attach encoders */
810 list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
811 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
813 if (nv_encoder->dcb->connector != index)
816 if (get_slave_funcs(nv_encoder))
817 get_slave_funcs(nv_encoder)->create_resources(encoder, connector);
819 drm_mode_connector_attach_encoder(connector, encoder);
822 drm_sysfs_connector_add(connector);
824 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS) {
825 ret = nouveau_connector_create_lvds(dev, connector);
827 connector->funcs->destroy(connector);