diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-15 21:18:35 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-15 21:18:14 +0100 |
commit | 395d738b5086f24659b56b4b3536bffaebad8a3e (patch) | |
tree | d9a95da68a9488e7f735928a7f9607e61706a66b | |
parent | fe78904a45979d47bb092ce37d321854e2418344 (diff) |
sna: Improve handling of probe failure during initialisation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index f68b0546..fc7c8811 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -880,8 +880,10 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen) kgem->has_llc, kgem->has_cacheing, kgem->has_userptr)); VG_CLEAR(aperture); - aperture.aper_size = 64*1024*1024; + aperture.aper_size = 0; (void)drmIoctl(fd, DRM_IOCTL_I915_GEM_GET_APERTURE, &aperture); + if (aperture.aper_size == 0) + aperture.aper_size = 64*1024*1024; kgem->aperture_total = aperture.aper_size; kgem->aperture_high = aperture.aper_size * 3/4; @@ -949,11 +951,6 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen) if (kgem->large_object_size > kgem->max_gpu_size) kgem->large_object_size = kgem->max_gpu_size; - if (kgem->max_upload_tile_size > kgem->large_object_size) - kgem->max_upload_tile_size = kgem->large_object_size; - if (kgem->max_copy_tile_size > kgem->large_object_size) - kgem->max_copy_tile_size = kgem->large_object_size; - if (kgem->has_llc | kgem->has_cacheing | kgem->has_userptr) { if (kgem->large_object_size > kgem->max_cpu_size) kgem->large_object_size = kgem->max_cpu_size; |