From c6388964b079b3828c0b64951ff03008dda8f44a Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Tue, 9 Dec 2014 11:26:39 -0800 Subject: [PATCH] modesetting: Drop dumb_bo::map_count field and dead unmap code. The drm kernel API for dumb BOs apparently doesn't include an unmap ioctl, so we can't do much here. It looks like this code was copied from libkms, which was also unfinished. We may as well delete the dead variable that simply gets incremented and never read. Signed-off-by: Kenneth Graunke Tested-by: Jason Ekstrand Reviewed-by: Keith Packard --- hw/xfree86/drivers/modesetting/dumb_bo.c | 10 ---------- hw/xfree86/drivers/modesetting/dumb_bo.h | 1 - 2 files changed, 11 deletions(-) diff --git a/hw/xfree86/drivers/modesetting/dumb_bo.c b/hw/xfree86/drivers/modesetting/dumb_bo.c index 9a69aa2a4..58d420e07 100644 --- a/hw/xfree86/drivers/modesetting/dumb_bo.c +++ b/hw/xfree86/drivers/modesetting/dumb_bo.c @@ -74,7 +74,6 @@ dumb_bo_map(int fd, struct dumb_bo *bo) void *map; if (bo->ptr) { - bo->map_count++; return 0; } @@ -93,15 +92,6 @@ dumb_bo_map(int fd, struct dumb_bo *bo) return 0; } -#if 0 -static int -dumb_bo_unmap(int fd, struct dumb_bo *bo) -{ - bo->map_count--; - return 0; -} -#endif - int dumb_bo_destroy(int fd, struct dumb_bo *bo) { diff --git a/hw/xfree86/drivers/modesetting/dumb_bo.h b/hw/xfree86/drivers/modesetting/dumb_bo.h index 1d401d447..9235e61e2 100644 --- a/hw/xfree86/drivers/modesetting/dumb_bo.h +++ b/hw/xfree86/drivers/modesetting/dumb_bo.h @@ -33,7 +33,6 @@ struct dumb_bo { uint32_t handle; uint32_t size; void *ptr; - int map_count; uint32_t pitch; };