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

Commit 4a2c5a08 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: Allocate DSP HFI queues from ADSP heap"

parents 2ae90b26 75384209
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -348,7 +348,12 @@ static int alloc_dma_mem(size_t size, u32 align, u32 flags,
	size = ALIGN(size, SZ_4K);

	if (is_iommu_present(res)) {
		if (flags & SMEM_ADSP) {
			dprintk(VIDC_DBG, "Allocating from ADSP heap\n");
			heap_mask = ION_HEAP(ION_ADSP_HEAP_ID);
		} else {
			heap_mask = ION_HEAP(ION_SYSTEM_HEAP_ID);
		}
	} else {
		dprintk(VIDC_DBG,
			"allocate shared memory from adsp heap size %zx align %d\n",
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ enum smem_prop {
	SMEM_UNCACHED = 0x1,
	SMEM_CACHED = 0x2,
	SMEM_SECURE = 0x4,
	SMEM_ADSP = 0x8,
};

/* NOTE: if you change this enum you MUST update the
+4 −1
Original line number Diff line number Diff line
@@ -1352,12 +1352,15 @@ static int __interface_dsp_queues_init(struct venus_hfi_device *dev)
	int offset = 0;
	phys_addr_t fw_bias = 0;
	size_t q_size;
	u32 flags = 0;

	q_size = SHARED_QSIZE - ALIGNED_SFR_SIZE - ALIGNED_QDSS_SIZE;
	mem_addr = &dev->mem_addr;
	if (!is_iommu_present(dev->res))
		fw_bias = dev->hal_data->firmware_base;
	rc = __smem_alloc(dev, mem_addr, q_size, 1, 0,
	/* Allocate dsp queues from ADSP heap_id */
	flags |= SMEM_ADSP;
	rc = __smem_alloc(dev, mem_addr, q_size, 1, flags,
			HAL_BUFFER_INTERNAL_CMD_QUEUE);
	if (rc) {
		dprintk(VIDC_ERR, "dsp iface_q_table_alloc_fail\n");