linux/drivers/gpu/drm/exynos/exynos_drm_dma.c

// SPDX-License-Identifier: GPL-2.0
//
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
// Author: Inki Dae <[email protected]>
// Author: Andrzej Hajda <[email protected]>

#include <linux/dma-map-ops.h>
#include <linux/iommu.h>
#include <linux/platform_device.h>

#include <drm/drm_print.h>
#include <drm/exynos_drm.h>

#include "exynos_drm_drv.h"

#if defined(CONFIG_ARM_DMA_USE_IOMMU)
#include <asm/dma-iommu.h>
#else
#define arm_iommu_create_mapping(...)
#define arm_iommu_attach_device(...)
#define arm_iommu_release_mapping(...)
#define arm_iommu_detach_device(...)
#define to_dma_iommu_mapping(dev)
#endif

#if !defined(CONFIG_IOMMU_DMA)
#define iommu_dma_init_domain
#endif

#define EXYNOS_DEV_ADDR_START
#define EXYNOS_DEV_ADDR_SIZE

/*
 * drm_iommu_attach_device- attach device to iommu mapping
 *
 * @drm_dev: DRM device
 * @subdrv_dev: device to be attach
 *
 * This function should be called by sub drivers to attach it to iommu
 * mapping.
 */
static int drm_iommu_attach_device(struct drm_device *drm_dev,
				struct device *subdrv_dev, void **dma_priv)
{}

/*
 * drm_iommu_detach_device -detach device address space mapping from device
 *
 * @drm_dev: DRM device
 * @subdrv_dev: device to be detached
 *
 * This function should be called by sub drivers to detach it from iommu
 * mapping
 */
static void drm_iommu_detach_device(struct drm_device *drm_dev,
				    struct device *subdrv_dev, void **dma_priv)
{}

int exynos_drm_register_dma(struct drm_device *drm, struct device *dev,
			    void **dma_priv)
{}

void exynos_drm_unregister_dma(struct drm_device *drm, struct device *dev,
			       void **dma_priv)
{}

void exynos_drm_cleanup_dma(struct drm_device *drm)
{}