Lines Matching refs:mstm

922 	struct nv50_mstm *mstm;  member
949 return msto->mstc->mstm->outp; in nv50_real_outp()
957 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_payload() local
960 WARN_ON(!mutex_is_locked(&mstm->mgr.payload_lock)); in nv50_msto_payload()
963 for (i = 0; i < mstm->mgr.max_payloads; i++) { in nv50_msto_payload()
964 struct drm_dp_payload *payload = &mstm->mgr.payloads[i]; in nv50_msto_payload()
966 mstm->outp->base.base.name, i, payload->vcpi, in nv50_msto_payload()
970 for (i = 0; i < mstm->mgr.max_payloads; i++) { in nv50_msto_payload()
971 struct drm_dp_payload *payload = &mstm->mgr.payloads[i]; in nv50_msto_payload()
984 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_cleanup() local
991 drm_dp_mst_deallocate_vcpi(&mstm->mgr, mstc->port); in nv50_msto_cleanup()
1002 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_prepare() local
1009 .base.hasht = mstm->outp->dcb->hasht, in nv50_msto_prepare()
1010 .base.hashm = (0xf0ff & mstm->outp->dcb->hashm) | in nv50_msto_prepare()
1014 mutex_lock(&mstm->mgr.payload_lock); in nv50_msto_prepare()
1033 mutex_unlock(&mstm->mgr.payload_lock); in nv50_msto_prepare()
1044 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_check() local
1070 slots = drm_dp_atomic_find_vcpi_slots(state, &mstm->mgr, mstc->port, in nv50_msto_atomic_check()
1099 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1109 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1118 r = drm_dp_mst_allocate_vcpi(&mstm->mgr, mstc->port, asyh->dp.pbn, asyh->dp.tu); in nv50_msto_atomic_enable()
1122 if (!mstm->links++) in nv50_msto_atomic_enable()
1123 nv50_outp_acquire(mstm->outp, false /*XXX: MST audio.*/); in nv50_msto_atomic_enable()
1125 if (mstm->outp->link & 1) in nv50_msto_atomic_enable()
1130 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1134 mstm->modified = true; in nv50_msto_atomic_enable()
1142 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1144 drm_dp_mst_reset_vcpi_slots(&mstm->mgr, mstc->port); in nv50_msto_atomic_disable()
1146 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1147 mstm->modified = true; in nv50_msto_atomic_disable()
1148 if (!--mstm->links) in nv50_msto_atomic_disable()
1149 mstm->disabled = true; in nv50_msto_atomic_disable()
1205 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1216 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1259 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1344 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1347 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1354 mstc->mstm = mstm; in nv50_mstc_new()
1371 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1386 nv50_mstm_cleanup(struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1388 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1392 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1393 ret = drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1395 ret = drm_dp_update_payload_part2(&mstm->mgr); in nv50_mstm_cleanup()
1397 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1401 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1406 mstm->modified = false; in nv50_mstm_cleanup()
1410 nv50_mstm_prepare(struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1412 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1416 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1417 ret = drm_dp_update_payload_part1(&mstm->mgr); in nv50_mstm_prepare()
1419 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1423 if (mstc && mstc->mstm == mstm) in nv50_mstm_prepare()
1428 if (mstm->disabled) { in nv50_mstm_prepare()
1429 if (!mstm->links) in nv50_mstm_prepare()
1430 nv50_outp_release(mstm->outp); in nv50_mstm_prepare()
1431 mstm->disabled = false; in nv50_mstm_prepare()
1439 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1443 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1458 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1472 drm_dp_mst_hpd_irq(&mstm->mgr, esi, &handled); in nv50_mstm_service()
1492 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1494 mstm->is_mst = false; in nv50_mstm_remove()
1495 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1499 nv50_mstm_enable(struct nv50_mstm *mstm, int state) in nv50_mstm_enable() argument
1501 struct nouveau_encoder *outp = mstm->outp; in nv50_mstm_enable()
1521 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1525 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1528 aux = mstm->mgr.aux; in nv50_mstm_detect()
1538 ret = nv50_mstm_enable(mstm, true); in nv50_mstm_detect()
1542 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1544 nv50_mstm_enable(mstm, false); in nv50_mstm_detect()
1548 mstm->is_mst = true; in nv50_mstm_detect()
1555 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1557 if (!mstm) in nv50_mstm_fini()
1565 mstm->suspended = true; in nv50_mstm_fini()
1568 if (mstm->is_mst) in nv50_mstm_fini()
1569 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1575 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1578 if (!mstm) in nv50_mstm_init()
1581 if (mstm->is_mst) { in nv50_mstm_init()
1582 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1584 nv50_mstm_remove(mstm); in nv50_mstm_init()
1588 mstm->suspended = false; in nv50_mstm_init()
1592 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1598 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1599 if (mstm) { in nv50_mstm_del()
1600 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1612 struct nv50_mstm *mstm; in nv50_mstm_new() local
1615 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1617 mstm->outp = outp; in nv50_mstm_new()
1618 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1620 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1824 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1909 &nv_encoder->dp.mstm); in nv50_sor_create()
2071 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
2078 mstm = nouveau_encoder(encoder)->dp.mstm; in nv50_disp_atomic_commit_core()
2079 if (mstm && mstm->modified) in nv50_disp_atomic_commit_core()
2080 nv50_mstm_prepare(mstm); in nv50_disp_atomic_commit_core()
2092 mstm = nouveau_encoder(encoder)->dp.mstm; in nv50_disp_atomic_commit_core()
2093 if (mstm && mstm->modified) in nv50_disp_atomic_commit_core()
2094 nv50_mstm_cleanup(mstm); in nv50_disp_atomic_commit_core()