static unsigned int gsc_m2m_poll(struct file *file, struct poll_table_struct *wait) { struct gsc_ctx *ctx = fh_to_ctx(file->private_data); return v4l2_m2m_poll(file, ctx->m2m_ctx, wait); }
static unsigned int rot_poll(struct file *file, struct poll_table_struct *wait) { struct rot_ctx *ctx = file->private_data; return v4l2_m2m_poll(file, ctx->m2m_ctx, wait); }
/* * msm_jpegdma_poll - Fd device pool method. * @file: Pointer to file struct. * @wait: Pointer to pool table struct. */ static unsigned int msm_jpegdma_poll(struct file *file, struct poll_table_struct *wait) { struct jpegdma_ctx *ctx = msm_jpegdma_ctx_from_fh(file->private_data); return v4l2_m2m_poll(file, ctx->m2m_ctx, wait); }
static unsigned int g2d_poll(struct file *file, struct poll_table_struct *wait) { struct g2d_ctx *ctx = fh2ctx(file->private_data); struct g2d_dev *dev = ctx->dev; unsigned int res; mutex_lock(&dev->mutex); res = v4l2_m2m_poll(file, ctx->m2m_ctx, wait); mutex_unlock(&dev->mutex); return res; }
static unsigned int s5p_jpeg_poll(struct file *file, struct poll_table_struct *wait) { struct s5p_jpeg *jpeg = video_drvdata(file); struct s5p_jpeg_ctx *ctx = fh_to_ctx(file->private_data); unsigned int res; mutex_lock(&jpeg->lock); res = v4l2_m2m_poll(file, ctx->m2m_ctx, wait); mutex_unlock(&jpeg->lock); return res; }
static __poll_t gsc_m2m_poll(struct file *file, struct poll_table_struct *wait) { struct gsc_ctx *ctx = fh_to_ctx(file->private_data); struct gsc_dev *gsc = ctx->gsc_dev; __poll_t ret; if (mutex_lock_interruptible(&gsc->lock)) return EPOLLERR; ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait); mutex_unlock(&gsc->lock); return ret; }
static unsigned int fimc_m2m_poll(struct file *file, struct poll_table_struct *wait) { struct fimc_ctx *ctx = fh_to_ctx(file->private_data); struct fimc_dev *fimc = ctx->fimc_dev; int ret; if (mutex_lock_interruptible(&fimc->lock)) return -ERESTARTSYS; ret = v4l2_m2m_poll(file, ctx->m2m_ctx, wait); mutex_unlock(&fimc->lock); return ret; }
unsigned int v4l2_m2m_fop_poll(struct file *file, poll_table *wait) { struct v4l2_fh *fh = file->private_data; struct v4l2_m2m_ctx *m2m_ctx = fh->m2m_ctx; unsigned int ret; if (m2m_ctx->q_lock) mutex_lock(m2m_ctx->q_lock); ret = v4l2_m2m_poll(file, m2m_ctx, wait); if (m2m_ctx->q_lock) mutex_unlock(m2m_ctx->q_lock); return ret; }