Line 0
Link Here
|
|
|
1 |
/* |
2 |
* Copyright (C) 2016 Nexell Co., Ltd. |
3 |
* Author: hyejung, kwon <cjscld15@nexell.co.kr> |
4 |
* |
5 |
* Permission is hereby granted, free of charge, to any person obtaining a |
6 |
* copy of this software and associated documentation files (the |
7 |
* "Software"), to deal in the Software without restriction, including |
8 |
* without limitation the rights to use, copy, modify, merge, publish, |
9 |
* distribute, sub license, and/or sell copies of the Software, and to |
10 |
* permit persons to whom the Software is furnished to do so, subject to |
11 |
* the following conditions: |
12 |
* |
13 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
14 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
15 |
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL |
16 |
* THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, |
17 |
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR |
18 |
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
19 |
* USE OR OTHER DEALINGS IN THE SOFTWARE. |
20 |
* |
21 |
* The above copyright notice and this permission notice (including the |
22 |
* next paragraph) shall be included in all copies or substantial portions |
23 |
* of the Software. |
24 |
* |
25 |
*/ |
26 |
|
27 |
#ifndef _UAPI_NX_DRM_H_ |
28 |
#define _UAPI_NX_DRM_H_ |
29 |
|
30 |
#include "drm.h" |
31 |
|
32 |
/** |
33 |
* User-desired buffer creation information structure. |
34 |
* |
35 |
* @size: user-desired memory allocation size. |
36 |
* - this size value would be page-aligned internally. |
37 |
* @flags: user request for setting memory type or cache attributes. |
38 |
* @handle: returned a handle to created gem object. |
39 |
* - this handle will be set by gem module of kernel side. |
40 |
*/ |
41 |
struct nx_drm_gem_create { |
42 |
uint64_t size; |
43 |
unsigned int flags; |
44 |
unsigned int handle; |
45 |
}; |
46 |
|
47 |
/** |
48 |
* A structure to gem information. |
49 |
* |
50 |
* @handle: a handle to gem object created. |
51 |
* @flags: flag value including memory type and cache attribute and |
52 |
* this value would be set by driver. |
53 |
* @size: size to memory region allocated by gem and this size would |
54 |
* be set by driver. |
55 |
*/ |
56 |
struct nx_drm_gem_info { |
57 |
unsigned int handle; |
58 |
unsigned int flags; |
59 |
uint64_t size; |
60 |
}; |
61 |
|
62 |
#define DRM_NX_GEM_CREATE 0x00 |
63 |
#define DRM_NX_GEM_GET 0x04 |
64 |
#define DRM_NX_GEM_SYNC 0x05 |
65 |
|
66 |
#define DRM_IOCTL_NX_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + \ |
67 |
DRM_NX_GEM_CREATE, struct nx_drm_gem_create) |
68 |
|
69 |
#define DRM_IOCTL_NX_GEM_SYNC DRM_IOWR(DRM_COMMAND_BASE + \ |
70 |
DRM_NX_GEM_SYNC, struct nx_drm_gem_create) |
71 |
|
72 |
#define DRM_IOCTL_NX_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + \ |
73 |
DRM_NX_GEM_GET, struct nx_drm_gem_info) |
74 |
#endif |