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()
998 slots = drm_dp_atomic_find_time_slots(state, &mstm->mgr, mstc->port, asyh->dp.pbn); in nv50_msto_atomic_check()
1026 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1035 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1044 if (!mstm->links++) { in nv50_msto_atomic_enable()
1045 nvif_outp_acquire_sor(&mstm->outp->outp, false /*TODO: MST audio... */); in nv50_msto_atomic_enable()
1046 nouveau_dp_train(mstm->outp, true, 0, 0); in nv50_msto_atomic_enable()
1050 if (!WARN_ON(nvif_outp_dp_mst_id_get(&mstm->outp->outp, &msto->display_id))) in nv50_msto_atomic_enable()
1054 if (mstm->outp->outp.or.link & 1) in nv50_msto_atomic_enable()
1059 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1064 mstm->modified = true; in nv50_msto_atomic_enable()
1072 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1077 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1078 mstm->modified = true; in nv50_msto_atomic_disable()
1079 if (!--mstm->links) in nv50_msto_atomic_disable()
1080 mstm->disabled = true; in nv50_msto_atomic_disable()
1136 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1147 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1190 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1254 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1257 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1264 mstc->mstm = mstm; in nv50_mstc_new()
1281 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1298 struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1300 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1303 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1304 drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1306 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1310 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1311 nv50_msto_cleanup(state, mst_state, &mstm->mgr, msto); in nv50_mstm_cleanup()
1315 if (mstm->disabled) { in nv50_mstm_cleanup()
1316 nouveau_dp_power_down(mstm->outp); in nv50_mstm_cleanup()
1317 nvif_outp_release(&mstm->outp->outp); in nv50_mstm_cleanup()
1318 mstm->disabled = false; in nv50_mstm_cleanup()
1321 mstm->modified = false; in nv50_mstm_cleanup()
1327 struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1329 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1332 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1335 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1339 if (mstc && mstc->mstm == mstm && msto->disabled) in nv50_mstm_prepare()
1340 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1347 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1351 if (mstc && mstc->mstm == mstm && !msto->disabled) in nv50_mstm_prepare()
1352 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1361 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1365 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1380 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1396 drm_dp_mst_hpd_irq_handle_event(&mstm->mgr, esi, ack, &handled); in nv50_mstm_service()
1407 drm_dp_mst_hpd_irq_send_new_request(&mstm->mgr); in nv50_mstm_service()
1418 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1420 mstm->is_mst = false; in nv50_mstm_remove()
1421 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1427 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1431 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1434 aux = mstm->mgr.aux; in nv50_mstm_detect()
1444 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1448 mstm->is_mst = true; in nv50_mstm_detect()
1455 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1457 if (!mstm) in nv50_mstm_fini()
1465 mstm->suspended = true; in nv50_mstm_fini()
1468 if (mstm->is_mst) in nv50_mstm_fini()
1469 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1475 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1478 if (!mstm) in nv50_mstm_init()
1481 if (mstm->is_mst) { in nv50_mstm_init()
1482 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1484 nv50_mstm_remove(mstm); in nv50_mstm_init()
1488 mstm->suspended = false; in nv50_mstm_init()
1492 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1498 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1499 if (mstm) { in nv50_mstm_del()
1500 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1512 struct nv50_mstm *mstm; in nv50_mstm_new() local
1515 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1517 mstm->outp = outp; in nv50_mstm_new()
1518 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1520 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1861 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1931 &nv_encoder->dp.mstm); in nv50_sor_create()
2103 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
2109 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
2110 if (mstm->modified) in nv50_disp_atomic_commit_core()
2111 nv50_mstm_prepare(state, mst_state, mstm); in nv50_disp_atomic_commit_core()
2121 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
2122 if (mstm->modified) in nv50_disp_atomic_commit_core()
2123 nv50_mstm_cleanup(state, mst_state, mstm); in nv50_disp_atomic_commit_core()