x86/gpu: Implement stolen memory size early quirk for CHV
authorDamien Lespiau <damien.lespiau@intel.com>
Thu, 8 May 2014 19:19:41 +0000 (22:19 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 May 2014 12:13:23 +0000 (14:13 +0200)
commit3e3b2c39081c7f22f300da89b6e922a4dd2899d3
tree4b059d5d7c5f15efe27acd55db4dcfd432646ad0
parentd7f25f23d2e0c7898c95b2a6fd84f6358588de48
x86/gpu: Implement stolen memory size early quirk for CHV

CHV uses the same bits as SNB/VLV to code the Graphics Mode Select field
(GFX stolen memory size) with the addition of finer granularity modes:
4MB increments from 0x11 (8MB) to 0x1d.

Values strictly above 0x1d are either reserved or not supported.

v2: 4MB increments, not 8MB. 32MB has been omitted from the list of new
    values (Ville Syrjälä)

v3: Also correctly interpret GGMS (GTT Graphics Memory Size) (Ville
    Syrjälä)

v4: Don't assign a value that needs 20bits or more to a u16 (Rafael
    Barbalho)

[vsyrjala: v5: Split from i915 changes and add chv_stolen_funcs]

Cc: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Rafael Barbalho <rafael.barbalho@intel.com>
Tested-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
arch/x86/kernel/early-quirks.c