[Intel-gfx] [PATCH 2/4] drm/i915: kill obj->gtt_offset

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 15 20:56:10 CEST 2011


On Fri, 15 Apr 2011 20:57:36 +0200, Daniel Vetter <daniel.vetter at ffwll.ch> 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



More information about the Intel-gfx mailing list