Lines Matching refs:mstm

920 	struct nv50_mstm *mstm;  member
948 return msto->mstc->mstm->outp; in nv50_real_outp()
980 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_prepare() local
988 .base.hasht = mstm->outp->dcb->hasht, in nv50_msto_prepare()
989 .base.hashm = (0xf0ff & mstm->outp->dcb->hashm) | in nv50_msto_prepare()
1027 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_check() local
1053 mst_state = drm_atomic_get_mst_topology_state(state, &mstm->mgr); in nv50_msto_atomic_check()
1058 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_msto_atomic_check()
1060 mst_state->pbn_div = drm_dp_get_vc_payload_bw(&mstm->mgr, in nv50_msto_atomic_check()
1064 slots = drm_dp_atomic_find_time_slots(state, &mstm->mgr, mstc->port, asyh->dp.pbn); in nv50_msto_atomic_check()
1092 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1101 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1110 if (!mstm->links++) in nv50_msto_atomic_enable()
1111 nv50_outp_acquire(mstm->outp, false /*XXX: MST audio.*/); in nv50_msto_atomic_enable()
1113 if (mstm->outp->link & 1) in nv50_msto_atomic_enable()
1118 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1123 mstm->modified = true; in nv50_msto_atomic_enable()
1131 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1133 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1134 mstm->modified = true; in nv50_msto_atomic_disable()
1135 if (!--mstm->links) in nv50_msto_atomic_disable()
1136 mstm->disabled = true; in nv50_msto_atomic_disable()
1192 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1203 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1246 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1310 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1313 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1320 mstc->mstm = mstm; in nv50_mstc_new()
1337 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1354 struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1356 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1359 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1360 drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1362 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1366 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1367 nv50_msto_cleanup(state, mst_state, &mstm->mgr, msto); in nv50_mstm_cleanup()
1371 mstm->modified = false; in nv50_mstm_cleanup()
1377 struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1379 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1382 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1385 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1389 if (mstc && mstc->mstm == mstm && msto->disabled) in nv50_mstm_prepare()
1390 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1397 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1401 if (mstc && mstc->mstm == mstm && !msto->disabled) in nv50_mstm_prepare()
1402 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1406 if (mstm->disabled) { in nv50_mstm_prepare()
1407 if (!mstm->links) in nv50_mstm_prepare()
1408 nv50_outp_release(mstm->outp); in nv50_mstm_prepare()
1409 mstm->disabled = false; in nv50_mstm_prepare()
1417 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1421 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1436 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1450 drm_dp_mst_hpd_irq(&mstm->mgr, esi, &handled); in nv50_mstm_service()
1470 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1472 mstm->is_mst = false; in nv50_mstm_remove()
1473 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1477 nv50_mstm_enable(struct nv50_mstm *mstm, int state) in nv50_mstm_enable() argument
1479 struct nouveau_encoder *outp = mstm->outp; in nv50_mstm_enable()
1499 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1503 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1506 aux = mstm->mgr.aux; in nv50_mstm_detect()
1516 ret = nv50_mstm_enable(mstm, true); in nv50_mstm_detect()
1520 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1522 nv50_mstm_enable(mstm, false); in nv50_mstm_detect()
1526 mstm->is_mst = true; in nv50_mstm_detect()
1533 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1535 if (!mstm) in nv50_mstm_fini()
1543 mstm->suspended = true; in nv50_mstm_fini()
1546 if (mstm->is_mst) in nv50_mstm_fini()
1547 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1553 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1556 if (!mstm) in nv50_mstm_init()
1559 if (mstm->is_mst) { in nv50_mstm_init()
1560 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1562 nv50_mstm_remove(mstm); in nv50_mstm_init()
1566 mstm->suspended = false; in nv50_mstm_init()
1570 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1576 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1577 if (mstm) { in nv50_mstm_del()
1578 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1590 struct nv50_mstm *mstm; in nv50_mstm_new() local
1593 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1595 mstm->outp = outp; in nv50_mstm_new()
1596 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1598 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1803 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1888 &nv_encoder->dp.mstm); in nv50_sor_create()
2056 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
2062 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
2063 if (mstm->modified) in nv50_disp_atomic_commit_core()
2064 nv50_mstm_prepare(state, mst_state, mstm); in nv50_disp_atomic_commit_core()
2074 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
2075 if (mstm->modified) in nv50_disp_atomic_commit_core()
2076 nv50_mstm_cleanup(state, mst_state, mstm); in nv50_disp_atomic_commit_core()