/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ /* exynos_drm.h * * Copyright (c) 2011 Samsung Electronics Co., Ltd. * Authors: * Inki Dae <[email protected]> * Joonyoung Shim <[email protected]> * Seung-Woo Kim <[email protected]> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #ifndef _UAPI_EXYNOS_DRM_H_ #define _UAPI_EXYNOS_DRM_H_ #include "drm.h" #if defined(__cplusplus) extern "C" { #endif /** * User-desired buffer creation information structure. * * @size: user-desired memory allocation size. * - this size value would be page-aligned internally. * @flags: user request for setting memory type or cache attributes. * @handle: returned a handle to created gem object. * - this handle will be set by gem module of kernel side. */ struct drm_exynos_gem_create { … }; /** * A structure for getting a fake-offset that can be used with mmap. * * @handle: handle of gem object. * @reserved: just padding to be 64-bit aligned. * @offset: a fake-offset of gem object. */ struct drm_exynos_gem_map { … }; /** * A structure to gem information. * * @handle: a handle to gem object created. * @flags: flag value including memory type and cache attribute and * this value would be set by driver. * @size: size to memory region allocated by gem and this size would * be set by driver. */ struct drm_exynos_gem_info { … }; /** * A structure for user connection request of virtual display. * * @connection: indicate whether doing connection or not by user. * @extensions: if this value is 1 then the vidi driver would need additional * 128bytes edid data. * @edid: the edid data pointer from user side. */ struct drm_exynos_vidi_connection { … }; /* memory type definitions. */ enum e_drm_exynos_gem_mem_type { … }; struct drm_exynos_g2d_get_ver { … }; struct drm_exynos_g2d_cmd { … }; enum drm_exynos_g2d_buf_type { … }; enum drm_exynos_g2d_event_type { … }; struct drm_exynos_g2d_userptr { … }; struct drm_exynos_g2d_set_cmdlist { … }; struct drm_exynos_g2d_exec { … }; /* Exynos DRM IPP v2 API */ /** * Enumerate available IPP hardware modules. * * @count_ipps: size of ipp_id array / number of ipp modules (set by driver) * @reserved: padding * @ipp_id_ptr: pointer to ipp_id array or NULL */ struct drm_exynos_ioctl_ipp_get_res { … }; enum drm_exynos_ipp_format_type { … }; struct drm_exynos_ipp_format { … }; enum drm_exynos_ipp_capability { … }; /** * Get IPP hardware capabilities and supported image formats. * * @ipp_id: id of IPP module to query * @capabilities: bitmask of drm_exynos_ipp_capability (set by driver) * @reserved: padding * @formats_count: size of formats array (in entries) / number of filled * formats (set by driver) * @formats_ptr: pointer to formats array or NULL */ struct drm_exynos_ioctl_ipp_get_caps { … }; enum drm_exynos_ipp_limit_type { … }; struct drm_exynos_ipp_limit_val { … }; /** * IPP module limitation. * * @type: limit type (see drm_exynos_ipp_limit_type enum) * @reserved: padding * @h: horizontal limits * @v: vertical limits */ struct drm_exynos_ipp_limit { … }; /** * Get IPP limits for given image format. * * @ipp_id: id of IPP module to query * @fourcc: image format code (see DRM_FORMAT_* in drm_fourcc.h) * @modifier: image format modifier (see DRM_FORMAT_MOD_* in drm_fourcc.h) * @type: source/destination identifier (drm_exynos_ipp_format_flag enum) * @limits_count: size of limits array (in entries) / number of filled entries * (set by driver) * @limits_ptr: pointer to limits array or NULL */ struct drm_exynos_ioctl_ipp_get_limits { … }; enum drm_exynos_ipp_task_id { … }; /** * Memory buffer with image data. * * @id: must be DRM_EXYNOS_IPP_TASK_BUFFER * other parameters are same as for AddFB2 generic DRM ioctl */ struct drm_exynos_ipp_task_buffer { … }; /** * Rectangle for processing. * * @id: must be DRM_EXYNOS_IPP_TASK_RECTANGLE * @reserved: padding * @x,@y: left corner in pixels * @w,@h: width/height in pixels */ struct drm_exynos_ipp_task_rect { … }; /** * Image tranformation description. * * @id: must be DRM_EXYNOS_IPP_TASK_TRANSFORM * @rotation: DRM_MODE_ROTATE_* and DRM_MODE_REFLECT_* values */ struct drm_exynos_ipp_task_transform { … }; /** * Image global alpha configuration for formats without alpha values. * * @id: must be DRM_EXYNOS_IPP_TASK_ALPHA * @value: global alpha value (0-255) */ struct drm_exynos_ipp_task_alpha { … }; enum drm_exynos_ipp_flag { … }; #define DRM_EXYNOS_IPP_FLAGS … /** * Perform image processing described by array of drm_exynos_ipp_task_* * structures (parameters array). * * @ipp_id: id of IPP module to run the task * @flags: bitmask of drm_exynos_ipp_flag values * @reserved: padding * @params_size: size of parameters array (in bytes) * @params_ptr: pointer to parameters array or NULL * @user_data: (optional) data for drm event */ struct drm_exynos_ioctl_ipp_commit { … }; #define DRM_EXYNOS_GEM_CREATE … #define DRM_EXYNOS_GEM_MAP … /* Reserved 0x03 ~ 0x05 for exynos specific gem ioctl */ #define DRM_EXYNOS_GEM_GET … #define DRM_EXYNOS_VIDI_CONNECTION … /* G2D */ #define DRM_EXYNOS_G2D_GET_VER … #define DRM_EXYNOS_G2D_SET_CMDLIST … #define DRM_EXYNOS_G2D_EXEC … /* Reserved 0x30 ~ 0x33 for obsolete Exynos IPP ioctls */ /* IPP - Image Post Processing */ #define DRM_EXYNOS_IPP_GET_RESOURCES … #define DRM_EXYNOS_IPP_GET_CAPS … #define DRM_EXYNOS_IPP_GET_LIMITS … #define DRM_EXYNOS_IPP_COMMIT … #define DRM_IOCTL_EXYNOS_GEM_CREATE … #define DRM_IOCTL_EXYNOS_GEM_MAP … #define DRM_IOCTL_EXYNOS_GEM_GET … #define DRM_IOCTL_EXYNOS_VIDI_CONNECTION … #define DRM_IOCTL_EXYNOS_G2D_GET_VER … #define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST … #define DRM_IOCTL_EXYNOS_G2D_EXEC … #define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES … #define DRM_IOCTL_EXYNOS_IPP_GET_CAPS … #define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS … #define DRM_IOCTL_EXYNOS_IPP_COMMIT … /* Exynos specific events */ #define DRM_EXYNOS_G2D_EVENT … #define DRM_EXYNOS_IPP_EVENT … struct drm_exynos_g2d_event { … }; struct drm_exynos_ipp_event { … }; #if defined(__cplusplus) } #endif #endif /* _UAPI_EXYNOS_DRM_H_ */