Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87b83785 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Fix race condition in DCVS"

parents b3604cf3 0381ca18
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -130,6 +130,7 @@ static inline int get_pending_bufs_fw(struct msm_vidc_inst *inst)

		fw_out_qsize = inst->count.ftb - inst->count.fbd;

		mutex_lock(&inst->registeredbufs.lock);
		list_for_each_entry(temp, &inst->registeredbufs.list, list) {
			if (temp->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE &&
				!temp->inactive &&
@@ -137,6 +138,7 @@ static inline int get_pending_bufs_fw(struct msm_vidc_inst *inst)
				buffers_in_driver++;
			}
		}
		mutex_unlock(&inst->registeredbufs.lock);
	}

	return fw_out_qsize + buffers_in_driver;