[Intel-gfx] [PATCH] Remove the @offset parameter from i830_allocator_init()

Wu Fengguang fengguang.wu at intel.com
Thu Apr 30 12:42:18 CEST 2009


@offset is redundant.  i830_allocator_init() is only called
in one place with @offset=0.

Acked-by: Magnus Kessler <Magnus.Kessler at gmx.net>
Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
---
 src/i830.h        |    3 +--
 src/i830_driver.c |    2 +-
 src/i830_memory.c |    6 +++---
 3 files changed, 5 insertions(+), 6 deletions(-)

--- xf86-video-intel.orig/src/i830.h
+++ xf86-video-intel/src/i830.h
@@ -692,8 +692,7 @@ extern void I830SetupForSolidFill(ScrnIn
 extern void I830SubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y,
 					int w, int h);
 
-Bool i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset,
-			 unsigned long size);
+Bool i830_allocator_init(ScrnInfoPtr pScrn, unsigned long size);
 void i830_allocator_fini(ScrnInfoPtr pScrn);
 i830_memory * i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
 				   unsigned long size, unsigned long pitch,
--- xf86-video-intel.orig/src/i830_driver.c
+++ xf86-video-intel/src/i830_driver.c
@@ -2319,7 +2319,7 @@ i830_memory_init(ScrnInfoPtr pScrn)
 
     tiled = i830_tiled_width(pI830, &pScrn->displayWidth, pI830->cpp);
     /* Set up our video memory allocator for the chosen videoRam */
-    if (!i830_allocator_init(pScrn, 0, pScrn->videoRam * KB(1))) {
+    if (!i830_allocator_init(pScrn, pScrn->videoRam * KB(1))) {
 	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 		"Couldn't initialize video memory allocator\n");
 	PreInitCleanup(pScrn);
--- xf86-video-intel.orig/src/i830_memory.c
+++ xf86-video-intel/src/i830_memory.c
@@ -364,7 +364,7 @@ i830_reset_allocations(ScrnInfoPtr pScrn
  * addresses to reference.
  */
 Bool
-i830_allocator_init(ScrnInfoPtr pScrn, unsigned long offset, unsigned long size)
+i830_allocator_init(ScrnInfoPtr pScrn, unsigned long size)
 {
     I830Ptr pI830 = I830PTR(pScrn);
     i830_memory *start, *end;
@@ -395,12 +395,12 @@ i830_allocator_init(ScrnInfoPtr pScrn, u
     }
 
     start->key = -1;
-    start->offset = offset;
+    start->offset = 0;
     start->end = start->offset;
     start->size = 0;
     start->next = end;
     end->key = -1;
-    end->offset = offset + size;
+    end->offset = size;
     end->end = end->offset;
     end->size = 0;
     end->prev = start;



More information about the Intel-gfx mailing list