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

Commit 3bfbbdd0 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: cvp: Add support for FD 0"

parents be21f8b0 6b0dc543
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -391,7 +391,7 @@ static int msm_cvp_map_buf_user_persist(struct msm_cvp_inst *inst,
		return -EINVAL;
	}

	if (in_buf->fd > 0) {
	if (in_buf->fd >= 0) {
		dma_buf = msm_cvp_smem_get_dma_buf(in_buf->fd);
		if (!dma_buf) {
			dprintk(CVP_ERR, "%s: Invalid fd=%d", __func__,
@@ -462,7 +462,7 @@ static int msm_cvp_map_buf_cpu(struct msm_cvp_inst *inst,
		return -EINVAL;
	}

	if (in_buf->fd > 0) {
	if (in_buf->fd >= 0) {
		dma_buf = msm_cvp_smem_get_dma_buf(in_buf->fd);
		if (!dma_buf) {
			dprintk(CVP_ERR, "%s: Invalid fd=%d", __func__,
@@ -738,7 +738,7 @@ static int msm_cvp_map_user_persist(struct msm_cvp_inst *inst,
			return -EINVAL;
		}

		if (new_buf->fd <= 0 && !new_buf->dbuf)
		if ((new_buf->fd < 0 || new_buf->size == 0) && !new_buf->dbuf)
			continue;

		rc = msm_cvp_map_buf_user_persist(inst, new_buf, &iova);
@@ -817,7 +817,8 @@ static int msm_cvp_map_buf(struct msm_cvp_inst *inst,
				return -EINVAL;
			}

			if (new_buf->fd <= 0 && !new_buf->dbuf)
			if ((new_buf->fd < 0 || new_buf->size == 0) &&
				!new_buf->dbuf)
				continue;

			rc = msm_cvp_map_buf_cpu(inst, new_buf, &iova, frame);
+1 −1
Original line number Diff line number Diff line
@@ -205,7 +205,7 @@ int msm_cvp_smem_map_dma_buf(struct msm_cvp_inst *inst,
		return rc;
	}

	if (smem->fd > 0) {
	if (smem->fd >= 0) {
		dbuf = msm_cvp_smem_get_dma_buf(smem->fd);
		if (!dbuf) {
			rc = -EINVAL;