summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Chew2016-02-23 19:46:28 -0600
committerSean Paul2016-03-09 09:00:42 -0600
commit9af912e971cf7c8d693d38a9354d8837fd5cb878 (patch)
tree03908b59bd7db823959e70ef099fa2b86ed95a6a
parent5ba2bf74d75d9753f9aec1e83798070e78918109 (diff)
downloadexternal-libdrm-9af912e971cf7c8d693d38a9354d8837fd5cb878.tar.gz
external-libdrm-9af912e971cf7c8d693d38a9354d8837fd5cb878.tar.xz
external-libdrm-9af912e971cf7c8d693d38a9354d8837fd5cb878.zip
drm: add DRM_NOUVEAU_GEM_MAP/UNMAP
Add struct drm_nouveau_gem_map and struct drm_nouveau_gem_unmap, and the corresponding ioctl opcodes DRM_NOUVEAU_GEM_MAP and DRM_NOUVEAU_GEM_UNMAP, for supporting partial buffer mapping. Change-Id: I696fe2ea6740c221c10caa27e6e7852447097720 Signed-off-by: Andrew Chew <achew@nvidia.com> Signed-off-by: Sean Paul <seanpaul@chromium.org>
-rw-r--r--include/drm/nouveau_drm.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h
index 941a6b17..915853c0 100644
--- a/include/drm/nouveau_drm.h
+++ b/include/drm/nouveau_drm.h
@@ -244,6 +244,24 @@ struct drm_nouveau_gem_set_error_notifier {
244 uint32_t offset; /* in bytes, u32-aligned */ 244 uint32_t offset; /* in bytes, u32-aligned */
245}; 245};
246 246
247struct drm_nouveau_gem_map {
248 uint32_t handle;
249 uint32_t domain;
250 uint64_t offset;
251 uint64_t delta;
252 uint64_t length;
253 uint32_t tile_mode;
254 uint32_t tile_flags;
255};
256
257struct drm_nouveau_gem_unmap {
258 uint32_t handle;
259 uint32_t pad;
260 uint64_t offset;
261 uint64_t delta;
262 uint64_t length;
263};
264
247#define DRM_NOUVEAU_GETPARAM 0x00 265#define DRM_NOUVEAU_GETPARAM 0x00
248#define DRM_NOUVEAU_SETPARAM 0x01 266#define DRM_NOUVEAU_SETPARAM 0x01
249#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 267#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02
@@ -265,5 +283,7 @@ struct drm_nouveau_gem_set_error_notifier {
265#define DRM_NOUVEAU_GEM_AS_ALLOC 0x53 283#define DRM_NOUVEAU_GEM_AS_ALLOC 0x53
266#define DRM_NOUVEAU_GEM_AS_FREE 0x54 284#define DRM_NOUVEAU_GEM_AS_FREE 0x54
267#define DRM_NOUVEAU_GEM_SET_ERROR_NOTIFIER 0x55 285#define DRM_NOUVEAU_GEM_SET_ERROR_NOTIFIER 0x55
286#define DRM_NOUVEAU_GEM_MAP 0x56
287#define DRM_NOUVEAU_GEM_UNMAP 0x57
268 288
269#endif /* __NOUVEAU_DRM_H__ */ 289#endif /* __NOUVEAU_DRM_H__ */