summaryrefslogtreecommitdiff
path: root/src/sna/kgem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-12-05 09:24:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-12-05 09:24:02 +0000
commit14069f48645867a735ebdccb1e27a62364643c38 (patch)
treea5251edd3defb5dea26cb5364b4a3a9579015e27 /src/sna/kgem.c
parentb82bfcb54a6af0d1ee17806ef94d9da504cad606 (diff)
sna: Assume that future hardware only gets more flexible
E.g. that BLT can always write to cacheable memory, inflexible fences are a thing of the past, etc. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r--src/sna/kgem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 59b5d24a..cc86d22c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -833,7 +833,7 @@ static int kgem_get_screen_index(struct kgem *kgem)
return sna->scrn->scrnIndex;
}
-void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen)
+void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, unsigned gen)
{
struct drm_i915_gem_get_aperture aperture;
size_t totalram;
@@ -1008,7 +1008,7 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen)
kgem->max_gpu_size = totalram / 4;
half_gpu_max = kgem->max_gpu_size / 2;
- if (kgem->gen >= 040)
+ if (gen >= 040)
kgem->max_cpu_size = half_gpu_max;
else
kgem->max_cpu_size = kgem->max_object_size;