-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathagpgart_api_document.html
More file actions
1871 lines (1871 loc) · 109 KB
/
agpgart_api_document.html
File metadata and controls
1871 lines (1871 loc) · 109 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
<TITLE></TITLE>
<META NAME="GENERATOR" CONTENT="OpenOffice.org 1.0.1 (Linux)">
<STYLE>
<!--
@page { size: 21.59cm 27.94cm; margin-left: 3.18cm; margin-right: 3.18cm; margin-top: 2.54cm; margin-bottom: 2.54cm }
-->
</STYLE>
</HEAD>
<BODY LANG="en-US">
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT SIZE=4><B>Agpgart
2.0 API Document</B></FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT SIZE=4><B>Copyright(C)
2003 Tungsten Graphics</B></FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><FONT SIZE=4><B>Copyright(C)
Jeff Hartmann</B></FONT></P>
<P ALIGN=CENTER STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> One
of the things that was always missing from the original agpgart
release was some decent documentation of the API's. This is document
is an attempt to rectify that situation. Both the original 0.99
module API and the new 2.0 API will be discussed. This document is
quite technical in nature and assumes that the reader has some
general knowledge of C programming and some basic system knowledge as
to how the AGP port functions.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3><U>Purpose
of the Agpgart interface</U></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The<SPAN LANG="en-US">
Linux </SPAN>agpgart interface was conceived so that several projects
at the time could setup device independent regions of system memory
to perform DMA on. The AGP specification outlines a system for
performing such a task using a GART, or Graphics Aperture Remapping
Table. The agpgart kernel and user interfaces provide a device
independent method for graphics drivers to perform various tasks on
the GART. Also included in the Linux kernel module are several
device specific implementations which provide access to the GART on
those devices. To avoid programming these various devices directly
in the graphics driver, the interfaces are designed in such a way
that the programmer needs no knowledge as to how the GART is actually
implemented.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3><U>Agpgart
Ioctl Interface</U></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The first interface that I will describe is the general
ioctl interface exposed by /dev/agpgart. The original interface
exposed 10<SPAN LANG="en-US"> ioctl's </SPAN>to the user and agpgart
2.0 adds 7 more. They provide a user level driver with the ability
to swap sets of pages in and out of the agp aperture. By its very
nature the agpgart interface is only<SPAN LANG="en-US"> accessible </SPAN>by
one entity at a time, called the controlling process. This might
change as time goes on since we now store enough information in
agpgart to provide a general system allocator. However this is not
addressed in the current agpgart implementations. This controlling
process can authenticate other clients to map the agp aperture into
their process space by telling agpgart through one of the ioctl's to
allow this to happen.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3>Note on ioctl return values:</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> Unless otherwise stated the ioctl's all return 0 on
successful completion of the ioctl, and -1 to indicate an error
occurred. The errno variable is set to indicate the nature of the
error that occurred.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT SIZE=3><B>AGPIOC_INFO</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><B><SPAN STYLE="text-decoration: none"><FONT SIZE=3> </FONT></SPAN></B><SPAN STYLE="font-weight: medium"><SPAN STYLE="text-decoration: none"><FONT SIZE=3>This
ioctl provides a method for the<SPAN LANG="en-US"> user land </SPAN>driver
to query several settings from the agpgart kernel module. It is one
of the first things that user drivers will want to do with the
agpgart interface so they know how to program their graphics devices
to access the agp aperture. It takes a pointer to an agp_info
structure, which is laid out as follows:</FONT></SPAN></SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2>typedef struct
_agp_version {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> __u16 major;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> __u16 minor;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2>} agp_version;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2>typedef struct _agp_info {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> agp_version version;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> __u32 bridge_id;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> __u32 agp_mode;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> off_t aper_base;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> size_t aper_size;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> size_t pg_total;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> size_t pg_system;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> size_t pg_used;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2>} agp_info;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> <FONT SIZE=3>The first part of the structure the
agp_version structure defines the interface version provided by the
agpgart interface. It is considered to be a version number where
increases in the minor version indicate backwards compatible changes
and bumps to the major number are considered to be backwards<SPAN LANG="en-US">
incompatible </SPAN>changes to the interface.</FONT></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field bridge_id contains the packed id of the pci
vendor and device id of the agp bridge. The top 16-bits are the
device and the bottom 16-bits are the vendor id.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field agp_mode contains the current AGPSTAT
register that the bridge reports. If you require a definition of the
AGPSTAT register please see the AGP 2.0 or 3.0 interface
specifications available on Intel's website.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field aper_base contains the bus relative offset
for the agp aperture. It is this value that is used to program the
graphics device so that it can utilize the agp aperture.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field aper_size contains the size in megabytes of
the agp aperture window from the aper_base address. This is just the
size of the agp aperture window, not necessarily the amount of memory
backing the aperture.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field pg_total is the total number of system pages
which can be used to back the agp aperture.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field pg_system represents the number of system
pages which will be used from main memory before the system starts
swapping pages. In the current agpgart implementation this field is
equal to the pg_total field.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The field pg_used is the current number of system pages
used by agpgart.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT SIZE=3><B>AGPIOC_ACQUIRE</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> This ioctl provides a method for a root privledged
process to become the current system wide controlling process of the
agpgart kernel module. It takes no arguments and returns 0 upon
success. This is the only ioctl that can be used without being the
controlling process. It should be the first thing that an
application does with the agpgart interface.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT SIZE=3><B>AGPIOC_RELEASE</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> This ioctl should be called when the controlling
process no longer needs control of the agpgart interface. It is the
responsibility of the controlling process to leave the GART table in
a state where other processes can use it. This usually involves
unbinding all page sets from the agp aperture. It takes no arguments
and returns 0 upon success.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT SIZE=3><B>AGPIOC_SETUP</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl is called by the controlling process to set the AGPCMD register
on all agp devices controlled by the agp bridge as described in the
agp_info structure. It takes a pointer an agp_setup structure which
is<SPAN LANG="en-US"> laid </SPAN>out as follows:</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2>typedef struct _agp_setup {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2> __u32 agp_mode;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=2>} agp_setup;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3> The agp_mode field is the value used to decide on the
setting of the AGPCMD register. If we want certain agp modes to be
excluded from the final setting of the AGPCMD register, then we do
not put them in the agp_mode field. For a complete description of
the AGPCMD register please see the AGP 2.0 or 3.0 Interface
specification.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3>AGPIOC_RESERVE</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><SPAN STYLE="text-decoration: none"><FONT SIZE=3> This
ioctl is called by the controlling process to setup a region of the
agp aperture to be mapped by a client process. If the graphics
driver requires other non root privl</FONT></SPAN></SPAN>edged
processes to use the agp aperture, then this ioctl needs to be called
to configure the agpgart kernel module to provide this ability to
that client process. It takes a pointer to an agp_region structure,
which is laid out as follows:</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2>typedef struct
_agp_segment {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> off_t
pg_start;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> size_t
pg_count;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> int prot;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2>} agp_segment;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2>typedef struct
_agp_region {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> pid_t pid;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> size_t
seg_count;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> agp_segment
*seg_list;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2>} agp_region;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2> <FONT SIZE=3>The
agp_segment structure provides a<SPAN LANG="en-US"> description </SPAN>of
the region of the agp aperture that we want to allow the client to be
able to map. The field pg_start is the starting agp page offset that
we want to allow the client to map, while the field pg_count is the
number of agp pages to allow. The field prot is of the exact same
form as the prot argument to the mmap system call.</FONT></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3> The agp_region
structure describes the client fully to the agpgart kernel interface.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3> The pid field
is the process identification number that the system knows the
process by, it is up to the controlling process to<SPAN LANG="en-US">
determine </SPAN>this information in a secure way. It is beyond the
scope of the agpgart interface to provide a secure way of
authenticating a process.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3> The seg_count
field is the number of agp_segment structures that we are passing
into the kernel at this time.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3> The seg_list
field is a pointer to an array of agp_segment structures in the
controlling processes address space. It is the list of regions in
the agp aperture that we want to allow this client to map.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_PROTECT</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> This
ioctl provides a method for the controlling process to revoke map
permission from a client process. It is currently unimplemented in
the agpgart kernel module, however the interface will be described
since it might be implemented in the future. This ioctl takes a
pointer to an agp_region structure which contains a list of regions
we want to change the protection on. This ioctl if implemented
should walk the proper vma's and change their vm_page_prot and the
actual pte values in their page tables. Because of the limited
utility of this function as a locking mechanism it is not implemented
currently. It was the original intention of this ioctl to provide a
locking mechanism using page faults in a client.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_ALLOCATE</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method for the controlling process to allocate a set
of pages with which it can back the agp aperture. The ioctl takes a
pointer to an agp_allocate structure which is laid out as follows:</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_allocate {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
key;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> size_t
pg_count;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
type;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
physical;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT SIZE=2>}
agp_allocate;</FONT></SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The key field in this
structure is copied back by the agpgart kernel module upon successful
completion of this ioctl. It is the “tag” of the allocation
which will be used in<SPAN LANG="en-US"> subsequent ioctl's referring
</SPAN>to this set of pages.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The pg_count field in this
structure is the number of agp pages we want in this allocation.
Note that the size of an agp page does not necessarily have to match
the system page size. This is a detail that most users of the
agpgart interface make, and it is non portable behavior.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The type field is an value
which encodes the type of agp memory that we want to allocate. In
general this will be either the tokens AGP_NORMAL_MEMORY or
AGP_CACHED_MEMORY, however some devices provide extended types of agp
memory allocation. Currently the tokens AGP_INTEL_DCACHE_MEMORY and
AGP_INTEL_PHYS_MEMORY are the only other values for this field. In
general only the token AGP_NORMAL_MEMORY is accepted by this ioctl.
However in agpgart version 2.0 there is a method to query to see if
AGP_CACHED_MEMORY is accepted. AGP_CACHED_MEMORY is an extension to
the AGP interface for AGP version 3.0 devices. It provides a method
for someone to allocate cachable memory for use in the agp aperture.
It should be noted that agp memory is general either mapped
uncachable or write combined.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The physical field is a
32-bit pci<SPAN LANG="en-US"> visible </SPAN>bus address with which
to program the device for the AGP_INTEL_PHYS_MEMORY type. It is not
used currently for any other purpose and can be considered a device
specific field.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><B>AGPIOC_DEALLOCATE</B></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method for a controlling process to free a region of
agp memory. If this memory is currently visible in the agp aperture
it is first removed from the aperture before the memory is freed. It
is the responsibility of the controlling process to insure that no
device dma will refer to this piece of agp memory before this call is
executed. It takes an integer parameter which represents the “tag”
of this agp allocation, which was previously obtained by the
AGPIOC_ALLOCATE ioctl.</SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><B>AGPIOC_BIND</B></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method to map a collection of pages into the agp
aperture. It takes a pointer to an agp_bind structure as an
argument. This agp_bind structure is laid out as follows:</SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_bind {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT SIZE=2> int
key;</FONT></SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> off_t
pg_start;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>}
agp_bind;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
key field is the “tag” previously obtained<SPAN LANG="en-US"> by
</SPAN>the AGPIOC_ALLOCATE ioctl which refers the collection of agp
pages we want to insert into the agp aperture.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
pg_start field is the offset in agp pages that we want to insert into
the agp aperture. As mentioned previously the agp page size does not
have to match the system page size. Previous to the AGP 3.0
specification, it was a general assumption that the agp page size
would be fixed at 4096 KB. The AGP 3.0 specification however states
that the agp page size doesn't have to be 4096 KB, so agpgart 2.0
provides a method for querying the agp page size.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_UNBIND</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method for a controlling process to remove a
collection of pages which was previously inserted into the agp
aperture. It takes a pointer to an agp_unbind structure which is
laid out as follows:</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_unbind {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
key;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
priority;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>}
agp_unbind;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
key field in the agp_unbind structure represents the “tag” of the
collection of pages which we want to be removed from the agp
aperture.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
priority field is currently unused in the Linux kernel agpgart
implementation. It represents the priority we want to use to decide
which unbound regions of agp memory we want to swap out to disk
first. The higher the number, the higher the priority. To test if
an implementation of agpgart would use this field check to see if the
pg_system and pg_total fields of the agp_info structure match. If
they do not, you can utilize this field.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_GETMAP</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> This
ioctl and all that follows are only available on agpgart 2.0 or
above. Currently the easiest way to test for support for agpgart 2.0
ioctl's is to try this ioctl and check for a success value. If it is
not supported, errno will be set to ENOTTY.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> This
ioctl takes a pointer to an agp_map structure as an argument. It
provides a method for a controller to discover some information about
a current piece of agp memory. It is generally useful to figure out
if an agp driver has memory allocated during its initialization. It
is described as follows:</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_map {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
key;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> int
is_bound;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> off_t
pg_start;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> size_t
page_count;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> __u32
type;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> __u32
physical;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>}
agp_map;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
key field in the agp_map structure is the “tag” of the allocation
which was previously allocated by the AGPIOC_ALLOCATE call by some
controller in the system. It does not have to be owned by the
currently active controller. Also this ioctl can accept the token
AGP_RESERVED_MEMORY to query the agp drivers reserved memory block.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
is_bound field is an integer value representing a truth value if this
block of agp memory is currently bound in the agp aperture. A value
of one indicates true, while a value of zero indicates false.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
pg_start field is the offset in agp pages where this block of memory
begins if the is_bound field is true. It should generally be ignored
if is_bound is false, however the current implementation returns a
value of zero in this field upon successful ioctl completion.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
page_count field is the number of agp pages in this memory block.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
type field is the value understood by the agp driver as to what kind
of memory this block represents. Currently it is only going to be
one of the values outlined previously in this document, but future
agp drivers might<SPAN LANG="ca-AD"> utilise </SPAN>new values.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The physical field is a
32-bit pci visible bus address with which to program the device for
the AGP_INTEL_PHYS_MEMORY type. It is not used currently for any
other purpose and can be considered a device specific field.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_MAP</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method for a controller to directly map a piece of
agp memory, even if it is not bound in the agp aperture. Right now
this ioctl is not available to clients, but that functionality will
be added in the future. The performance of this mapping is<SPAN LANG="en-US">
dependent </SPAN>on the support of setting write combining on a per
page basis. The AGPIOC_QUERY_CTX function provides a method to
determine if unbound agp mappings are fast. It is recommended that
new software attempt to use this new ioctl instead of<SPAN LANG="en-US">
utilising </SPAN>the mmap system call. This ioctl does the right
thing if the agp aperture is not allowed to be mapped. It takes a
pointer to an agp_map_request structure, which is laid out as
follows:</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_map_request {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> int
key;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> off_t
pg_start;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> size_t
page_count;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> unsigned
long prot;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> unsigned
long flags;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> unsigned
long addr;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>}
agp_map_request;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
key field is the “tag” of this piece of agp memory as returned by
the AGPIOC_ALLOCATE ioctl.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
pg_start field is the offset into this block of agp memory in agp
pages which we want mapped. Please be warned, if you want to provide
some sort of security by only mapping a portion of agp memory if the
agp page size and system page size don't match you might get<SPAN LANG="en-US">
adjacent </SPAN>pages of memory in this mapping.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
page_count field represents the number of agp pages we want in this
mapping. Please note that if it does not match the size of the block
of agp memory and the system and agp page sizes don't match we might
include more pages in this mapping then is asked by the caller.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
prot field is of the same format as the mmap system calls prot
argument.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
flags field is of the same format as the mmap system calls flags
argument.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
addr field is copied back upon successful ioctl completion by the
agpgart kernel driver with the address in the processes address space
where this piece of agp memory was mapped into.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_UNMAP</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a way to unmap a piece of agp memory that was
previously mapped using the AGPIOC_MAP ioctl. It takes a pointer to
an agp_map_request structure as an argument. Only the key and addr
fields are<SPAN LANG="en-US"> utilise </SPAN>to find the proper agp
mapping to tear down.</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_QUERY_SIZE</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method for the controlling process to determine the
size required for the buffer used in the AGPIOC_QUERY_CTX ioctl.
This ioctl takes an agp_query_request pointer as an argument. The
agp_query_request structure is laid out as follows:</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_query_request {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
ctx;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
size;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> void
*buffer;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>}
agp_query_request;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
ctx field represents the agp context that you want to query, where 0
would be the first agp context in the system. The controlling
process should determine the number of supported contexts by calling
first calling the AGPIOC_NUM_CTXS ioctl.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
size field is copied back upon successful completion of this ioctl,
it represents the size required by the kernel to store an
AGPIOC_QUERY_CTX request for this context.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
buffer field is unused in this ioctl, but it represents the address
where we want to place the information returned from the
AGPIOC_QUERY_CTX ioctl.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_QUERY_CTX</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides a method for the controlling process to query some
general information about each of the agp contexts available on the
system. It accepts a pointer to an agp_query_request pointer as an
argument. It copies an agp_driver_info structure back to the address
pointed to by the buffer field in agp_query_request. It has the
following layout and field definitions:</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_master {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
agp_major_version;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
agp_minor_version;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
master_pci_id;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
num_requests_enqueue;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
calibration_cycle_ms;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
max_bandwidth_bpp;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
num_trans_per_period;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
max_requests;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
payload_size;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
flags;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>}
agp_master;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>typedef
struct _agp_driver_info {</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium"> char
*driver_name;</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
agp_major_version;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
agp_minor_version;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
num_requests_enqueue;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
calibration_cycle_ms;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
optimum_request_size;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
max_bandwidth_bpp;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
iso_latency_in_periods;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
num_trans_per_period;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
payload_size;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
target_pci_id;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
target_flags;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> __u32
driver_flags;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> off_t
aper_base;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> size_t
aper_size;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
agp_page_shift;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
alloc_page_shift;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> unsigned
long agp_page_mask;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> unsigned
long alloc_page_mask;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
max_system_pages;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
current_memory;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
context_id;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> int
num_masters;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> agp_master
*masters;</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT SIZE=2>}
agp_driver_info;</FONT></SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
driver_name field is a c-type string representing the name of the
agpgart driver for this context. It points to an empty string if no
driver is currently available.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
agp_major_version field is an integer value of the major agp version
supported by this device.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
agp_minor_version field is an integer value of the minor agp version
supported by this device.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
num_requests_enqueue field is the value RQDEPTH from this bridge
devices AGPSTAT register. For those unfamiliar with the agp
interface specification it is the number of agp bus requests that can
be buffered on this device at a time.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
calibration_cycle_ms field is the integer value of how long agp io
buffer calibration takes on this device, in milliseconds. It is only
valid for agp 3.0 devices and higher.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
optimum_request_size field is the value in bytes of the optimum
request size for an agp master to generate to this target. It is
only valid for agp 3.0 devices and higher.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
max_bandwidth_bpp field is the maximum isochronous bandwidth in bytes
per isochronous period. It is only valid if the device supports
isochronous transfer mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
iso_latency_in_periods is the latency of this device in in
isochronous transfer mode. According to the agp 3.0 specification an
isochronous period is defined as 1 millisecond. It is only valid if
the device supports isochronous transfer mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT SIZE=2> </FONT><FONT SIZE=3>The
num_trans_per_period field is the number of isoch</FONT></SPAN>ronous
transactions per period this bridge device is able to generate. It
is only valid if this device reports that it supports isochronous
transfer mode.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The payload_size field is
the number of bytes in currently selected per isochronous transaction
on this bridge. It is only valid if the device reports that it
supports isochronous transfer mode.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The target_pci_id field is
the packed value of this agp contexts pci id. The upper 16-bits are
the vendor id, while the lower 16-bits are the device id.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"> The target_flags field
contains a bitfield representing this agp bridge devices capability.
The following set of tokens or bit values can be used:</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
0: AGP_SUPPORTS_ISOCHRONOUS</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, the device supports isochronous mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
1: AGP_SUPPORTS_SBA</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports side band addressing operation
mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
2: AGP_SUPPORTS_AGP_3_0_ENABLED</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device is operating in AGP 3.0 electrical mode,
thus disabling the usage of 1X and 2X transfer rates, while enabling
8X transfer rates.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
3: AGP_SUPPORTS_OVER4G_ADDR</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports over 4 gigabyte addressing
mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
4: AGP_SUPPORTS_FAST_WRITE</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports fast write transactions on the
agp bus.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
5: AGP_SUPPORTS_SPEED_1X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 1X transfer rate.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
6: AGP_SUPPORTS_SPEED_2X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 2X transfer rate.</FONT></SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
7: AGP_SUPPORTS_SPEED_4X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 4X transfer rate.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
8: AGP_SUPPORTS_SPEED_8X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 8X transfer rate.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
9: AGP_SUPPORTS_ISO_PAYLOAD_32_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
32 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
10: AGP_SUPPORTS_ISO_PAYLOAD_64_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
64 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
11: AGP_SUPPORTS_ISO_PAYLOAD_128_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
128 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
12: AGP_SUPPORTS_ISO_PAYLOAD_256_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
256 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
13: AGP_SUPPORTS_CACHED_MEMORY</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports cached memory. This bit field
value is only valid for agp targets. Even if this bit is set, the
agp driver might choose to not support allocation of agp cached
memory.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
14: AGP_SUPPORTS_APER_MMAP</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device does support directly mapping the agp
aperture. If it is clear, this device doesn't support using the agp
aperture directly at all.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
driver_flags field is a bitfield that can take on the following
tokens and bit values:</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
0: AGP_USE_AGP_3_0_MODES</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software should use the values for 4X and 8X in the
AGPCMD register as defined in the AGP 3.0 interface specification.
Otherwise software should use the AGP 2.0 accepted values.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
1: AGP_CAN_MAP_APERTURE</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software is allowed to directly map the agp aperture
from the CPU side.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
2: AGP_MAPS_USE_CACHE_ATTRS</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software should assume that maps of unbound agp
memory are mapped write combined or some other system<SPAN LANG="en-US">
architecture </SPAN>specific caching policy which is fast.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
3: AGP_CAN_DO_CACHED</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software is allowed to allocate AGP_CACHED_MEMORY
through the AGPIOC_ALLOCATE ioctl.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
4: AGP_DRIVER_ACTIVE</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this agp bridge has an active driver currently. If
it is not set, it can be assumed that the other ioctl's will probably
not work on this agp context.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
aper_base field is the bus relative address of the agp aperture.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
aper_size field is the size of the agp aperture in megabytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
agp_page_shift is the number of places the value of 1 should be
shifted to the left to obtain the size of one agp page.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
alloc_page_shift is the number of places the value of 1 should be
shifted to the left to obtain the size of one system page.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
agp_page_mask field is the AND mask which will round an address to an
agp page <SPAN LANG="en-US">boundary.</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
alloc_page_mask field is the AND mask which will round an address to
an system page boundary.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
max_system_pages field is the integer value of the number of system
pages that the agpgart device will allow to be allocated.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
current_memory field is the integer value representing the current
number of pages that the agpgart device has allocated.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
context_id field is the integer representation of this agp bridges
context id in the system.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
num_masters field is the number of agp masters that are owned by this
context.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> The
masters field is an array of agp_master structures in turn describing
each agp master device. If there are no masters on this device, this
points to null. The fields in the agp_master structure have the same
meaning as the ones in the driver structure, with the addition of the
max_requests field. This field is the maximum number of isochronous
requests required for this device to work in isochronous mode. If
the device doesn't report itself as supporting isochronous transfers,
ignore this field.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_NUM_CTXS</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=3> This
ioctl provides the controlling process with a method of<SPAN LANG="en-US">
determining </SPAN>the number of contexts currently supported in the
system. It takes no arguments and returns the integer value of the
number of contexts available in the system.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B>AGPIOC_CHG_CTX</B></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=3><B> </B><SPAN STYLE="font-weight: medium">This
ioctl provides the controlling process with a method of changing the
context that the agpgart device driver is currently using. Currently
only one agpgart device is allowed, so this function will only
succeed if you attempt to change to the first agp context on the
system (context zero). It will fail otherwise, or if no context such
context exists. Future implementations of multiheaded agp systems
will allow this ioctl to work.</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><U><SPAN STYLE="font-weight: medium"><FONT SIZE=3>Agpgart
kernel interface</FONT></SPAN></U></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"> The
agpgart ioctl interface is useful for user land drivers that need
GART functionality, however some kernel drivers need this
functionality as well. While it might be feasible for kernel drivers
to do their own GART manipulations, this is not very portable, and
would duplicate a lot of common code. Thus there is a common kernel
interface into the Linux agpgart kernel driver for other modules to
use. In fact the agpgart kernel driver uses this interface to
provide its ioctl functionality. It is fully capable of providing
kernel drivers with the abilities that they require. Some knowledge
of Linux system programming and operating systems in general would be
helpful, but hopefully not required for you to understand this
section.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; text-decoration: none"> To
use this interface in your kernel module you must include the header
file <Linux/agp_backend.h>. A full description of the data
structures and functions in this header file follows.</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><U>Bitfield</U><SPAN STYLE="text-decoration: none">:
flags</SPAN> in agp_info_master and agp_info_target</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
0: AGP_SUPPORTS_ISOCHRONOUS</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, the device supports isochronous mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
1: AGP_SUPPORTS_SBA</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports side band addressing operation
mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
2: AGP_SUPPORTS_AGP_3_0_ENABLED</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device is operating in AGP 3.0 electrical mode,
thus disabling the usage of 1X and 2X transfer rates, while enabling
8X transfer rates.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
3: AGP_SUPPORTS_OVER4G_ADDR</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports over 4 gigabyte addressing
mode.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
4: AGP_SUPPORTS_FAST_WRITE</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports fast write transactions on the
agp bus.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
5: AGP_SUPPORTS_SPEED_1X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 1X transfer rate.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
6: AGP_SUPPORTS_SPEED_2X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><SPAN STYLE="font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 2X transfer rate.</FONT></SPAN></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
7: AGP_SUPPORTS_SPEED_4X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 4X transfer rate.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
8: AGP_SUPPORTS_SPEED_8X</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports the AGP 8X transfer rate.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
9: AGP_SUPPORTS_ISO_PAYLOAD_32_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
32 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
10: AGP_SUPPORTS_ISO_PAYLOAD_64_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
64 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
11: AGP_SUPPORTS_ISO_PAYLOAD_128_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
128 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
12: AGP_SUPPORTS_ISO_PAYLOAD_256_B</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports an isochronous payload size of
256 bytes.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm"><FONT SIZE=2><SPAN STYLE="font-weight: medium">Bit
13: AGP_SUPPORTS_CACHED_MEMORY</SPAN></FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device supports cached memory. This bit field
value is only valid for agp targets. Even if this bit is set, the
agp driver might choose to not support allocation of agp cached
memory.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
14: AGP_SUPPORTS_APER_MMAP</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, this device does support directly mapping the agp
aperture. If it is clear, this device doesn't support using the agp
aperture directly at all.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><BR>
</P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium; text-decoration: none">
<FONT SIZE=3><U>Bitfield</U>: driver_flags in agp_extended_info
structure</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
0: AGP_USE_AGP_3_0_MODES</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software should use the values for 4X and 8X in the
AGPCMD register as defined in the AGP 3.0 interface specification.
Otherwise software should use the AGP 2.0 accepted values.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
1: AGP_CAN_MAP_APERTURE</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software is allowed to directly map the agp aperture
from the CPU side.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
2: AGP_MAPS_USE_CACHE_ATTRS</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software should assume that maps of unbound agp
memory are mapped write combined or some other system architecture
specific caching policy which is fast.</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2>Bit
3: AGP_CAN_DO_CACHED</FONT></P>
<P ALIGN=LEFT STYLE="margin-bottom: 0cm; font-weight: medium"><FONT SIZE=2> If
this bit is set, software is allowed to allocate AGP_CACHED_MEMORY
through the AGPIOC_ALLOCATE ioctl or agp_allocate_memory kernel
function.</FONT></P>