Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/i915: GMBUS don't need no forcewake

GMBUS is part of the display engine, and thus has no need for
forcewake. Let's not bother trying to grab it then.

I don't recall if the display engine suffers from system hangs
due to multiple accesses to the same "cacheline" in mmio space.
I hope not since we're no longer protected by the uncore lock
since commit 4e6c2d58ba86 ("drm/i915: Take forcewake once for
the entire GMBUS transaction")

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: David Weinehall <david.weinehall@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1476272687-15070-1-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>

-5
-5
drivers/gpu/drm/i915/intel_i2c.c
··· 467 467 struct intel_gmbus, 468 468 adapter); 469 469 struct drm_i915_private *dev_priv = bus->dev_priv; 470 - const unsigned int fw = 471 - intel_uncore_forcewake_for_reg(dev_priv, GMBUS0, 472 - FW_REG_READ | FW_REG_WRITE); 473 470 int i = 0, inc, try = 0; 474 471 int ret = 0; 475 472 476 - intel_uncore_forcewake_get(dev_priv, fw); 477 473 retry: 478 474 I915_WRITE_FW(GMBUS0, bus->reg0); 479 475 ··· 571 575 ret = -EAGAIN; 572 576 573 577 out: 574 - intel_uncore_forcewake_put(dev_priv, fw); 575 578 return ret; 576 579 } 577 580