Lines Matching refs:mstm

925 	struct nv50_mstm *mstm;  member
952 return msto->mstc->mstm->outp; in nv50_real_outp()
960 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_payload() local
963 WARN_ON(!mutex_is_locked(&mstm->mgr.payload_lock)); in nv50_msto_payload()
966 for (i = 0; i < mstm->mgr.max_payloads; i++) { in nv50_msto_payload()
967 struct drm_dp_payload *payload = &mstm->mgr.payloads[i]; in nv50_msto_payload()
969 mstm->outp->base.base.name, i, payload->vcpi, in nv50_msto_payload()
973 for (i = 0; i < mstm->mgr.max_payloads; i++) { in nv50_msto_payload()
974 struct drm_dp_payload *payload = &mstm->mgr.payloads[i]; in nv50_msto_payload()
987 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_cleanup() local
994 drm_dp_mst_deallocate_vcpi(&mstm->mgr, mstc->port); in nv50_msto_cleanup()
1005 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_prepare() local
1012 .base.hasht = mstm->outp->dcb->hasht, in nv50_msto_prepare()
1013 .base.hashm = (0xf0ff & mstm->outp->dcb->hashm) | in nv50_msto_prepare()
1017 mutex_lock(&mstm->mgr.payload_lock); in nv50_msto_prepare()
1036 mutex_unlock(&mstm->mgr.payload_lock); in nv50_msto_prepare()
1047 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_check() local
1073 slots = drm_dp_atomic_find_vcpi_slots(state, &mstm->mgr, mstc->port, in nv50_msto_atomic_check()
1102 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1112 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1121 r = drm_dp_mst_allocate_vcpi(&mstm->mgr, mstc->port, asyh->dp.pbn, asyh->dp.tu); in nv50_msto_atomic_enable()
1125 if (!mstm->links++) in nv50_msto_atomic_enable()
1126 nv50_outp_acquire(mstm->outp, false /*XXX: MST audio.*/); in nv50_msto_atomic_enable()
1128 if (mstm->outp->link & 1) in nv50_msto_atomic_enable()
1133 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1137 mstm->modified = true; in nv50_msto_atomic_enable()
1145 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1147 drm_dp_mst_reset_vcpi_slots(&mstm->mgr, mstc->port); in nv50_msto_atomic_disable()
1149 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1150 mstm->modified = true; in nv50_msto_atomic_disable()
1151 if (!--mstm->links) in nv50_msto_atomic_disable()
1152 mstm->disabled = true; in nv50_msto_atomic_disable()
1208 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1219 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1262 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1347 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1350 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1357 mstc->mstm = mstm; in nv50_mstc_new()
1374 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1389 nv50_mstm_cleanup(struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1391 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1394 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1395 drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1397 drm_dp_update_payload_part2(&mstm->mgr); in nv50_mstm_cleanup()
1399 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1403 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1408 mstm->modified = false; in nv50_mstm_cleanup()
1412 nv50_mstm_prepare(struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1414 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1417 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1418 drm_dp_update_payload_part1(&mstm->mgr, 1); in nv50_mstm_prepare()
1420 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1424 if (mstc && mstc->mstm == mstm) in nv50_mstm_prepare()
1429 if (mstm->disabled) { in nv50_mstm_prepare()
1430 if (!mstm->links) in nv50_mstm_prepare()
1431 nv50_outp_release(mstm->outp); in nv50_mstm_prepare()
1432 mstm->disabled = false; in nv50_mstm_prepare()
1440 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1444 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1459 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1473 drm_dp_mst_hpd_irq(&mstm->mgr, esi, &handled); in nv50_mstm_service()
1493 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1495 mstm->is_mst = false; in nv50_mstm_remove()
1496 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1500 nv50_mstm_enable(struct nv50_mstm *mstm, int state) in nv50_mstm_enable() argument
1502 struct nouveau_encoder *outp = mstm->outp; in nv50_mstm_enable()
1522 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1526 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1529 aux = mstm->mgr.aux; in nv50_mstm_detect()
1539 ret = nv50_mstm_enable(mstm, true); in nv50_mstm_detect()
1543 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1545 nv50_mstm_enable(mstm, false); in nv50_mstm_detect()
1549 mstm->is_mst = true; in nv50_mstm_detect()
1556 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1558 if (!mstm) in nv50_mstm_fini()
1566 mstm->suspended = true; in nv50_mstm_fini()
1569 if (mstm->is_mst) in nv50_mstm_fini()
1570 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1576 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1579 if (!mstm) in nv50_mstm_init()
1582 if (mstm->is_mst) { in nv50_mstm_init()
1583 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1585 nv50_mstm_remove(mstm); in nv50_mstm_init()
1589 mstm->suspended = false; in nv50_mstm_init()
1593 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1599 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1600 if (mstm) { in nv50_mstm_del()
1601 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1613 struct nv50_mstm *mstm; in nv50_mstm_new() local
1616 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1618 mstm->outp = outp; in nv50_mstm_new()
1619 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1621 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1825 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1910 &nv_encoder->dp.mstm); in nv50_sor_create()
2072 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
2079 mstm = nouveau_encoder(encoder)->dp.mstm; in nv50_disp_atomic_commit_core()
2080 if (mstm && mstm->modified) in nv50_disp_atomic_commit_core()
2081 nv50_mstm_prepare(mstm); in nv50_disp_atomic_commit_core()
2093 mstm = nouveau_encoder(encoder)->dp.mstm; in nv50_disp_atomic_commit_core()
2094 if (mstm && mstm->modified) in nv50_disp_atomic_commit_core()
2095 nv50_mstm_cleanup(mstm); in nv50_disp_atomic_commit_core()