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

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

Merge "msm: camera: Update camera memory table for kernel mapped memory" into kernel.lnx.4.14.r1

parents d9236689 0804da44
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -943,6 +943,8 @@ static int cam_mem_util_unmap(int32_t idx,
		if (cam_mem_util_unmap_hw_va(idx, region, client))
			CAM_ERR(CAM_MEM, "Failed, dmabuf=%pK",
				tbl.bufq[idx].dma_buf);
		if (client == CAM_SMMU_MAPPING_KERNEL)
			tbl.bufq[idx].dma_buf = NULL;
	}

	mutex_lock(&tbl.bufq[idx].q_lock);
@@ -958,10 +960,8 @@ static int cam_mem_util_unmap(int32_t idx,
		tbl.bufq[idx].is_imported,
		tbl.bufq[idx].dma_buf);

	if (tbl.bufq[idx].dma_buf) {
	if (tbl.bufq[idx].dma_buf)
		dma_buf_put(tbl.bufq[idx].dma_buf);
		tbl.bufq[idx].dma_buf = NULL;
	}

	tbl.bufq[idx].fd = -1;
	tbl.bufq[idx].dma_buf = NULL;