Lines Matching refs:q_ctx
85 struct v4l2_m2m_queue_ctx *q_ctx; in v4l2_m2m_get_vq() local
87 q_ctx = get_queue_ctx(m2m_ctx, type); in v4l2_m2m_get_vq()
88 if (!q_ctx) in v4l2_m2m_get_vq()
91 return &q_ctx->q; in v4l2_m2m_get_vq()
98 void *v4l2_m2m_next_buf(struct v4l2_m2m_queue_ctx *q_ctx) in v4l2_m2m_next_buf() argument
103 spin_lock_irqsave(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_next_buf()
105 if (list_empty(&q_ctx->rdy_queue)) { in v4l2_m2m_next_buf()
106 spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_next_buf()
110 b = list_first_entry(&q_ctx->rdy_queue, struct v4l2_m2m_buffer, list); in v4l2_m2m_next_buf()
111 spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_next_buf()
120 void *v4l2_m2m_buf_remove(struct v4l2_m2m_queue_ctx *q_ctx) in v4l2_m2m_buf_remove() argument
125 spin_lock_irqsave(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_buf_remove()
126 if (list_empty(&q_ctx->rdy_queue)) { in v4l2_m2m_buf_remove()
127 spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_buf_remove()
130 b = list_first_entry(&q_ctx->rdy_queue, struct v4l2_m2m_buffer, list); in v4l2_m2m_buf_remove()
132 q_ctx->num_rdy--; in v4l2_m2m_buf_remove()
133 spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_buf_remove()
481 struct v4l2_m2m_queue_ctx *q_ctx; in v4l2_m2m_streamoff() local
488 q_ctx = get_queue_ctx(m2m_ctx, type); in v4l2_m2m_streamoff()
489 ret = vb2_streamoff(&q_ctx->q, type); in v4l2_m2m_streamoff()
500 spin_lock_irqsave(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_streamoff()
503 INIT_LIST_HEAD(&q_ctx->rdy_queue); in v4l2_m2m_streamoff()
504 q_ctx->num_rdy = 0; in v4l2_m2m_streamoff()
505 spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_streamoff()
745 struct v4l2_m2m_queue_ctx *q_ctx; in v4l2_m2m_buf_queue() local
748 q_ctx = get_queue_ctx(m2m_ctx, vb->vb2_queue->type); in v4l2_m2m_buf_queue()
749 if (!q_ctx) in v4l2_m2m_buf_queue()
752 spin_lock_irqsave(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_buf_queue()
753 list_add_tail(&b->list, &q_ctx->rdy_queue); in v4l2_m2m_buf_queue()
754 q_ctx->num_rdy++; in v4l2_m2m_buf_queue()
755 spin_unlock_irqrestore(&q_ctx->rdy_spinlock, flags); in v4l2_m2m_buf_queue()