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
973 mst_state = drm_atomic_get_mst_topology_state(state, &mstm->mgr); in nv50_msto_atomic_check()
978 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_msto_atomic_check()
980 mst_state->pbn_div = drm_dp_get_vc_payload_bw(&mstm->mgr, in nv50_msto_atomic_check()
984 slots = drm_dp_atomic_find_time_slots(state, &mstm->mgr, mstc->port, asyh->dp.pbn); in nv50_msto_atomic_check()
1012 struct nv50_mstm *mstm = NULL; in nv50_msto_atomic_enable() local
1021 mstm = mstc->mstm; in nv50_msto_atomic_enable()
1030 if (!mstm->links++) { in nv50_msto_atomic_enable()
1032 nvif_outp_acquire_dp(&mstm->outp->outp, mstm->outp->dp.dpcd, 0, 0, false, true); in nv50_msto_atomic_enable()
1035 if (mstm->outp->outp.or.link & 1) in nv50_msto_atomic_enable()
1040 mstm->outp->update(mstm->outp, head->base.index, asyh, proto, in nv50_msto_atomic_enable()
1045 mstm->modified = true; in nv50_msto_atomic_enable()
1053 struct nv50_mstm *mstm = mstc->mstm; in nv50_msto_atomic_disable() local
1055 mstm->outp->update(mstm->outp, msto->head->base.index, NULL, 0, 0); in nv50_msto_atomic_disable()
1056 mstm->modified = true; in nv50_msto_atomic_disable()
1057 if (!--mstm->links) in nv50_msto_atomic_disable()
1058 mstm->disabled = true; in nv50_msto_atomic_disable()
1114 if (!(mstc->mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_atomic_best_encoder()
1125 struct nouveau_encoder *outp = mstc->mstm->outp; in nv50_mstc_mode_valid()
1168 struct drm_dp_mst_topology_mgr *mgr = &mstc->mstm->mgr; in nv50_mstc_atomic_check()
1232 nv50_mstc_new(struct nv50_mstm *mstm, struct drm_dp_mst_port *port, in nv50_mstc_new() argument
1235 struct drm_device *dev = mstm->outp->base.base.dev; in nv50_mstc_new()
1242 mstc->mstm = mstm; in nv50_mstc_new()
1259 if (!(mstm->outp->dcb->heads & drm_crtc_mask(crtc))) in nv50_mstc_new()
1276 struct nv50_mstm *mstm) in nv50_mstm_cleanup() argument
1278 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_cleanup()
1281 NV_ATOMIC(drm, "%s: mstm cleanup\n", mstm->outp->base.base.name); in nv50_mstm_cleanup()
1282 drm_dp_check_act_status(&mstm->mgr); in nv50_mstm_cleanup()
1284 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_cleanup()
1288 if (mstc && mstc->mstm == mstm) in nv50_mstm_cleanup()
1289 nv50_msto_cleanup(state, mst_state, &mstm->mgr, msto); in nv50_mstm_cleanup()
1293 mstm->modified = false; in nv50_mstm_cleanup()
1299 struct nv50_mstm *mstm) in nv50_mstm_prepare() argument
1301 struct nouveau_drm *drm = nouveau_drm(mstm->outp->base.base.dev); in nv50_mstm_prepare()
1304 NV_ATOMIC(drm, "%s: mstm prepare\n", mstm->outp->base.base.name); in nv50_mstm_prepare()
1307 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1311 if (mstc && mstc->mstm == mstm && msto->disabled) in nv50_mstm_prepare()
1312 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1319 drm_for_each_encoder(encoder, mstm->outp->base.base.dev) { in nv50_mstm_prepare()
1323 if (mstc && mstc->mstm == mstm && !msto->disabled) in nv50_mstm_prepare()
1324 nv50_msto_prepare(state, mst_state, &mstm->mgr, msto); in nv50_mstm_prepare()
1328 if (mstm->disabled) { in nv50_mstm_prepare()
1329 if (!mstm->links) in nv50_mstm_prepare()
1330 nvif_outp_release(&mstm->outp->outp); in nv50_mstm_prepare()
1331 mstm->disabled = false; in nv50_mstm_prepare()
1339 struct nv50_mstm *mstm = nv50_mstm(mgr); in nv50_mstm_add_connector() local
1343 ret = nv50_mstc_new(mstm, port, path, &mstc); in nv50_mstm_add_connector()
1358 struct nv50_mstm *mstm) in nv50_mstm_service() argument
1374 drm_dp_mst_hpd_irq_handle_event(&mstm->mgr, esi, ack, &handled); in nv50_mstm_service()
1385 drm_dp_mst_hpd_irq_send_new_request(&mstm->mgr); in nv50_mstm_service()
1396 nv50_mstm_remove(struct nv50_mstm *mstm) in nv50_mstm_remove() argument
1398 mstm->is_mst = false; in nv50_mstm_remove()
1399 drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, false); in nv50_mstm_remove()
1405 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_detect() local
1409 if (!mstm || !mstm->can_mst) in nv50_mstm_detect()
1412 aux = mstm->mgr.aux; in nv50_mstm_detect()
1422 ret = drm_dp_mst_topology_mgr_set_mst(&mstm->mgr, true); in nv50_mstm_detect()
1426 mstm->is_mst = true; in nv50_mstm_detect()
1433 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_fini() local
1435 if (!mstm) in nv50_mstm_fini()
1443 mstm->suspended = true; in nv50_mstm_fini()
1446 if (mstm->is_mst) in nv50_mstm_fini()
1447 drm_dp_mst_topology_mgr_suspend(&mstm->mgr); in nv50_mstm_fini()
1453 struct nv50_mstm *mstm = outp->dp.mstm; in nv50_mstm_init() local
1456 if (!mstm) in nv50_mstm_init()
1459 if (mstm->is_mst) { in nv50_mstm_init()
1460 ret = drm_dp_mst_topology_mgr_resume(&mstm->mgr, !runtime); in nv50_mstm_init()
1462 nv50_mstm_remove(mstm); in nv50_mstm_init()
1466 mstm->suspended = false; in nv50_mstm_init()
1470 drm_kms_helper_hotplug_event(mstm->mgr.dev); in nv50_mstm_init()
1476 struct nv50_mstm *mstm = *pmstm; in nv50_mstm_del() local
1477 if (mstm) { in nv50_mstm_del()
1478 drm_dp_mst_topology_mgr_destroy(&mstm->mgr); in nv50_mstm_del()
1490 struct nv50_mstm *mstm; in nv50_mstm_new() local
1493 if (!(mstm = *pmstm = kzalloc(sizeof(*mstm), GFP_KERNEL))) in nv50_mstm_new()
1495 mstm->outp = outp; in nv50_mstm_new()
1496 mstm->mgr.cbs = &nv50_mstm; in nv50_mstm_new()
1498 ret = drm_dp_mst_topology_mgr_init(&mstm->mgr, dev, aux, aux_max, in nv50_mstm_new()
1696 nv50_mstm_del(&nv_encoder->dp.mstm); in nv50_sor_destroy()
1781 &nv_encoder->dp.mstm); in nv50_sor_create()
1955 struct nv50_mstm *mstm; in nv50_disp_atomic_commit_core() local
1961 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
1962 if (mstm->modified) in nv50_disp_atomic_commit_core()
1963 nv50_mstm_prepare(state, mst_state, mstm); in nv50_disp_atomic_commit_core()
1973 mstm = nv50_mstm(mgr); in nv50_disp_atomic_commit_core()
1974 if (mstm->modified) in nv50_disp_atomic_commit_core()
1975 nv50_mstm_cleanup(state, mst_state, mstm); in nv50_disp_atomic_commit_core()