Lines Matching refs:nv_connector
249 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_reset() local
262 asyc = &nv_connector->properties_state; in nouveau_conn_reset()
289 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_conn_attach_properties() local
295 armc = &nv_connector->properties_state; in nouveau_conn_attach_properties()
398 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_destroy() local
399 nvif_notify_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 kfree(nv_connector->aux.name); in nouveau_connector_destroy()
407 nvif_conn_dtor(&nv_connector->conn); in nouveau_connector_destroy()
463 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_of_detect() local
479 nv_connector->edid = in nouveau_connector_of_detect()
493 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_encoder() local
498 if (nv_connector->detected_encoder == nv_encoder) in nouveau_connector_set_encoder()
500 nv_connector->detected_encoder = nv_encoder; in nouveau_connector_set_encoder()
527 if (nv_connector->type == DCB_CONNECTOR_DVI_I) { in nouveau_connector_set_encoder()
537 nouveau_connector_set_edid(struct nouveau_connector *nv_connector, in nouveau_connector_set_edid() argument
540 if (nv_connector->edid != edid) { in nouveau_connector_set_edid()
541 struct edid *old_edid = nv_connector->edid; in nouveau_connector_set_edid()
543 drm_connector_update_edid_property(&nv_connector->base, edid); in nouveau_connector_set_edid()
545 nv_connector->edid = edid; in nouveau_connector_set_edid()
554 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect() local
574 nouveau_connector_set_edid(nv_connector, NULL); in nouveau_connector_detect()
585 nv_connector->type == DCB_CONNECTOR_LVDS) in nouveau_connector_detect()
590 nouveau_connector_set_edid(nv_connector, new_edid); in nouveau_connector_detect()
591 if (!nv_connector->edid) { in nouveau_connector_detect()
612 if (nv_connector->edid->input & DRM_EDID_INPUT_DIGITAL) in nouveau_connector_detect()
622 drm_dp_cec_set_edid(&nv_connector->aux, nv_connector->edid); in nouveau_connector_detect()
625 nouveau_connector_set_edid(nv_connector, NULL); in nouveau_connector_detect()
653 if (!nv_connector->edid) in nouveau_connector_detect()
654 drm_dp_cec_unset_edid(&nv_connector->aux); in nouveau_connector_detect()
667 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_lvds() local
680 edid = nv_connector->edid; in nouveau_connector_detect_lvds()
732 nouveau_connector_set_edid(nv_connector, edid); in nouveau_connector_detect_lvds()
741 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_force() local
745 if (nv_connector->type == DCB_CONNECTOR_DVI_I) { in nouveau_connector_force()
768 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_set_property() local
769 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_set_property()
770 struct nouveau_conn_atom *asyc = &nv_connector->properties_state; in nouveau_connector_set_property()
774 ret = connector->funcs->atomic_set_property(&nv_connector->base, in nouveau_connector_set_property()
784 nv_connector->scaling_mode = asyc->scaler.mode; in nouveau_connector_set_property()
785 nv_connector->dithering_mode = asyc->dither.mode; in nouveau_connector_set_property()
826 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_scaler_modes_add() local
827 struct drm_display_mode *native = nv_connector->native_mode, *m; in nouveau_connector_scaler_modes_add()
860 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_detect_depth() local
861 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_detect_depth()
863 struct drm_display_mode *mode = nv_connector->native_mode; in nouveau_connector_detect_depth()
867 if (nv_connector->edid && connector->display_info.bpc) in nouveau_connector_detect_depth()
871 if (nv_connector->type == DCB_CONNECTOR_eDP) { in nouveau_connector_detect_depth()
894 if (nv_connector->edid && in nouveau_connector_detect_depth()
895 nv_connector->type == DCB_CONNECTOR_LVDS_SPWG) in nouveau_connector_detect_depth()
896 duallink = ((u8 *)nv_connector->edid)[121] == 2; in nouveau_connector_detect_depth()
942 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_get_modes() local
943 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_get_modes()
949 if (nv_connector->native_mode) { in nouveau_connector_get_modes()
950 drm_mode_destroy(dev, nv_connector->native_mode); in nouveau_connector_get_modes()
951 nv_connector->native_mode = NULL; in nouveau_connector_get_modes()
954 if (nv_connector->edid) in nouveau_connector_get_modes()
955 ret = drm_add_edid_modes(connector, nv_connector->edid); in nouveau_connector_get_modes()
963 nv_connector->native_mode = drm_mode_duplicate(dev, &mode); in nouveau_connector_get_modes()
976 if (!nv_connector->native_mode) in nouveau_connector_get_modes()
977 nv_connector->native_mode = nouveau_conn_native_mode(connector); in nouveau_connector_get_modes()
978 if (ret == 0 && nv_connector->native_mode) { in nouveau_connector_get_modes()
981 mode = drm_mode_duplicate(dev, nv_connector->native_mode); in nouveau_connector_get_modes()
996 if (nv_connector->type == DCB_CONNECTOR_LVDS || in nouveau_connector_get_modes()
997 nv_connector->type == DCB_CONNECTOR_LVDS_SPWG || in nouveau_connector_get_modes()
998 nv_connector->type == DCB_CONNECTOR_eDP) in nouveau_connector_get_modes()
1007 struct nouveau_connector *nv_connector = nouveau_connector(connector); in get_tmds_link_bandwidth() local
1008 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in get_tmds_link_bandwidth()
1010 struct dcb_output *dcb = nv_connector->detected_encoder->dcb; in get_tmds_link_bandwidth()
1015 if (drm_detect_hdmi_monitor(nv_connector->edid)) { in get_tmds_link_bandwidth()
1016 info = &nv_connector->base.display_info; in get_tmds_link_bandwidth()
1055 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_mode_valid() local
1056 struct nouveau_encoder *nv_encoder = nv_connector->detected_encoder; in nouveau_connector_mode_valid()
1062 if (nv_connector->native_mode && in nouveau_connector_mode_valid()
1063 (mode->hdisplay > nv_connector->native_mode->hdisplay || in nouveau_connector_mode_valid()
1064 mode->vdisplay > nv_connector->native_mode->vdisplay)) in nouveau_connector_mode_valid()
1101 struct nouveau_connector *nv_connector = nouveau_connector(connector); in nouveau_connector_best_encoder() local
1103 if (nv_connector->detected_encoder) in nouveau_connector_best_encoder()
1104 return to_drm_encoder(nv_connector->detected_encoder); in nouveau_connector_best_encoder()
1181 struct nouveau_connector *nv_connector = in nouveau_connector_hotplug() local
1182 container_of(notify, typeof(*nv_connector), hpd); in nouveau_connector_hotplug()
1183 struct drm_connector *connector = &nv_connector->base; in nouveau_connector_hotplug()
1190 nouveau_dp_irq(drm, nv_connector); in nouveau_connector_hotplug()
1203 struct nouveau_connector *nv_connector = in nouveau_connector_aux_xfer() local
1204 container_of(obj, typeof(*nv_connector), aux); in nouveau_connector_aux_xfer()
1210 nv_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP); in nouveau_connector_aux_xfer()
1269 struct nouveau_connector *nv_connector = NULL; in nouveau_connector_create() local
1279 nv_connector = nouveau_connector(connector); in nouveau_connector_create()
1280 if (nv_connector->index == index) { in nouveau_connector_create()
1287 nv_connector = kzalloc(sizeof(*nv_connector), GFP_KERNEL); in nouveau_connector_create()
1288 if (!nv_connector) in nouveau_connector_create()
1291 connector = &nv_connector->base; in nouveau_connector_create()
1292 nv_connector->index = index; in nouveau_connector_create()
1295 nv_connector->dcb = olddcb_conn(dev, index); in nouveau_connector_create()
1296 if (nv_connector->dcb) { in nouveau_connector_create()
1297 u32 entry = ROM16(nv_connector->dcb[0]); in nouveau_connector_create()
1299 entry |= (u32)ROM16(nv_connector->dcb[2]) << 16; in nouveau_connector_create()
1301 nv_connector->type = nv_connector->dcb[0]; in nouveau_connector_create()
1302 if (drm_conntype_from_dcb(nv_connector->type) == in nouveau_connector_create()
1305 nv_connector->type); in nouveau_connector_create()
1306 nv_connector->type = DCB_CONNECTOR_NONE; in nouveau_connector_create()
1311 if (nv_connector->type == DCB_CONNECTOR_HDMI_1) in nouveau_connector_create()
1312 nv_connector->type = DCB_CONNECTOR_DVI_I; in nouveau_connector_create()
1317 if (nv_connector->type == DCB_CONNECTOR_HDMI_1) in nouveau_connector_create()
1318 nv_connector->type = DCB_CONNECTOR_DVI_I; in nouveau_connector_create()
1321 nv_connector->type = DCB_CONNECTOR_NONE; in nouveau_connector_create()
1327 if (nv_connector->type == DCB_CONNECTOR_NONE) { in nouveau_connector_create()
1334 if (dcbt->entry[i].connector == nv_connector->index) in nouveau_connector_create()
1340 nv_connector->type = DCB_CONNECTOR_DP; in nouveau_connector_create()
1342 nv_connector->type = DCB_CONNECTOR_eDP; in nouveau_connector_create()
1346 nv_connector->type = DCB_CONNECTOR_DVI_I; in nouveau_connector_create()
1348 nv_connector->type = DCB_CONNECTOR_DVI_D; in nouveau_connector_create()
1351 nv_connector->type = DCB_CONNECTOR_VGA; in nouveau_connector_create()
1354 nv_connector->type = DCB_CONNECTOR_LVDS; in nouveau_connector_create()
1357 nv_connector->type = DCB_CONNECTOR_TV_0; in nouveau_connector_create()
1361 switch ((type = drm_conntype_from_dcb(nv_connector->type))) { in nouveau_connector_create()
1366 kfree(nv_connector); in nouveau_connector_create()
1374 nv_connector->aux.dev = connector->kdev; in nouveau_connector_create()
1375 nv_connector->aux.drm_dev = dev; in nouveau_connector_create()
1376 nv_connector->aux.transfer = nouveau_connector_aux_xfer; in nouveau_connector_create()
1379 nv_connector->aux.name = kstrdup(aux_name, GFP_KERNEL); in nouveau_connector_create()
1380 if (!nv_connector->aux.name) { in nouveau_connector_create()
1381 kfree(nv_connector); in nouveau_connector_create()
1384 drm_dp_aux_init(&nv_connector->aux); in nouveau_connector_create()
1405 if (nv_connector->dcb && (disp->disp.conn_mask & BIT(nv_connector->index))) { in nouveau_connector_create()
1406 ret = nvif_conn_ctor(&disp->disp, nv_connector->base.name, nv_connector->index, in nouveau_connector_create()
1407 &nv_connector->conn); in nouveau_connector_create()
1409 kfree(nv_connector); in nouveau_connector_create()
1418 switch (nv_connector->type) { in nouveau_connector_create()
1424 nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; in nouveau_connector_create()
1427 nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; in nouveau_connector_create()
1430 nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; in nouveau_connector_create()
1435 switch (nv_connector->type) { in nouveau_connector_create()
1442 nv_connector->dithering_mode = DITHERING_MODE_AUTO; in nouveau_connector_create()
1448 nv_connector->dp_encoder = find_encoder(&nv_connector->base, DCB_OUTPUT_DP); in nouveau_connector_create()
1451 drm_dp_cec_register_connector(&nv_connector->aux, connector); in nouveau_connector_create()
1464 &nv_connector->hpd); in nouveau_connector_create()