mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-01-04 01:40:21 +01:00
Fail in DRM(agp_acquire) if the AGP aperture can't be used, such that the X
server falls back to PCI GART or disables the DRI gracefully
This commit is contained in:
parent
3669639b21
commit
32ef0f59a8
2 changed files with 8 additions and 0 deletions
|
|
@ -106,6 +106,10 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
|
|||
|
||||
if (!dev->agp || dev->agp->acquired || !drm_agp->acquire)
|
||||
return -EINVAL;
|
||||
#ifndef VMAP_4_ARGS
|
||||
if ( dev->agp->cant_use_aperture )
|
||||
return -EINVAL;
|
||||
#endif
|
||||
if ((retcode = drm_agp->acquire())) return retcode;
|
||||
dev->agp->acquired = 1;
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@ int DRM(agp_acquire)(struct inode *inode, struct file *filp,
|
|||
|
||||
if (!dev->agp || dev->agp->acquired || !drm_agp->acquire)
|
||||
return -EINVAL;
|
||||
#ifndef VMAP_4_ARGS
|
||||
if ( dev->agp->cant_use_aperture )
|
||||
return -EINVAL;
|
||||
#endif
|
||||
if ((retcode = drm_agp->acquire())) return retcode;
|
||||
dev->agp->acquired = 1;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue