Lines Matching refs:seq
29 struct nvkm_falcon_qmgr_seq *seq; in nvkm_falcon_qmgr_seq_acquire() local
32 mutex_lock(&qmgr->seq.mutex); in nvkm_falcon_qmgr_seq_acquire()
33 index = find_first_zero_bit(qmgr->seq.tbl, NVKM_FALCON_QMGR_SEQ_NUM); in nvkm_falcon_qmgr_seq_acquire()
36 mutex_unlock(&qmgr->seq.mutex); in nvkm_falcon_qmgr_seq_acquire()
40 set_bit(index, qmgr->seq.tbl); in nvkm_falcon_qmgr_seq_acquire()
41 mutex_unlock(&qmgr->seq.mutex); in nvkm_falcon_qmgr_seq_acquire()
43 seq = &qmgr->seq.id[index]; in nvkm_falcon_qmgr_seq_acquire()
44 seq->state = SEQ_STATE_PENDING; in nvkm_falcon_qmgr_seq_acquire()
45 return seq; in nvkm_falcon_qmgr_seq_acquire()
50 struct nvkm_falcon_qmgr_seq *seq) in nvkm_falcon_qmgr_seq_release() argument
53 seq->state = SEQ_STATE_FREE; in nvkm_falcon_qmgr_seq_release()
54 seq->callback = NULL; in nvkm_falcon_qmgr_seq_release()
55 reinit_completion(&seq->done); in nvkm_falcon_qmgr_seq_release()
56 clear_bit(seq->id, qmgr->seq.tbl); in nvkm_falcon_qmgr_seq_release()
80 mutex_init(&qmgr->seq.mutex); in nvkm_falcon_qmgr_new()
82 qmgr->seq.id[i].id = i; in nvkm_falcon_qmgr_new()
83 init_completion(&qmgr->seq.id[i].done); in nvkm_falcon_qmgr_new()