xf86-video-intel: 2 commits - src/sna/kgem.c
Chris Wilson
ickle at kemper.freedesktop.org
Mon Sep 30 01:20:36 PDT 2013
src/sna/kgem.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit 2c06e9576aa62290a133cea5158bb979284ac8a8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Sep 29 23:33:23 2013 +0100
sna: Use the bo allocation cache for converting buffers
Since we have a malloc cache for the bo, we may as well use it when
converting from an upload buffer to a bo.
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 4e70f14..9685fb3 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -1742,7 +1742,11 @@ static struct kgem_bo *kgem_bo_replace_io(struct kgem_bo *bo)
return bo;
assert(!bo->snoop);
- base = malloc(sizeof(*base));
+ if (__kgem_freed_bo) {
+ base = __kgem_freed_bo;
+ __kgem_freed_bo = *(struct kgem_bo **)base;
+ } else
+ base = malloc(sizeof(*base));
if (base) {
DBG(("%s: transferring io handle=%d to bo\n",
__FUNCTION__, bo->handle));
commit 57c799deb01b8a5919f872926cf71f11cb3aee15
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sun Sep 29 23:33:11 2013 +0100
sna: Whitespace fixes
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index c3d28ee..4e70f14 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -713,7 +713,7 @@ total_ram_size(void)
static unsigned
cpu_cache_size__cpuid4(void)
{
- /* Deterministic Cache Parmaeters (Function 04h)":
+ /* Deterministic Cache Parameters (Function 04h)":
* When EAX is initialized to a value of 4, the CPUID instruction
* returns deterministic cache information in the EAX, EBX, ECX
* and EDX registers. This function requires ECX be initialized
@@ -1520,7 +1520,7 @@ static uint32_t kgem_surface_size(struct kgem *kgem,
if (relaxed_fencing || tiling == I915_TILING_NONE)
return PAGE_ALIGN(size);
- /* We need to allocate a pot fence region for a tiled buffer. */
+ /* We need to allocate a pot fence region for a tiled buffer. */
if (kgem->gen < 030)
tile_width = 512 * 1024;
else
@@ -1631,7 +1631,7 @@ static void kgem_bo_binding_free(struct kgem *kgem, struct kgem_bo *bo)
b = bo->binding.next;
while (b) {
struct kgem_bo_binding *next = b->next;
- free (b);
+ free(b);
b = next;
}
}
More information about the xorg-commit
mailing list