xref: /openbmc/linux/drivers/gpu/drm/exynos/exynos_drm_g2d.h (revision 1ac731c529cd4d6adbce134754b51ff7d822b145)
19f06080fSThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-only */
2d7f1642cSJoonyoung Shim /*
3d7f1642cSJoonyoung Shim  * Copyright (C) 2012 Samsung Electronics Co.Ltd
4d7f1642cSJoonyoung Shim  * Authors: Joonyoung Shim <jy0922.shim@samsung.com>
5d7f1642cSJoonyoung Shim  */
6d7f1642cSJoonyoung Shim 
7d7f1642cSJoonyoung Shim #ifdef CONFIG_DRM_EXYNOS_G2D
8d7f1642cSJoonyoung Shim extern int exynos_g2d_get_ver_ioctl(struct drm_device *dev, void *data,
9d7f1642cSJoonyoung Shim 				    struct drm_file *file_priv);
10d7f1642cSJoonyoung Shim extern int exynos_g2d_set_cmdlist_ioctl(struct drm_device *dev, void *data,
11d7f1642cSJoonyoung Shim 					struct drm_file *file_priv);
12d7f1642cSJoonyoung Shim extern int exynos_g2d_exec_ioctl(struct drm_device *dev, void *data,
13d7f1642cSJoonyoung Shim 				 struct drm_file *file_priv);
14eb4d9796SMarek Szyprowski 
15eb4d9796SMarek Szyprowski extern int g2d_open(struct drm_device *drm_dev, struct drm_file *file);
16eb4d9796SMarek Szyprowski extern void g2d_close(struct drm_device *drm_dev, struct drm_file *file);
17d7f1642cSJoonyoung Shim #else
exynos_g2d_get_ver_ioctl(struct drm_device * dev,void * data,struct drm_file * file_priv)18d7f1642cSJoonyoung Shim static inline int exynos_g2d_get_ver_ioctl(struct drm_device *dev, void *data,
19d7f1642cSJoonyoung Shim 					   struct drm_file *file_priv)
20d7f1642cSJoonyoung Shim {
21d7f1642cSJoonyoung Shim 	return -ENODEV;
22d7f1642cSJoonyoung Shim }
23d7f1642cSJoonyoung Shim 
exynos_g2d_set_cmdlist_ioctl(struct drm_device * dev,void * data,struct drm_file * file_priv)24d7f1642cSJoonyoung Shim static inline int exynos_g2d_set_cmdlist_ioctl(struct drm_device *dev,
25d7f1642cSJoonyoung Shim 					       void *data,
26d7f1642cSJoonyoung Shim 					       struct drm_file *file_priv)
27d7f1642cSJoonyoung Shim {
28d7f1642cSJoonyoung Shim 	return -ENODEV;
29d7f1642cSJoonyoung Shim }
30d7f1642cSJoonyoung Shim 
exynos_g2d_exec_ioctl(struct drm_device * dev,void * data,struct drm_file * file_priv)31d7f1642cSJoonyoung Shim static inline int exynos_g2d_exec_ioctl(struct drm_device *dev, void *data,
32d7f1642cSJoonyoung Shim 					struct drm_file *file_priv)
33d7f1642cSJoonyoung Shim {
34d7f1642cSJoonyoung Shim 	return -ENODEV;
35d7f1642cSJoonyoung Shim }
36eb4d9796SMarek Szyprowski 
g2d_open(struct drm_device * drm_dev,struct drm_file * file)37*2ef0785bSArnd Bergmann static inline int g2d_open(struct drm_device *drm_dev, struct drm_file *file)
38eb4d9796SMarek Szyprowski {
39eb4d9796SMarek Szyprowski 	return 0;
40eb4d9796SMarek Szyprowski }
41eb4d9796SMarek Szyprowski 
g2d_close(struct drm_device * drm_dev,struct drm_file * file)42*2ef0785bSArnd Bergmann static inline void g2d_close(struct drm_device *drm_dev, struct drm_file *file)
43eb4d9796SMarek Szyprowski { }
44d7f1642cSJoonyoung Shim #endif
45