Lines Matching refs:nv_connector
248 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_reset() local
261 asyc = &nv_connector->properties_state; in nouveau_conn_reset()
288 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_attach_properties() local
294 armc = &nv_connector->properties_state; in nouveau_conn_attach_properties()
397 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_destroy() local
398 nvif_event_dtor(&nv_connector->irq); in nouveau_connector_destroy()
399 nvif_event_dtor(&nv_connector->hpd); in nouveau_connector_destroy()
400 kfree(nv_connector->edid); in nouveau_connector_destroy()
403 if (nv_connector->aux.transfer) in nouveau_connector_destroy()
404 drm_dp_cec_unregister_connector(&nv_connector->aux); in nouveau_connector_destroy()
405 nvif_conn_dtor(&nv_connector->conn); in nouveau_connector_destroy()
477 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_of_detect() local
493 nv_connector->edid = in nouveau_connector_of_detect()
507 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_encoder() local
512 if (nv_connector->detected_encoder == nv_encoder) in nouveau_connector_set_encoder()
514 nv_connector->detected_encoder = nv_encoder; in nouveau_connector_set_encoder()
541 if (nv_connector->type == DCB_CONNECTOR_DVI_I) { in nouveau_connector_set_encoder()
551 nouveau_connector_set_edid(struct nouveau_connector *nv_connector, in nouveau_connector_set_edid() argument
554 if (nv_connector->edid != edid) { in nouveau_connector_set_edid()
555 struct edid *old_edid = nv_connector->edid; in nouveau_connector_set_edid()
557 drm_connector_update_edid_property(&nv_connector->base, edid); in nouveau_connector_set_edid()
559 nv_connector->edid = edid; in nouveau_connector_set_edid()
568 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect() local
587 nouveau_connector_set_edid(nv_connector, NULL); in nouveau_connector_detect()
598 nv_connector->type == DCB_CONNECTOR_LVDS) in nouveau_connector_detect()
608 nouveau_connector_set_edid(nv_connector, new_edid); in nouveau_connector_detect()
609 if (!nv_connector->edid) { in nouveau_connector_detect()
630 if (nv_connector->edid->input & DRM_EDID_INPUT_DIGITAL) in nouveau_connector_detect()
642 drm_dp_cec_set_edid(&nv_connector->aux, nv_connector->edid); in nouveau_connector_detect()
646 nouveau_connector_set_edid(nv_connector, NULL); in nouveau_connector_detect()
674 if (!nv_connector->edid) in nouveau_connector_detect()
675 drm_dp_cec_unset_edid(&nv_connector->aux); in nouveau_connector_detect()
688 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_lvds() local
701 edid = nv_connector->edid; in nouveau_connector_detect_lvds()
753 nouveau_connector_set_edid(nv_connector, edid); in nouveau_connector_detect_lvds()
763 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_force() local
767 if (nv_connector->type == DCB_CONNECTOR_DVI_I) { in nouveau_connector_force()
790 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_property() local
791 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_set_property()
792 struct nouveau_conn_atom *asyc = &nv_connector->properties_state; in nouveau_connector_set_property()
796 ret = connector->funcs->atomic_set_property(&nv_connector->base, in nouveau_connector_set_property()
806 nv_connector->scaling_mode = asyc->scaler.mode; in nouveau_connector_set_property()
807 nv_connector->dithering_mode = asyc->dither.mode; in nouveau_connector_set_property()
848 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_scaler_modes_add() local
849 struct drm_display_mode *native = nv_connector->native_mode, *m; in nouveau_connector_scaler_modes_add()
882 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_depth() local
883 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_detect_depth()
885 struct drm_display_mode *mode = nv_connector->native_mode; in nouveau_connector_detect_depth()
889 if (nv_connector->edid && connector->display_info.bpc) in nouveau_connector_detect_depth()
893 if (nv_connector->type == DCB_CONNECTOR_eDP) { in nouveau_connector_detect_depth()
916 if (nv_connector->edid && in nouveau_connector_detect_depth()
917 nv_connector->type == DCB_CONNECTOR_LVDS_SPWG) in nouveau_connector_detect_depth()
918 duallink = ((u8 *)nv_connector->edid)[121] == 2; in nouveau_connector_detect_depth()
964 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_get_modes() local
965 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_get_modes()
971 if (nv_connector->native_mode) { in nouveau_connector_get_modes()
972 drm_mode_destroy(dev, nv_connector->native_mode); in nouveau_connector_get_modes()
973 nv_connector->native_mode = NULL; in nouveau_connector_get_modes()
976 if (nv_connector->edid) in nouveau_connector_get_modes()
977 ret = drm_add_edid_modes(connector, nv_connector->edid); in nouveau_connector_get_modes()
985 nv_connector->native_mode = drm_mode_duplicate(dev, &mode); in nouveau_connector_get_modes()
998 if (!nv_connector->native_mode) in nouveau_connector_get_modes()
999 nv_connector->native_mode = nouveau_conn_native_mode(connector); in nouveau_connector_get_modes()
1000 if (ret == 0 && nv_connector->native_mode) { in nouveau_connector_get_modes()
1003 mode = drm_mode_duplicate(dev, nv_connector->native_mode); in nouveau_connector_get_modes()
1015 if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS && nv_connector->native_mode) in nouveau_connector_get_modes()
1021 if (nv_connector->type == DCB_CONNECTOR_LVDS || in nouveau_connector_get_modes()
1022 nv_connector->type == DCB_CONNECTOR_LVDS_SPWG || in nouveau_connector_get_modes()
1023 nv_connector->type == DCB_CONNECTOR_eDP) in nouveau_connector_get_modes()
1032 struct nouveau_connector *nv_connector = nouveau_connector(connector); in get_tmds_link_bandwidth() local
1033 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in get_tmds_link_bandwidth()
1035 struct dcb_output *dcb = nv_connector->detected_encoder->dcb; in get_tmds_link_bandwidth()
1040 if (nv_connector->base.display_info.is_hdmi) { in get_tmds_link_bandwidth()
1041 info = &nv_connector->base.display_info; in get_tmds_link_bandwidth()
1080 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_mode_valid() local
1081 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_mode_valid()
1087 if (nv_connector->native_mode && in nouveau_connector_mode_valid()
1088 (mode->hdisplay > nv_connector->native_mode->hdisplay || in nouveau_connector_mode_valid()
1089 mode->vdisplay > nv_connector->native_mode->vdisplay)) in nouveau_connector_mode_valid()
1126 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_best_encoder() local
1128 if (nv_connector->detected_encoder) in nouveau_connector_best_encoder()
1129 return to_drm_encoder(nv_connector->detected_encoder); in nouveau_connector_best_encoder()
1190 nouveau_connector_hpd(struct nouveau_connector *nv_connector, u64 bits) in nouveau_connector_hpd() argument
1192 struct nouveau_drm *drm = nouveau_drm(nv_connector->base.dev); in nouveau_connector_hpd()
1193 u32 mask = drm_connector_mask(&nv_connector->base); in nouveau_connector_hpd()
1198 nv_connector->hpd_pending |= bits; in nouveau_connector_hpd()
1208 struct nouveau_connector *nv_connector = container_of(event, typeof(*nv_connector), irq); in nouveau_connector_irq() local
1210 schedule_work(&nv_connector->irq_work); in nouveau_connector_irq()
1217 struct nouveau_connector *nv_connector = container_of(event, typeof(*nv_connector), hpd); in nouveau_connector_hotplug() local
1220 nouveau_connector_hpd(nv_connector, rep->types); in nouveau_connector_hotplug()
1227 struct nouveau_connector *nv_connector = in nouveau_connector_aux_xfer() local
1228 container_of(obj, typeof(*nv_connector), aux); in nouveau_connector_aux_xfer()
1233 nv_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP); in nouveau_connector_aux_xfer()
1285 struct nouveau_connector *nv_connector = NULL; in nouveau_connector_create() local
1293 nv_connector = nouveau_connector(connector); in nouveau_connector_create()
1294 if (nv_connector->index == index) { in nouveau_connector_create()
1301 nv_connector = kzalloc(sizeof(*nv_connector), GFP_KERNEL); in nouveau_connector_create()
1302 if (!nv_connector) in nouveau_connector_create()
1305 connector = &nv_connector->base; in nouveau_connector_create()
1306 nv_connector->index = index; in nouveau_connector_create()
1307 INIT_WORK(&nv_connector->irq_work, nouveau_dp_irq); in nouveau_connector_create()
1309 if (disp->disp.conn_mask & BIT(nv_connector->index)) { in nouveau_connector_create()
1310 ret = nvif_conn_ctor(&disp->disp, nv_connector->base.name, nv_connector->index, in nouveau_connector_create()
1311 &nv_connector->conn); in nouveau_connector_create()
1313 kfree(nv_connector); in nouveau_connector_create()
1317 switch (nv_connector->conn.info.type) { in nouveau_connector_create()
1331 nv_connector->type = type; in nouveau_connector_create()
1333 u8 *dcb = olddcb_conn(dev, nv_connector->index); in nouveau_connector_create()
1336 nv_connector->type = dcb[0]; in nouveau_connector_create()
1338 nv_connector->type = DCB_CONNECTOR_NONE; in nouveau_connector_create()
1341 if (nv_connector->type != DCB_CONNECTOR_NONE) { in nouveau_connector_create()
1342 if (drm_conntype_from_dcb(nv_connector->type) == in nouveau_connector_create()
1345 nv_connector->type); in nouveau_connector_create()
1346 nv_connector->type = DCB_CONNECTOR_NONE; in nouveau_connector_create()
1353 if (nv_connector->type == DCB_CONNECTOR_NONE && in nouveau_connector_create()
1360 if (dcbt->entry[i].connector == nv_connector->index) in nouveau_connector_create()
1366 nv_connector->type = DCB_CONNECTOR_DVI_I; in nouveau_connector_create()
1368 nv_connector->type = DCB_CONNECTOR_DVI_D; in nouveau_connector_create()
1371 nv_connector->type = DCB_CONNECTOR_VGA; in nouveau_connector_create()
1374 nv_connector->type = DCB_CONNECTOR_LVDS; in nouveau_connector_create()
1377 nv_connector->type = DCB_CONNECTOR_TV_0; in nouveau_connector_create()
1382 type = drm_conntype_from_dcb(nv_connector->type); in nouveau_connector_create()
1393 kfree(nv_connector); in nouveau_connector_create()
1400 nv_connector->aux.dev = connector->kdev; in nouveau_connector_create()
1401 nv_connector->aux.drm_dev = dev; in nouveau_connector_create()
1402 nv_connector->aux.transfer = nouveau_connector_aux_xfer; in nouveau_connector_create()
1403 nv_connector->aux.name = connector->name; in nouveau_connector_create()
1404 drm_dp_aux_init(&nv_connector->aux); in nouveau_connector_create()
1424 if (nvif_object_constructed(&nv_connector->conn.object)) { in nouveau_connector_create()
1425 ret = nvif_conn_event_ctor(&nv_connector->conn, "kmsHotplug", in nouveau_connector_create()
1428 &nv_connector->hpd); in nouveau_connector_create()
1432 if (nv_connector->aux.transfer) { in nouveau_connector_create()
1433 ret = nvif_conn_event_ctor(&nv_connector->conn, "kmsDpIrq", in nouveau_connector_create()
1435 &nv_connector->irq); in nouveau_connector_create()
1437 nvif_event_dtor(&nv_connector->hpd); in nouveau_connector_create()
1438 nvif_conn_dtor(&nv_connector->conn); in nouveau_connector_create()
1448 switch (nv_connector->type) { in nouveau_connector_create()
1454 nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; in nouveau_connector_create()
1457 nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; in nouveau_connector_create()
1460 nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; in nouveau_connector_create()
1465 switch (nv_connector->type) { in nouveau_connector_create()
1472 nv_connector->dithering_mode = DITHERING_MODE_AUTO; in nouveau_connector_create()
1478 nv_connector->dp_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP); in nouveau_connector_create()
1481 drm_dp_cec_register_connector(&nv_connector->aux, connector); in nouveau_connector_create()
1490 kfree(nv_connector); in nouveau_connector_create()