Lines Matching refs:cgrp
36 struct nvkm_cgrp *cgrp = NULL; in nvkm_engn_cgrp_get() local
48 cgrp = chan->cgrp; in nvkm_engn_cgrp_get()
50 cgrp = nvkm_runl_cgrp_get_cgid(engn->runl, id, pirqflags); in nvkm_engn_cgrp_get()
53 WARN_ON(!cgrp); in nvkm_engn_cgrp_get()
54 return cgrp; in nvkm_engn_cgrp_get()
61 struct nvkm_cgrp *cgrp, *gtmp; in nvkm_runl_rc() local
75 nvkm_runl_foreach_cgrp_safe(cgrp, gtmp, runl) { in nvkm_runl_rc()
76 state = atomic_cmpxchg(&cgrp->rc, NVKM_CGRP_RC_PENDING, NVKM_CGRP_RC_RUNNING); in nvkm_runl_rc()
79 nvkm_cgrp_foreach_chan_safe(chan, ctmp, cgrp) { in nvkm_runl_rc()
102 cgrp = nvkm_engn_cgrp_get(engn, &flags); in nvkm_runl_rc()
103 if (!cgrp) { in nvkm_runl_rc()
108 reset = atomic_read(&cgrp->rc) == NVKM_CGRP_RC_RUNNING; in nvkm_runl_rc()
109 nvkm_cgrp_put(&cgrp, flags); in nvkm_runl_rc()
145 nvkm_runl_rc_cgrp(struct nvkm_cgrp *cgrp) in nvkm_runl_rc_cgrp() argument
147 if (atomic_cmpxchg(&cgrp->rc, NVKM_CGRP_RC_NONE, NVKM_CGRP_RC_PENDING) != NVKM_CGRP_RC_NONE) in nvkm_runl_rc_cgrp()
150 CGRP_ERROR(cgrp, "rc scheduled"); in nvkm_runl_rc_cgrp()
151 nvkm_runl_rc_runl(cgrp->runl); in nvkm_runl_rc_cgrp()
157 struct nvkm_cgrp *cgrp; in nvkm_runl_rc_engn() local
161 cgrp = nvkm_engn_cgrp_get(engn, &flags); in nvkm_runl_rc_engn()
162 if (!cgrp) { in nvkm_runl_rc_engn()
167 nvkm_runl_rc_cgrp(cgrp); in nvkm_runl_rc_engn()
168 nvkm_cgrp_put(&cgrp, flags); in nvkm_runl_rc_engn()
195 spin_lock(&chan->cgrp->lock); in nvkm_runl_chan_get_inst()
217 spin_lock(&chan->cgrp->lock); in nvkm_runl_chan_get_chid()
231 struct nvkm_cgrp *cgrp; in nvkm_runl_cgrp_get_cgid() local
236 cgrp = cgid->data[id]; in nvkm_runl_cgrp_get_cgid()
237 if (likely(cgrp)) { in nvkm_runl_cgrp_get_cgid()
238 spin_lock(&cgrp->lock); in nvkm_runl_cgrp_get_cgid()
241 return cgrp; in nvkm_runl_cgrp_get_cgid()