]> git.karo-electronics.de Git - linux-beck.git/commit
drm/i915: Add PTE encoding function to the gtt/ppgtt vtables.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 22 Apr 2013 07:53:49 +0000 (00:53 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 22 Apr 2013 09:20:15 +0000 (11:20 +0200)
commit2d04befb949744998284d8551ae7cd47059b8a53
tree162b4b542a3834559daa38b79e053609f9ddbfd7
parent80ad9206c0d863832bc5f6008c4d1868d1df8e70
drm/i915: Add PTE encoding function to the gtt/ppgtt vtables.

Sandybridge/Ivybridge, Bay Trail, and Haswell all have slightly
different page table entry formats.  Rather than polluting one function
with generation checks, simply use a function pointer and set up the
correct PTE encoding function at startup.

v2: Move the gen6_gtt_pte_t typedef to i915_drv.h so that the function
    pointers and implementations have identical signatures.  Also remove
    inline keyword on gen6_pte_encode.  Both suggested by Jani Nikula.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com>
Tested-by: Daniel Leung <daniel.leung@linux.intel.com> [v1]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_gtt.c