Loading drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c +17 −3 Original line number Diff line number Diff line Loading @@ -674,9 +674,13 @@ static int msm_fd_s_fmt_vid_out(struct file *file, static int msm_fd_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *req) { int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); return vb2_reqbufs(&ctx->vb2_q, req); mutex_lock(&ctx->fd_device->recovery_lock); ret = vb2_reqbufs(&ctx->vb2_q, req); mutex_unlock(&ctx->fd_device->recovery_lock); return ret; } /* Loading @@ -688,9 +692,14 @@ static int msm_fd_reqbufs(struct file *file, static int msm_fd_qbuf(struct file *file, void *fh, struct v4l2_buffer *pb) { int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); return vb2_qbuf(&ctx->vb2_q, pb); mutex_lock(&ctx->fd_device->recovery_lock); ret = vb2_qbuf(&ctx->vb2_q, pb); mutex_unlock(&ctx->fd_device->recovery_lock); return ret; } /* Loading @@ -702,9 +711,13 @@ static int msm_fd_qbuf(struct file *file, void *fh, static int msm_fd_dqbuf(struct file *file, void *fh, struct v4l2_buffer *pb) { int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); return vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); mutex_lock(&ctx->fd_device->recovery_lock); ret = vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); mutex_unlock(&ctx->fd_device->recovery_lock); return ret; } /* Loading Loading @@ -1226,6 +1239,7 @@ static int fd_probe(struct platform_device *pdev) mutex_init(&fd->lock); spin_lock_init(&fd->slock); mutex_init(&fd->recovery_lock); fd->dev = &pdev->dev; /* Get resources */ Loading drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.h +1 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ enum msm_fd_mem_resources { struct msm_fd_device { struct mutex lock; spinlock_t slock; struct mutex recovery_lock; int ref_count; int irq_num; Loading Loading
drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.c +17 −3 Original line number Diff line number Diff line Loading @@ -674,9 +674,13 @@ static int msm_fd_s_fmt_vid_out(struct file *file, static int msm_fd_reqbufs(struct file *file, void *fh, struct v4l2_requestbuffers *req) { int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); return vb2_reqbufs(&ctx->vb2_q, req); mutex_lock(&ctx->fd_device->recovery_lock); ret = vb2_reqbufs(&ctx->vb2_q, req); mutex_unlock(&ctx->fd_device->recovery_lock); return ret; } /* Loading @@ -688,9 +692,14 @@ static int msm_fd_reqbufs(struct file *file, static int msm_fd_qbuf(struct file *file, void *fh, struct v4l2_buffer *pb) { int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); return vb2_qbuf(&ctx->vb2_q, pb); mutex_lock(&ctx->fd_device->recovery_lock); ret = vb2_qbuf(&ctx->vb2_q, pb); mutex_unlock(&ctx->fd_device->recovery_lock); return ret; } /* Loading @@ -702,9 +711,13 @@ static int msm_fd_qbuf(struct file *file, void *fh, static int msm_fd_dqbuf(struct file *file, void *fh, struct v4l2_buffer *pb) { int ret; struct fd_ctx *ctx = msm_fd_ctx_from_fh(fh); return vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); mutex_lock(&ctx->fd_device->recovery_lock); ret = vb2_dqbuf(&ctx->vb2_q, pb, file->f_flags & O_NONBLOCK); mutex_unlock(&ctx->fd_device->recovery_lock); return ret; } /* Loading Loading @@ -1226,6 +1239,7 @@ static int fd_probe(struct platform_device *pdev) mutex_init(&fd->lock); spin_lock_init(&fd->slock); mutex_init(&fd->recovery_lock); fd->dev = &pdev->dev; /* Get resources */ Loading
drivers/media/platform/msm/camera_v2/fd/msm_fd_dev.h +1 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,7 @@ enum msm_fd_mem_resources { struct msm_fd_device { struct mutex lock; spinlock_t slock; struct mutex recovery_lock; int ref_count; int irq_num; Loading