From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Wilson Subject: Re: [PATCH 2/4] drm/i915: kill obj->gtt_offset Date: Fri, 15 Apr 2011 19:56:10 +0100 Message-ID: <849307$cgjlsv@azsmga001.ch.intel.com> References: <1302893858-8234-1-git-send-email-daniel.vetter@ffwll.ch> <1302893858-8234-3-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga14.intel.com (mga14.intel.com [143.182.124.37]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BCB19E744 for ; Fri, 15 Apr 2011 11:56:14 -0700 (PDT) In-Reply-To: <1302893858-8234-3-git-send-email-daniel.vetter@ffwll.ch> 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: intel-gfx@lists.freedesktop.org Cc: Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Fri, 15 Apr 2011 20:57:36 +0200, Daniel Vetter wrote: > Yet another massive round of sed'ing. The only hitch here is that in the vmap code obj->gtt_offset != obj->gtt_space.offset. There obj->gtt_space.offset is the base of the page aligned region allocated in the GTT and obj->gtt_offset is obj->gtt_space.offset + offset_in_page(user_addr). I haven't checked but is obj->gtt_space immutable by the caller, i.e. can we modify obj->gtt_space.offset and drm_mm still function correctly? Bake the page aligned assumption into drm_mm? Or simply undo the page_offset when releasing the gtt_space...? The latter sounds like it would work best. -Chris -- Chris Wilson, Intel Open Source Technology Centre