Greg Kroah-Hartman | e2be04c | 2017-11-01 15:09:13 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ |
Russell King | 96f60e3 | 2012-08-15 13:59:49 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2012 Russell King |
| 4 | * With inspiration from the i915 driver |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #ifndef DRM_ARMADA_IOCTL_H |
| 11 | #define DRM_ARMADA_IOCTL_H |
| 12 | |
Gabriel Laskar | 6a14d01 | 2015-11-30 15:10:41 +0100 | [diff] [blame] | 13 | #include "drm.h" |
| 14 | |
Emil Velikov | 1224649 | 2016-04-07 18:47:05 +0100 | [diff] [blame] | 15 | #if defined(__cplusplus) |
| 16 | extern "C" { |
| 17 | #endif |
| 18 | |
Russell King | 96f60e3 | 2012-08-15 13:59:49 +0100 | [diff] [blame] | 19 | #define DRM_ARMADA_GEM_CREATE 0x00 |
| 20 | #define DRM_ARMADA_GEM_MMAP 0x02 |
| 21 | #define DRM_ARMADA_GEM_PWRITE 0x03 |
| 22 | |
| 23 | #define ARMADA_IOCTL(dir, name, str) \ |
| 24 | DRM_##dir(DRM_COMMAND_BASE + DRM_ARMADA_##name, struct drm_armada_##str) |
| 25 | |
| 26 | struct drm_armada_gem_create { |
Mikko Rapeli | adb8a5a | 2017-08-06 18:44:23 +0200 | [diff] [blame] | 27 | __u32 handle; |
| 28 | __u32 size; |
Russell King | 96f60e3 | 2012-08-15 13:59:49 +0100 | [diff] [blame] | 29 | }; |
| 30 | #define DRM_IOCTL_ARMADA_GEM_CREATE \ |
| 31 | ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create) |
| 32 | |
| 33 | struct drm_armada_gem_mmap { |
Mikko Rapeli | adb8a5a | 2017-08-06 18:44:23 +0200 | [diff] [blame] | 34 | __u32 handle; |
| 35 | __u32 pad; |
| 36 | __u64 offset; |
| 37 | __u64 size; |
| 38 | __u64 addr; |
Russell King | 96f60e3 | 2012-08-15 13:59:49 +0100 | [diff] [blame] | 39 | }; |
| 40 | #define DRM_IOCTL_ARMADA_GEM_MMAP \ |
| 41 | ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap) |
| 42 | |
| 43 | struct drm_armada_gem_pwrite { |
Mikko Rapeli | adb8a5a | 2017-08-06 18:44:23 +0200 | [diff] [blame] | 44 | __u64 ptr; |
| 45 | __u32 handle; |
| 46 | __u32 offset; |
| 47 | __u32 size; |
Russell King | 96f60e3 | 2012-08-15 13:59:49 +0100 | [diff] [blame] | 48 | }; |
| 49 | #define DRM_IOCTL_ARMADA_GEM_PWRITE \ |
| 50 | ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite) |
| 51 | |
Emil Velikov | 1224649 | 2016-04-07 18:47:05 +0100 | [diff] [blame] | 52 | #if defined(__cplusplus) |
| 53 | } |
| 54 | #endif |
| 55 | |
Russell King | 96f60e3 | 2012-08-15 13:59:49 +0100 | [diff] [blame] | 56 | #endif |