drm/i915: Calculate edram size
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Wed, 13 Apr 2016 14:26:44 +0000 (17:26 +0300)
committerMika Kuoppala <mika.kuoppala@intel.com>
Thu, 14 Apr 2016 09:27:37 +0000 (12:27 +0300)
commitc02e85a06e191f9888f3d561a39b1dc55e934b3b
treeb37c647da3abcbdeefaf5e16b57fe21b41ae1ccd
parent3accaf7e734d691dd8494548da009a646426655c
drm/i915: Calculate edram size

With gen9+ the edram capabilities are defined so
that we can calculate the edram (ellc) size accordingly.

Note that there are undefined combinations for some subset of
edram capability bits. Return the closest size for undefined indexes.
Even if we get it wrong with beginning of future gen enabling, the size
information is currently only used for boot message and in debugfs entry.

v2: Use function instead of hard to read macro (Daniel)
v3: s/INTEL_INFO/INTEL_GEN (Matthew)

Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1460557604-7126-2-git-send-email-mika.kuoppala@intel.com
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_uncore.c