blob: 9dda7bf859dd3f63026140b765b2c3104ab4b06d [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>
41struct agp_version {
Christopher Ferris106b3a82016-08-24 12:15:38 -070042 __u16 major;
Tao Baod7db5942015-01-28 10:07:51 -080043 __u16 minor;
Ben Cheng655a7c02013-10-16 16:09:24 -070044};
45typedef struct _agp_info {
Christopher Ferris106b3a82016-08-24 12:15:38 -070046 struct agp_version version;
Tao Baod7db5942015-01-28 10:07:51 -080047 __u32 bridge_id;
48 __u32 agp_mode;
49 unsigned long aper_base;
Christopher Ferris80ae69d2022-08-02 16:32:21 -070050 __kernel_size_t aper_size;
51 __kernel_size_t pg_total;
52 __kernel_size_t pg_system;
53 __kernel_size_t pg_used;
Christopher Ferris106b3a82016-08-24 12:15:38 -070054} agp_info;
Ben Cheng655a7c02013-10-16 16:09:24 -070055typedef struct _agp_setup {
Tao Baod7db5942015-01-28 10:07:51 -080056 __u32 agp_mode;
Ben Cheng655a7c02013-10-16 16:09:24 -070057} agp_setup;
Christopher Ferris106b3a82016-08-24 12:15:38 -070058typedef struct _agp_segment {
Tao Baod7db5942015-01-28 10:07:51 -080059 __kernel_off_t pg_start;
60 __kernel_size_t pg_count;
61 int prot;
Christopher Ferris106b3a82016-08-24 12:15:38 -070062} agp_segment;
Ben Cheng655a7c02013-10-16 16:09:24 -070063typedef struct _agp_region {
Tao Baod7db5942015-01-28 10:07:51 -080064 __kernel_pid_t pid;
65 __kernel_size_t seg_count;
Christopher Ferris106b3a82016-08-24 12:15:38 -070066 struct _agp_segment * seg_list;
Ben Cheng655a7c02013-10-16 16:09:24 -070067} agp_region;
68typedef struct _agp_allocate {
Tao Baod7db5942015-01-28 10:07:51 -080069 int key;
Christopher Ferris106b3a82016-08-24 12:15:38 -070070 __kernel_size_t pg_count;
Tao Baod7db5942015-01-28 10:07:51 -080071 __u32 type;
72 __u32 physical;
Ben Cheng655a7c02013-10-16 16:09:24 -070073} agp_allocate;
Christopher Ferris106b3a82016-08-24 12:15:38 -070074typedef struct _agp_bind {
Tao Baod7db5942015-01-28 10:07:51 -080075 int key;
76 __kernel_off_t pg_start;
Ben Cheng655a7c02013-10-16 16:09:24 -070077} agp_bind;
Christopher Ferris106b3a82016-08-24 12:15:38 -070078typedef struct _agp_unbind {
Tao Baod7db5942015-01-28 10:07:51 -080079 int key;
80 __u32 priority;
Ben Cheng655a7c02013-10-16 16:09:24 -070081} agp_unbind;
Christopher Ferris106b3a82016-08-24 12:15:38 -070082#endif