linux/drivers/gpu/drm/exynos/exynos_drm_ipp.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
 */

#ifndef _EXYNOS_DRM_IPP_H_
#define _EXYNOS_DRM_IPP_H_

struct exynos_drm_ipp;
struct exynos_drm_ipp_task;

/**
 * struct exynos_drm_ipp_funcs - exynos_drm_ipp control functions
 */
struct exynos_drm_ipp_funcs {};

/**
 * struct exynos_drm_ipp - central picture processor module structure
 */
struct exynos_drm_ipp {};

struct exynos_drm_ipp_buffer {};

/**
 * struct exynos_drm_ipp_task - a structure describing transformation that
 * has to be performed by the picture processor hardware module
 */
struct exynos_drm_ipp_task {};

#define DRM_EXYNOS_IPP_TASK_DONE
#define DRM_EXYNOS_IPP_TASK_ASYNC

struct exynos_drm_ipp_formats {};

/* helper macros to set exynos_drm_ipp_formats structure and limits*/
#define IPP_SRCDST_MFORMAT(f, m, l)

#define IPP_SRCDST_FORMAT(f, l)

#define IPP_SIZE_LIMIT(l, val...)

#define IPP_SCALE_LIMIT(val...)

int exynos_drm_ipp_register(struct device *dev, struct exynos_drm_ipp *ipp,
		const struct exynos_drm_ipp_funcs *funcs, unsigned int caps,
		const struct exynos_drm_ipp_formats *formats,
		unsigned int num_formats, const char *name);
void exynos_drm_ipp_unregister(struct device *dev,
			       struct exynos_drm_ipp *ipp);

void exynos_drm_ipp_task_done(struct exynos_drm_ipp_task *task, int ret);

#ifdef CONFIG_DRM_EXYNOS_IPP
int exynos_drm_ipp_get_res_ioctl(struct drm_device *dev, void *data,
				 struct drm_file *file_priv);
int exynos_drm_ipp_get_caps_ioctl(struct drm_device *dev, void *data,
				  struct drm_file *file_priv);
int exynos_drm_ipp_get_limits_ioctl(struct drm_device *dev, void *data,
				    struct drm_file *file_priv);
int exynos_drm_ipp_commit_ioctl(struct drm_device *dev,
				void *data, struct drm_file *file_priv);
#else
static inline int exynos_drm_ipp_get_res_ioctl(struct drm_device *dev,
	 void *data, struct drm_file *file_priv)
{
	struct drm_exynos_ioctl_ipp_get_res *resp = data;

	resp->count_ipps = 0;
	return 0;
}
static inline int exynos_drm_ipp_get_caps_ioctl(struct drm_device *dev,
	 void *data, struct drm_file *file_priv)
{
	return -ENODEV;
}
static inline int exynos_drm_ipp_get_limits_ioctl(struct drm_device *dev,
	 void *data, struct drm_file *file_priv)
{
	return -ENODEV;
}
static inline int exynos_drm_ipp_commit_ioctl(struct drm_device *dev,
	 void *data, struct drm_file *file_priv)
{
	return -ENODEV;
}
#endif
#endif