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

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

Merge "msm: VPU: Fix handling of secure video buffers"

parents 52c9c396 f977c112
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -467,6 +467,7 @@ static struct vpu_ctrl_desc ctrl_descriptors[VPU_CTRL_ID_MAX] = {
	},
	[VPU_CTRL_CONTENT_PROTECTION] = {
		.name = "Content Protection",
		.api_size = sizeof(__s32),
		.set_function =
			(custom_set_function) vpu_set_content_protection,
		.get_function =
+6 −3
Original line number Diff line number Diff line
@@ -751,6 +751,7 @@ static int __vpu_mem_map_handle(struct vpu_mem_handle *handle, u32 device_id,
		domain_number = handle->domain_num[device_id];

		if (handle->flags & MEM_SECURE) { /* handle secure buffers */
			pr_debug("Securing ION buffer\n");
			align = SZ_1M;
			ret = msm_ion_secure_buffer(ion_client, ion_handle,
					VIDEO_PIXEL, 0);
@@ -858,12 +859,14 @@ int vpu_mem_alloc(void *mem_handle, u32 size, bool secure)
		align = SZ_4K;
		heap_mask = ION_HEAP(ION_SYSTEM_CONTIG_HEAP_ID);
	} else {
		heap_mask = ION_HEAP(ION_IOMMU_HEAP_ID);
		if (flags & MEM_SECURE)
		if (flags & MEM_SECURE) {
			heap_mask = ION_HEAP(ION_CP_MM_HEAP_ID);
			align = SZ_1M;
		else
		} else {
			heap_mask = ION_HEAP(ION_IOMMU_HEAP_ID);
			align = SZ_4K;
		}
	}

	ion_handle = ion_alloc(ion_client, ALIGN(size, align), align,
			heap_mask, flags);