~ubuntu-branches/ubuntu/edgy/xorg-server/edgy-updates

« back to all changes in this revision

Viewing changes to hw/xfree86/os-support/linux/lnx_agp.c

  • Committer: Bazaar Package Importer
  • Author(s): Rodrigo Parra Novo
  • Date: 2006-07-25 20:06:28 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20060725200628-gjmmd9gxfxdc4ejs
Tags: 1:1.1.1-0ubuntu1
* New Upstream version
* Changed Build-Depends from mesa-swrast-source to mesa-swx11-source,
  following Debian package nomenclature
* Re-did 12_security_policy_in_etc.diff for 1.1.1
* Dropped 15_security_allocate_local.diff (applied upstream)
* Dropped 16_SECURITY_setuid.diff (applied upstream)
* Dropped 000_ubuntu_fix_read_kernel_mapping.patch (applied upstream)
* Dropped 002_ubuntu_fix_for_certain_intel_chipsets.patch (applied upstream)
* Updated versioned Build-Depends on mesa-swx11-source to version
  6.5.0.cvs.20060725-0ubuntu1
* Added arrayobj.c, arrayobj.h, bitset.h & rbadaptors.h to
  GL/symlink-mesa.sh (linked from mesa-swx11-source)
* Added arrayobj.c to default build target on GL/mesa/main

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
 * Abstraction of the AGP GART interface.
3
3
 *
4
 
 * This version is for both Linux and FreeBSD.
 
4
 * This version is for Linux and Free/Open/NetBSD.
5
5
 *
6
6
 * Copyright © 2000 VA Linux Systems, Inc.
7
7
 * Copyright © 2001 The XFree86 Project, Inc.
44
44
 * Close /dev/agpgart.  This frees all associated memory allocated during
45
45
 * this server generation.
46
46
 */
47
 
Bool
 
47
_X_EXPORT Bool
48
48
xf86GARTCloseScreen(int screenNum)
49
49
{
50
50
        if(gartFd != -1) {
117
117
        return TRUE;
118
118
}
119
119
 
120
 
Bool
 
120
_X_EXPORT Bool
121
121
xf86AgpGARTSupported()
122
122
{
123
123
        return GARTInit(-1);
124
124
}
125
125
 
126
 
AgpInfoPtr
 
126
_X_EXPORT AgpInfoPtr
127
127
xf86GetAGPInfo(int screenNum)
128
128
{
129
129
        struct _agp_info agpinf;
166
166
 * count instead of using acquiredScreen?
167
167
 */
168
168
 
169
 
Bool
 
169
_X_EXPORT Bool
170
170
xf86AcquireGART(int screenNum)
171
171
{
172
172
        if (screenNum != -1 && !GARTInit(screenNum))
184
184
        return TRUE;
185
185
}
186
186
 
187
 
Bool
 
187
_X_EXPORT Bool
188
188
xf86ReleaseGART(int screenNum)
189
189
{
190
190
        if (screenNum != -1 && !GARTInit(screenNum))
214
214
        return FALSE;
215
215
}
216
216
 
217
 
int
 
217
_X_EXPORT int
218
218
xf86AllocateGARTMemory(int screenNum, unsigned long size, int type,
219
219
                        unsigned long *physical)
220
220
{
252
252
        return alloc.key;
253
253
}
254
254
 
255
 
Bool
 
255
_X_EXPORT Bool
256
256
xf86DeallocateGARTMemory(int screenNum, int key)
257
257
{
258
258
        if (!GARTInit(screenNum) || acquiredScreen != screenNum)
264
264
                return FALSE;
265
265
        }
266
266
 
 
267
#ifdef __linux__
267
268
        if (ioctl(gartFd, AGPIOC_DEALLOCATE, (int *)key) != 0) {
 
269
#else
 
270
        if (ioctl(gartFd, AGPIOC_DEALLOCATE, &key) != 0) {
 
271
#endif
268
272
                xf86DrvMsg(screenNum, X_WARNING,"xf86DeAllocateGARTMemory: "
269
273
                   "deallocation gart memory with key %d failed\n\t(%s)\n",
270
274
                   key, strerror(errno));
275
279
}
276
280
 
277
281
/* Bind GART memory with "key" at "offset" */
278
 
Bool
 
282
_X_EXPORT Bool
279
283
xf86BindGARTMemory(int screenNum, int key, unsigned long offset)
280
284
{
281
285
        struct _agp_bind bind;
318
322
 
319
323
 
320
324
/* Unbind GART memory with "key" */
321
 
Bool
 
325
_X_EXPORT Bool
322
326
xf86UnbindGARTMemory(int screenNum, int key)
323
327
{
324
328
        struct _agp_unbind unbind;
350
354
 
351
355
 
352
356
/* XXX Interface may change. */
353
 
Bool
 
357
_X_EXPORT Bool
354
358
xf86EnableAGP(int screenNum, CARD32 mode)
355
359
{
356
360
        agp_setup setup;