From 2db59d530777b76f6b7944e0bfa43c9fede10b10 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Tue, 3 Feb 2015 14:25:14 +0000 Subject: drm/i915: Detect eDRAM with the enabled bit only At the moment we compare the whole EDRAM_PRESENT/EDRAMCAP register value to 1 while EDRAM_PRESENT is only bit 0 (the rest may be used to describe eDRAM capabilities). To be more future proof, only look at bit 0 to detect eDRAM presence. Signed-off-by: Damien Lespiau Reviewed-by: Paulo Zanoni Signed-off-by: Daniel Vetter --- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/i915/intel_uncore.c') diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index db864dff810e..820a208ed4c8 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -329,7 +329,7 @@ static void intel_uncore_ellc_detect(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; if ((IS_HASWELL(dev) || IS_BROADWELL(dev)) && - (__raw_i915_read32(dev_priv, HSW_EDRAM_PRESENT) == 1)) { + (__raw_i915_read32(dev_priv, HSW_EDRAM_PRESENT) & EDRAM_ENABLED)) { /* The docs do not explain exactly how the calculation can be * made. It is somewhat guessable, but for now, it's always * 128MB. -- cgit v1.2.3