Lines Matching refs:mstm
852 struct nv50_mstm *mstm; member
880 return msto->mstc->mstm->outp; in nv50_real_outp()
912 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_prepare() local
927 nvif_outp_dp_mst_vcpi(&mstm->outp->outp, msto->head->base.index, 0, 0, 0, 0); in nv50_msto_prepare()
932 nvif_outp_dp_mst_vcpi(&mstm->outp->outp, msto->head->base.index, in nv50_msto_prepare()
947 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_check() local
972 mst_state = drm_atomic_get_mst_topology_state(state, &mstm->mgr); in nv50_msto_atomic_check()
977 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_msto_atomic_check()
979 mst_state->pbn_div = drm_dp_get_vc_payload_bw(&mstm->mgr, in nv50_msto_atomic_check()
983 slots = drm_dp_atomic_find_time_slots(state, &mstm->mgr, mstc->port, asyh->dp.pbn); in nv50_msto_atomic_check()
1011 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1020 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1029 if (!mstm->links++) { in nv50_msto_atomic_enable()
1031 nvif_outp_acquire_dp(&mstm->outp->outp, mstm->outp->dp.dpcd, 0, 0, false, true); in nv50_msto_atomic_enable()
1034 if (mstm->outp->outp.or.link & 1) in nv50_msto_atomic_enable()
1039 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1044 mstm->modified = true; in nv50_msto_atomic_enable()
1052 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1054 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1055 mstm->modified = true; in nv50_msto_atomic_disable()
1056 if (!--mstm->links) in nv50_msto_atomic_disable()
1057 mstm->disabled = true; in nv50_msto_atomic_disable()
1113 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1124 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1167 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1231 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1234 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1241 mstc->mstm = mstm; in nv50_mstc_new()
1258 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1275 struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1277 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1280 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1281 drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1283 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1287 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1288 nv50_msto_cleanup(state, mst_state, &mstm->mgr, msto); in nv50_mstm_cleanup()
1292 mstm->modified = false; in nv50_mstm_cleanup()
1298 struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1300 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1303 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1306 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1310 if (mstc && mstc->mstm == mstm && msto->disabled) in nv50_mstm_prepare()
1311 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1318 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1322 if (mstc && mstc->mstm == mstm && !msto->disabled) in nv50_mstm_prepare()
1323 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1327 if (mstm->disabled) { in nv50_mstm_prepare()
1328 if (!mstm->links) in nv50_mstm_prepare()
1329 nvif_outp_release(&mstm->outp->outp); in nv50_mstm_prepare()
1330 mstm->disabled = false; in nv50_mstm_prepare()
1338 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1342 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1357 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1373 drm_dp_mst_hpd_irq_handle_event(&mstm->mgr, esi, ack, &handled); in nv50_mstm_service()
1384 drm_dp_mst_hpd_irq_send_new_request(&mstm->mgr); in nv50_mstm_service()
1395 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1397 mstm->is_mst = false; in nv50_mstm_remove()
1398 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1404 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1408 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1411 aux = mstm->mgr.aux; in nv50_mstm_detect()
1421 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1425 mstm->is_mst = true; in nv50_mstm_detect()
1432 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1434 if (!mstm) in nv50_mstm_fini()
1442 mstm->suspended = true; in nv50_mstm_fini()
1445 if (mstm->is_mst) in nv50_mstm_fini()
1446 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1452 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1455 if (!mstm) in nv50_mstm_init()
1458 if (mstm->is_mst) { in nv50_mstm_init()
1459 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1461 nv50_mstm_remove(mstm); in nv50_mstm_init()
1465 mstm->suspended = false; in nv50_mstm_init()
1469 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1475 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1476 if (mstm) { in nv50_mstm_del()
1477 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1489 struct nv50_mstm *mstm; in nv50_mstm_new() local
1492 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1494 mstm->outp = outp; in nv50_mstm_new()
1495 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1497 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1695 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1780 &nv_encoder->dp.mstm); in nv50_sor_create()
1954 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
1960 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
1961 if (mstm->modified) in nv50_disp_atomic_commit_core()
1962 nv50_mstm_prepare(state, mst_state, mstm); in nv50_disp_atomic_commit_core()
1972 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
1973 if (mstm->modified) in nv50_disp_atomic_commit_core()
1974 nv50_mstm_cleanup(state, mst_state, mstm); in nv50_disp_atomic_commit_core()