Back to index

libdrm  2.4.37
exynos_drm.h
Go to the documentation of this file.
00001 /* exynos_drm.h
00002  *
00003  * Copyright (c) 2011 Samsung Electronics Co., Ltd.
00004  * Authors:
00005  *     Inki Dae <inki.dae@samsung.com>
00006  *     Joonyoung Shim <jy0922.shim@samsung.com>
00007  *     Seung-Woo Kim <sw0312.kim@samsung.com>
00008  *
00009  * Permission is hereby granted, free of charge, to any person obtaining a
00010  * copy of this software and associated documentation files (the "Software"),
00011  * to deal in the Software without restriction, including without limitation
00012  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
00013  * and/or sell copies of the Software, and to permit persons to whom the
00014  * Software is furnished to do so, subject to the following conditions:
00015  *
00016  * The above copyright notice and this permission notice (including the next
00017  * paragraph) shall be included in all copies or substantial portions of the
00018  * Software.
00019  *
00020  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00021  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
00023  * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
00024  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
00025  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
00026  * OTHER DEALINGS IN THE SOFTWARE.
00027  */
00028 
00029 #ifndef _EXYNOS_DRM_H_
00030 #define _EXYNOS_DRM_H_
00031 
00032 #include "drm.h"
00033 
00043 struct drm_exynos_gem_create {
00044        uint64_t size;
00045        unsigned int flags;
00046        unsigned int handle;
00047 };
00048 
00057 struct drm_exynos_gem_map_off {
00058        unsigned int handle;
00059        unsigned int pad;
00060        uint64_t offset;
00061 };
00062 
00073 struct drm_exynos_gem_mmap {
00074        unsigned int handle;
00075        unsigned int size;
00076        uint64_t mapped;
00077 };
00078 
00088 struct drm_exynos_gem_info {
00089        unsigned int handle;
00090        unsigned int flags;
00091        uint64_t size;
00092 };
00093 
00102 struct drm_exynos_vidi_connection {
00103        unsigned int connection;
00104        unsigned int extensions;
00105        uint64_t edid;
00106 };
00107 
00108 /* memory type definitions. */
00109 enum e_drm_exynos_gem_mem_type {
00110        /* Physically Continuous memory and used as default. */
00111        EXYNOS_BO_CONTIG     = 0 << 0,
00112        /* Physically Non-Continuous memory. */
00113        EXYNOS_BO_NONCONTIG  = 1 << 0,
00114        /* non-cachable mapping and used as default. */
00115        EXYNOS_BO_NONCACHABLE       = 0 << 1,
00116        /* cachable mapping. */
00117        EXYNOS_BO_CACHABLE   = 1 << 1,
00118        /* write-combine mapping. */
00119        EXYNOS_BO_WC         = 1 << 2,
00120        EXYNOS_BO_MASK              = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE |
00121                                    EXYNOS_BO_WC
00122 };
00123 
00124 #define DRM_EXYNOS_GEM_CREATE             0x00
00125 #define DRM_EXYNOS_GEM_MAP_OFFSET  0x01
00126 #define DRM_EXYNOS_GEM_MMAP        0x02
00127 /* Reserved 0x04 ~ 0x05 for exynos specific gem ioctl */
00128 #define DRM_EXYNOS_GEM_GET         0x04
00129 #define DRM_EXYNOS_VIDI_CONNECTION 0x07
00130 
00131 #define DRM_IOCTL_EXYNOS_GEM_CREATE              DRM_IOWR(DRM_COMMAND_BASE + \
00132               DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create)
00133 
00134 #define DRM_IOCTL_EXYNOS_GEM_MAP_OFFSET   DRM_IOWR(DRM_COMMAND_BASE + \
00135               DRM_EXYNOS_GEM_MAP_OFFSET, struct drm_exynos_gem_map_off)
00136 
00137 #define DRM_IOCTL_EXYNOS_GEM_MMAP  DRM_IOWR(DRM_COMMAND_BASE + \
00138               DRM_EXYNOS_GEM_MMAP, struct drm_exynos_gem_mmap)
00139 
00140 #define DRM_IOCTL_EXYNOS_GEM_GET   DRM_IOWR(DRM_COMMAND_BASE + \
00141               DRM_EXYNOS_GEM_GET,  struct drm_exynos_gem_info)
00142 
00143 #define DRM_IOCTL_EXYNOS_VIDI_CONNECTION  DRM_IOWR(DRM_COMMAND_BASE + \
00144               DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection)
00145 
00146 #endif