1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_AGP_H
20#define _UAPI_AGP_H
21#define AGPIOC_BASE 'A'
22#define AGPIOC_INFO _IOR(AGPIOC_BASE, 0, struct agp_info *)
23#define AGPIOC_ACQUIRE _IO(AGPIOC_BASE, 1)
24#define AGPIOC_RELEASE _IO(AGPIOC_BASE, 2)
25#define AGPIOC_SETUP _IOW(AGPIOC_BASE, 3, struct agp_setup *)
26#define AGPIOC_RESERVE _IOW(AGPIOC_BASE, 4, struct agp_region *)
27#define AGPIOC_PROTECT _IOW(AGPIOC_BASE, 5, struct agp_region *)
28#define AGPIOC_ALLOCATE _IOWR(AGPIOC_BASE, 6, struct agp_allocate *)
29#define AGPIOC_DEALLOCATE _IOW(AGPIOC_BASE, 7, int)
30#define AGPIOC_BIND _IOW(AGPIOC_BASE, 8, struct agp_bind *)
31#define AGPIOC_UNBIND _IOW(AGPIOC_BASE, 9, struct agp_unbind *)
32#define AGPIOC_CHIPSET_FLUSH _IO(AGPIOC_BASE, 10)
33#define AGP_DEVICE "/dev/agpgart"
34#ifndef TRUE
35#define TRUE 1
36#endif
37#ifndef FALSE
38#define FALSE 0
39#endif
40#include <linux/types.h>
41#include <stdlib.h>
42struct agp_version {
43  __u16 major;
44  __u16 minor;
45};
46typedef struct _agp_info {
47  struct agp_version version;
48  __u32 bridge_id;
49  __u32 agp_mode;
50  unsigned long aper_base;
51  size_t aper_size;
52  size_t pg_total;
53  size_t pg_system;
54  size_t pg_used;
55} agp_info;
56typedef struct _agp_setup {
57  __u32 agp_mode;
58} agp_setup;
59typedef struct _agp_segment {
60  __kernel_off_t pg_start;
61  __kernel_size_t pg_count;
62  int prot;
63} agp_segment;
64typedef struct _agp_region {
65  __kernel_pid_t pid;
66  __kernel_size_t seg_count;
67  struct _agp_segment * seg_list;
68} agp_region;
69typedef struct _agp_allocate {
70  int key;
71  __kernel_size_t pg_count;
72  __u32 type;
73  __u32 physical;
74} agp_allocate;
75typedef struct _agp_bind {
76  int key;
77  __kernel_off_t pg_start;
78} agp_bind;
79typedef struct _agp_unbind {
80  int key;
81  __u32 priority;
82} agp_unbind;
83#endif
84