blob: 3b126f10316e0e0d384ef982aeb15ad09abc6b40 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
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'
Tao Baod7db5942015-01-28 10:07:51 -080022#define AGPIOC_INFO _IOR(AGPIOC_BASE, 0, struct agp_info *)
Tao Baod7db5942015-01-28 10:07:51 -080023#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 *)
Tao Baod7db5942015-01-28 10:07:51 -080027#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 *)
Tao Baod7db5942015-01-28 10:07:51 -080031#define AGPIOC_UNBIND _IOW(AGPIOC_BASE, 9, struct agp_unbind *)
32#define AGPIOC_CHIPSET_FLUSH _IO(AGPIOC_BASE, 10)
Ben Cheng655a7c02013-10-16 16:09:24 -070033#define AGP_DEVICE "/dev/agpgart"
34#ifndef TRUE
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define TRUE 1
36#endif
37#ifndef FALSE
38#define FALSE 0
Ben Cheng655a7c02013-10-16 16:09:24 -070039#endif
40#include <linux/types.h>
Christopher Ferris106b3a82016-08-24 12:15:38 -070041#include <stdlib.h>
Ben Cheng655a7c02013-10-16 16:09:24 -070042struct agp_version {
Christopher Ferris106b3a82016-08-24 12:15:38 -070043 __u16 major;
Tao Baod7db5942015-01-28 10:07:51 -080044 __u16 minor;
Ben Cheng655a7c02013-10-16 16:09:24 -070045};
46typedef struct _agp_info {
Christopher Ferris106b3a82016-08-24 12:15:38 -070047 struct agp_version version;
Tao Baod7db5942015-01-28 10:07:51 -080048 __u32 bridge_id;
49 __u32 agp_mode;
50 unsigned long aper_base;
Christopher Ferris106b3a82016-08-24 12:15:38 -070051 size_t aper_size;
Tao Baod7db5942015-01-28 10:07:51 -080052 size_t pg_total;
53 size_t pg_system;
54 size_t pg_used;
Christopher Ferris106b3a82016-08-24 12:15:38 -070055} agp_info;
Ben Cheng655a7c02013-10-16 16:09:24 -070056typedef struct _agp_setup {
Tao Baod7db5942015-01-28 10:07:51 -080057 __u32 agp_mode;
Ben Cheng655a7c02013-10-16 16:09:24 -070058} agp_setup;
Christopher Ferris106b3a82016-08-24 12:15:38 -070059typedef struct _agp_segment {
Tao Baod7db5942015-01-28 10:07:51 -080060 __kernel_off_t pg_start;
61 __kernel_size_t pg_count;
62 int prot;
Christopher Ferris106b3a82016-08-24 12:15:38 -070063} agp_segment;
Ben Cheng655a7c02013-10-16 16:09:24 -070064typedef struct _agp_region {
Tao Baod7db5942015-01-28 10:07:51 -080065 __kernel_pid_t pid;
66 __kernel_size_t seg_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -070067 struct _agp_segment * seg_list;
Ben Cheng655a7c02013-10-16 16:09:24 -070068} agp_region;
69typedef struct _agp_allocate {
Tao Baod7db5942015-01-28 10:07:51 -080070 int key;
Christopher Ferris106b3a82016-08-24 12:15:38 -070071 __kernel_size_t pg_count;
Tao Baod7db5942015-01-28 10:07:51 -080072 __u32 type;
73 __u32 physical;
Ben Cheng655a7c02013-10-16 16:09:24 -070074} agp_allocate;
Christopher Ferris106b3a82016-08-24 12:15:38 -070075typedef struct _agp_bind {
Tao Baod7db5942015-01-28 10:07:51 -080076 int key;
77 __kernel_off_t pg_start;
Ben Cheng655a7c02013-10-16 16:09:24 -070078} agp_bind;
Christopher Ferris106b3a82016-08-24 12:15:38 -070079typedef struct _agp_unbind {
Tao Baod7db5942015-01-28 10:07:51 -080080 int key;
81 __u32 priority;
Ben Cheng655a7c02013-10-16 16:09:24 -070082} agp_unbind;
Christopher Ferris106b3a82016-08-24 12:15:38 -070083#endif