summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-20 19:41:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-10-11 17:14:18 +0100
commitb6b3bb9b5e56949cbd9189d9857ffa1ff46377fd (patch)
tree3599909523b7789c8b6d9b60bff3c6a90d09657b
parent1f70095837a30d6a88b9e313d3583d38ea55221d (diff)
sna: compare against the right array of cache buckets
Fortunately harmless today as there are the same number of inactive/active buckets. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/kgem.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index ffcfd9f6..15ddd7a8 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -309,15 +309,15 @@ static struct list *active(struct kgem *kgem,
int size)
{
uint32_t order = __fls(size / PAGE_SIZE);
- if (order >= ARRAY_SIZE(kgem->inactive))
- order = ARRAY_SIZE(kgem->inactive)-1;
+ if (order >= ARRAY_SIZE(kgem->active))
+ order = ARRAY_SIZE(kgem->active)-1;
return &kgem->active[order];
}
static size_t
agp_aperture_size(struct pci_device *dev, int gen)
{
- return dev->regions[gen < 30 ? 0 :2].size;
+ return dev->regions[gen < 30 ? 0 : 2].size;
}
void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen)