From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 13/28] drm/i915: Avoid clearing preallocated regions from the GTT Date: Tue, 01 May 2012 18:35:01 +0100 Message-ID: <1335893703_109806@CP5-2952> References: <1335278877-13820-1-git-send-email-chris@chris-wilson.co.uk> <1335278877-13820-14-git-send-email-chris@chris-wilson.co.uk> <20120501173010.GB4832@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (smtp.fireflyinternet.com [109.228.6.236]) by gabe.freedesktop.org (Postfix) with ESMTP id C47779EB3D for ; Tue, 1 May 2012 10:35:09 -0700 (PDT) In-Reply-To: <20120501173010.GB4832@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, 1 May 2012 19:30:10 +0200, Daniel Vetter wrote: > On Tue, Apr 24, 2012 at 03:47:42PM +0100, Chris Wilson wrote: > > + /* Clear any non-preallocated blocks */ > > + list_for_each_entry(entry, &dev_priv->mm.gtt_space.hole_stack, hole_stack) { > > + unsigned long hole_start = entry->start + entry->size; > > + unsigned long hole_end = list_entry(entry->node_list.next, > > + struct drm_mm_node, > > + node_list)->start; > > + > > + DRM_DEBUG_KMS("clearing unused GTT space: [%lx, %lx]\n", > > + hole_start, hole_end); > > + > > + intel_gtt_clear_range(hole_start / PAGE_SIZE, > > + (hole_end-hole_start) / PAGE_SIZE); > > + } > > Assuming I'm reading the code correctly this does not clear the unmanaged > guard page at the end of the gtt. Right, missed. The simplest fix would seem to be do that as an explicit step afterwards. Bonus marks for commentary. -Chris -- Chris Wilson, Intel Open Source Technology Centre