Lines Matching refs:mstm

853 	struct nv50_mstm *mstm;  member
883 return msto->mstc->mstm->outp; in nv50_real_outp()
900 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_cleanup() local
906 nvif_outp_dp_mst_id_put(&mstm->outp->outp, msto->display_id); in nv50_msto_cleanup()
927 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_prepare() local
937 nvif_outp_dp_mst_vcpi(&mstm->outp->outp, msto->head->base.index, 0, 0, 0, 0); in nv50_msto_prepare()
945 nvif_outp_dp_mst_vcpi(&mstm->outp->outp, msto->head->base.index, in nv50_msto_prepare()
950 nvif_outp_dp_mst_vcpi(&mstm->outp->outp, msto->head->base.index, 0, 0, 0, 0); in nv50_msto_prepare()
963 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_check() local
988 mst_state = drm_atomic_get_mst_topology_state(state, &mstm->mgr); in nv50_msto_atomic_check()
993 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_msto_atomic_check()
995 mst_state->pbn_div = drm_dp_get_vc_payload_bw(&mstm->mgr, in nv50_msto_atomic_check()
999 slots = drm_dp_atomic_find_time_slots(state, &mstm->mgr, mstc->port, asyh->dp.pbn); in nv50_msto_atomic_check()
1027 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1036 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1045 if (!mstm->links++) { in nv50_msto_atomic_enable()
1046 nvif_outp_acquire_sor(&mstm->outp->outp, false /*TODO: MST audio... */); in nv50_msto_atomic_enable()
1047 nouveau_dp_train(mstm->outp, true, 0, 0); in nv50_msto_atomic_enable()
1051 if (!WARN_ON(nvif_outp_dp_mst_id_get(&mstm->outp->outp, &msto->display_id))) in nv50_msto_atomic_enable()
1055 if (mstm->outp->outp.or.link & 1) in nv50_msto_atomic_enable()
1060 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1065 mstm->modified = true; in nv50_msto_atomic_enable()
1073 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1078 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1079 mstm->modified = true; in nv50_msto_atomic_disable()
1080 if (!--mstm->links) in nv50_msto_atomic_disable()
1081 mstm->disabled = true; in nv50_msto_atomic_disable()
1137 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1148 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1191 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1255 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1258 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1265 mstc->mstm = mstm; in nv50_mstc_new()
1282 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1299 struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1301 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1304 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1305 drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1307 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1311 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1312 nv50_msto_cleanup(state, mst_state, &mstm->mgr, msto); in nv50_mstm_cleanup()
1316 if (mstm->disabled) { in nv50_mstm_cleanup()
1317 nouveau_dp_power_down(mstm->outp); in nv50_mstm_cleanup()
1318 nvif_outp_release(&mstm->outp->outp); in nv50_mstm_cleanup()
1319 mstm->disabled = false; in nv50_mstm_cleanup()
1322 mstm->modified = false; in nv50_mstm_cleanup()
1328 struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1330 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1333 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1336 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1340 if (mstc && mstc->mstm == mstm && msto->disabled) in nv50_mstm_prepare()
1341 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1348 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1352 if (mstc && mstc->mstm == mstm && !msto->disabled) in nv50_mstm_prepare()
1353 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1362 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1366 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1381 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1397 drm_dp_mst_hpd_irq_handle_event(&mstm->mgr, esi, ack, &handled); in nv50_mstm_service()
1408 drm_dp_mst_hpd_irq_send_new_request(&mstm->mgr); in nv50_mstm_service()
1419 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1421 mstm->is_mst = false; in nv50_mstm_remove()
1422 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1428 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1432 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1435 aux = mstm->mgr.aux; in nv50_mstm_detect()
1445 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1449 mstm->is_mst = true; in nv50_mstm_detect()
1456 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1458 if (!mstm) in nv50_mstm_fini()
1466 mstm->suspended = true; in nv50_mstm_fini()
1469 if (mstm->is_mst) in nv50_mstm_fini()
1470 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1476 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1479 if (!mstm) in nv50_mstm_init()
1482 if (mstm->is_mst) { in nv50_mstm_init()
1483 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1485 nv50_mstm_remove(mstm); in nv50_mstm_init()
1489 mstm->suspended = false; in nv50_mstm_init()
1493 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1499 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1500 if (mstm) { in nv50_mstm_del()
1501 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1513 struct nv50_mstm *mstm; in nv50_mstm_new() local
1516 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1518 mstm->outp = outp; in nv50_mstm_new()
1519 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1521 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1862 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1932 &nv_encoder->dp.mstm); in nv50_sor_create()
2104 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
2110 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
2111 if (mstm->modified) in nv50_disp_atomic_commit_core()
2112 nv50_mstm_prepare(state, mst_state, mstm); in nv50_disp_atomic_commit_core()
2122 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
2123 if (mstm->modified) in nv50_disp_atomic_commit_core()
2124 nv50_mstm_cleanup(state, mst_state, mstm); in nv50_disp_atomic_commit_core()