Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[linux/fpc-iii.git] / include / uapi / drm / armada_drm.h
blob6de7f0196ca055faa32396967fb417f888ff8a2c
1 /*
2 * Copyright (C) 2012 Russell King
3 * With inspiration from the i915 driver
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
8 */
9 #ifndef DRM_ARMADA_IOCTL_H
10 #define DRM_ARMADA_IOCTL_H
12 #include "drm.h"
14 #define DRM_ARMADA_GEM_CREATE 0x00
15 #define DRM_ARMADA_GEM_MMAP 0x02
16 #define DRM_ARMADA_GEM_PWRITE 0x03
18 #define ARMADA_IOCTL(dir, name, str) \
19 DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str)
21 struct drm_armada_gem_create {
22 uint32_t handle;
23 uint32_t size;
25 #define DRM_IOCTL_ARMADA_GEM_CREATE \
26 ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create)
28 struct drm_armada_gem_mmap {
29 uint32_t handle;
30 uint32_t pad;
31 uint64_t offset;
32 uint64_t size;
33 uint64_t addr;
35 #define DRM_IOCTL_ARMADA_GEM_MMAP \
36 ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap)
38 struct drm_armada_gem_pwrite {
39 uint64_t ptr;
40 uint32_t handle;
41 uint32_t offset;
42 uint32_t size;
44 #define DRM_IOCTL_ARMADA_GEM_PWRITE \
45 ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite)
47 #endif