Elliott Hughes | 180edef | 2023-11-02 00:08:05 +0000 | [diff] [blame] | 1 | /* |
| 2 | * This file is auto-generated. Modifications will be lost. |
| 3 | * |
| 4 | * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ |
| 5 | * for more information. |
| 6 | */ |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 7 | #ifndef _UAPI_AGP_H |
| 8 | #define _UAPI_AGP_H |
| 9 | #define AGPIOC_BASE 'A' |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 10 | #define AGPIOC_INFO _IOR(AGPIOC_BASE, 0, struct agp_info *) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 11 | #define AGPIOC_ACQUIRE _IO(AGPIOC_BASE, 1) |
| 12 | #define AGPIOC_RELEASE _IO(AGPIOC_BASE, 2) |
| 13 | #define AGPIOC_SETUP _IOW(AGPIOC_BASE, 3, struct agp_setup *) |
| 14 | #define AGPIOC_RESERVE _IOW(AGPIOC_BASE, 4, struct agp_region *) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 15 | #define AGPIOC_PROTECT _IOW(AGPIOC_BASE, 5, struct agp_region *) |
| 16 | #define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, struct agp_allocate *) |
| 17 | #define AGPIOC_DEALLOCATE _IOW(AGPIOC_BASE, 7, int) |
| 18 | #define AGPIOC_BIND _IOW(AGPIOC_BASE, 8, struct agp_bind *) |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 19 | #define AGPIOC_UNBIND _IOW(AGPIOC_BASE, 9, struct agp_unbind *) |
| 20 | #define AGPIOC_CHIPSET_FLUSH _IO(AGPIOC_BASE, 10) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 21 | #define AGP_DEVICE "/dev/agpgart" |
| 22 | #ifndef TRUE |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #define TRUE 1 |
| 24 | #endif |
| 25 | #ifndef FALSE |
| 26 | #define FALSE 0 |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | #endif |
| 28 | #include <linux/types.h> |
| 29 | struct agp_version { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 30 | __u16 major; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 31 | __u16 minor; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 32 | }; |
| 33 | typedef struct _agp_info { |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 34 | struct agp_version version; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __u32 bridge_id; |
| 36 | __u32 agp_mode; |
| 37 | unsigned long aper_base; |
Christopher Ferris | 80ae69d | 2022-08-02 16:32:21 -0700 | [diff] [blame] | 38 | __kernel_size_t aper_size; |
| 39 | __kernel_size_t pg_total; |
| 40 | __kernel_size_t pg_system; |
| 41 | __kernel_size_t pg_used; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 42 | } agp_info; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 43 | typedef struct _agp_setup { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 44 | __u32 agp_mode; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 45 | } agp_setup; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 46 | typedef struct _agp_segment { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __kernel_off_t pg_start; |
| 48 | __kernel_size_t pg_count; |
| 49 | int prot; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 50 | } agp_segment; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | typedef struct _agp_region { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 | __kernel_pid_t pid; |
| 53 | __kernel_size_t seg_count; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 54 | struct _agp_segment * seg_list; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | } agp_region; |
| 56 | typedef struct _agp_allocate { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 57 | int key; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 58 | __kernel_size_t pg_count; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 59 | __u32 type; |
| 60 | __u32 physical; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 61 | } agp_allocate; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 62 | typedef struct _agp_bind { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | int key; |
| 64 | __kernel_off_t pg_start; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 65 | } agp_bind; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 66 | typedef struct _agp_unbind { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | int key; |
| 68 | __u32 priority; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 69 | } agp_unbind; |
Christopher Ferris | 106b3a8 | 2016-08-24 12:15:38 -0700 | [diff] [blame] | 70 | #endif |