Files
Vikash GarodiaandAbel Vesa cb3f5a0957 media: iris: Add iris vpu bus support
On glymur platform, firmware loading needs a separate IOMMU mapping with
its own stream ID. This stream ID is defined in the device tree with the
associated firmware function ID in the iommu-map property. To create this
mapping, a separate child device is needed so the firmware memory can be
isolated in its own IOMMU context.

Introduce a new bus called iris-vpu-bus. This creates a dynamic device,
and its dma_configure() callback calls of_dma_configure_id() with the
function ID provided by the client to map the corresponding stream ID.
This sets up a dedicated IOMMU context for the child device.

Reviewed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com>
2026-08-05 15:36:02 +03:00

26 lines
659 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) Qualcomm Innovation Center, Inc. All rights reserved.
*/
#ifndef _LINUX_IRIS_VPU_BUS_H
#define _LINUX_IRIS_VPU_BUS_H
#include <linux/device.h>
#ifdef CONFIG_QCOM_IRIS_VPU_BUS
extern const struct bus_type iris_vpu_bus_type;
struct device *iris_vpu_bus_create_device(struct device *parent_device, const char *name,
u64 dma_mask, const u32 *iommu_fid);
#else
static inline struct device *iris_vpu_bus_create_device(struct device *parent_device,
const char *name, u64 dma_mask,
const u32 *iommu_fid)
{
return ERR_PTR(-ENODEV);
}
#endif
#endif /* _LINUX_IRIS_VPU_BUS_H */