From patchwork Tue Mar 2 08:22:32 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 83141 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o228MRb8013048 for ; Tue, 2 Mar 2010 08:23:06 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E81849F393; Tue, 2 Mar 2010 00:22:26 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail.ffwll.ch (cable-static-49-187.intergga.ch [157.161.49.187]) by gabe.freedesktop.org (Postfix) with ESMTP id 367DB9F38D for ; Tue, 2 Mar 2010 00:22:23 -0800 (PST) Received: by mail.ffwll.ch (Postfix, from userid 1000) id 6AAD020C1BD; Tue, 2 Mar 2010 09:22:22 +0100 (CET) X-Spam-ASN: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on orange.ffwll.ch X-Spam-Level: X-Spam-Hammy: 0.000-+--struct, 0.000-+--100644, 0.000-+--signedoffby X-Spam-Status: No, score=-4.4 required=6.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Spammy: 0.968-+--H*m:ffwll, 0.963-+--H*Ad:U*daniel.vetter, 0.951-+--H*Ad:D*ffwll.ch Received: from fliege.ffwll.ch (unknown [192.168.23.131]) by mail.ffwll.ch (Postfix) with ESMTP id ADD7020C1BA; Tue, 2 Mar 2010 09:22:11 +0100 (CET) Received: from fliege.ffwll.ch (localhost.localdomain [127.0.0.1]) by fliege.ffwll.ch (8.14.3/8.14.3) with ESMTP id o228N5Pe026160; Tue, 2 Mar 2010 09:23:05 +0100 Received: (from daniel@localhost) by fliege.ffwll.ch (8.14.3/8.14.3/Submit) id o228N5sr026159; Tue, 2 Mar 2010 09:23:05 +0100 From: Daniel Vetter To: intel-gfx@lists.freedesktop.org Date: Tue, 2 Mar 2010 09:22:32 +0100 Message-Id: X-Mailer: git-send-email 1.6.6.1 In-Reply-To: References: In-Reply-To: References: Cc: Daniel Vetter Subject: [Intel-gfx] [PATCH 01/13] i830_memory: rip out field "end" X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Tue, 02 Mar 2010 08:23:06 +0000 (UTC) diff --git a/src/i830.h b/src/i830.h index 753eeb7..9c0c1de 100644 --- a/src/i830.h +++ b/src/i830.h @@ -181,8 +181,6 @@ typedef struct _i830_memory i830_memory; struct _i830_memory { /** Offset of the allocation in card VM */ unsigned long offset; - /** End of the allocation in card VM */ - unsigned long end; /** * Requested size of the allocation: doesn't count padding. * @@ -204,7 +202,7 @@ struct _i830_memory { i830_memory *prev; /** @} */ - dri_bo *bo; + drm_intel_bo *bo; uint32_t gem_name; }; diff --git a/src/i830_memory.c b/src/i830_memory.c index 289c5f0..e3d7819 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -263,11 +263,9 @@ Bool i830_allocator_init(ScrnInfoPtr scrn, unsigned long size) } start->offset = 0; - start->end = start->offset; start->size = 0; start->next = end; end->offset = size; - end->end = end->offset; end->size = 0; end->prev = start; @@ -357,7 +355,6 @@ i830_memory *i830_allocate_memory(ScrnInfoPtr scrn, const char *name, /* Give buffer obviously wrong offset/end until it's pinned. */ mem->offset = -1; - mem->end = -1; mem->size = size; mem->pitch = pitch; @@ -413,8 +410,8 @@ i830_describe_allocations(ScrnInfoPtr scrn, int verbosity, const char *prefix) tile_suffix = " Y tiled"; xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, verbosity, - "%s0x%08lx-0x%08lx: %s (%ld kB%s)%s\n", prefix, - mem->offset, mem->end - 1, mem->name, + "%s0x%08lx: %s (%ld kB%s)%s\n", prefix, + mem->offset, mem->name, mem->size / 1024, phys_suffix, tile_suffix); } xf86DrvMsgVerb(scrn->scrnIndex, X_INFO, verbosity,