drm/i915/bdw: Reorganize PPGTT init
authorBen Widawsky <benjamin.widawsky@intel.com>
Thu, 20 Feb 2014 06:05:42 +0000 (22:05 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Mar 2014 14:54:31 +0000 (15:54 +0100)
commitf3a964b96d792eac67976a3bb296a0d2049b4f91
tree25a730c457f324c0c52f90b38c902e82104d792b
parentb18b6bde300e1abe30e8b27501411a4b4a95ffeb
drm/i915/bdw: Reorganize PPGTT init

Create 3 clear stages in PPGTT init. This will help with upcoming
changes be more readable. The 3 stages are, allocation, dma mapping, and
writing the P[DT]Es

One nice benefit to the patches is that it makes 2 very clear error
points, allocation, and mapping, and avoids having to do any handling
after writing PTEs (something which was likely buggy before). This
simplified error handling I suspect will be helpful when we move to
deferred/dynamic page table allocation and mapping.

The patches also attempts to break up some of the steps into more
logical reviewable chunks, particularly when we free.

v2: Don't call cleanup on the error path since that takes down the
drm_mm and list entry, which aren't setup at this point.

v3: Fixes addressing Imre's comments from:
<1392821989.19792.13.camel@intelbox>

Don't do dynamic allocation for the page table DMA addresses. I can't
remember why I did it in the first place. This addresses one of Imre's
other issues.

Fix error path leak of page tables.

v4: Fix the fix of the error path leak. Original fix still leaked page
tables. (Imre)

Reviewed-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem_gtt.c
This page took 0.025877 seconds and 5 git commands to generate.