[PATCH 5/8] modesetting: Drop dumb_bo::map_count field and dead unmap code.

Kenneth Graunke kenneth at whitecape.org
Tue Dec 9 16:55:28 PST 2014


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 <kenneth at whitecape.org>
---
 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 9a69aa2..58d420e 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 1d401d4..9235e61 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;
 };
 
-- 
2.1.3



More information about the xorg-devel mailing list