diff options
author | Eric Anholt <anholt@freebsd.org> | 2005-08-26 20:56:11 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2005-08-26 20:56:11 +0000 |
commit | c425ad1a34439d019edd589c32a7161d01b4d822 (patch) | |
tree | bbb5ce64e4b791cb01c62e144e3b3e7e4b86d829 /bsd-core/drmP.h | |
parent | 5105f9ea59179c7129d3bf97734eb37e26ec68b0 (diff) |
Previously, drm_get_resource_start() and drm_get_resource_len() would
allocate the resource RF_ACTIVE, pull out the appropriate value, and
return it. However, allocating large framebuffers RF_ACTIVE would run
the system out of KVA, and this also left open the possibility of the
resource getting moved after getting the offset. Instead, when either
of these are called, allocate the resource if it isn't allocated
already (non-RF_ACTIVE) and store it in the DRM device, to be cleaned
up on lastclose.
Diffstat (limited to 'bsd-core/drmP.h')
-rw-r--r-- | bsd-core/drmP.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h index d5907355..751714b6 100644 --- a/bsd-core/drmP.h +++ b/bsd-core/drmP.h @@ -686,6 +686,9 @@ struct drm_driver_info { unsigned use_mtrr :1; }; +/* Length for the array of resource pointers for drm_get_resource_*. */ +#define DRM_MAX_PCI_RESOURCE 3 + /** * DRM device functions structure */ @@ -748,6 +751,10 @@ struct drm_device { #endif void *irqh; /* Handle from bus_setup_intr */ + /* Storage of resource pointers for drm_get_resource_* */ + struct resource *pcir[DRM_MAX_PCI_RESOURCE]; + int pcirid[DRM_MAX_PCI_RESOURCE]; + int pci_domain; int pci_bus; int pci_slot; |