]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: store eLLC size
authorBen Widawsky <ben@bwidawsk.net>
Thu, 4 Jul 2013 18:02:05 +0000 (11:02 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 16 Jul 2013 06:08:21 +0000 (08:08 +0200)
commit4c9393193b6b4a0f9237419b9a09e3aee0b5db5c
treec35a5562b667f237592ed55ee51aa14d47c76d11
parent4ee27d580cb59a1dd9166e398154afb49045604d
drm/i915: store eLLC size

The eLLC cannot be determined by PCIID because as far as we know, even
machines supporting eLLC may not have it enabled, or fused off or
whatever. It's possible this isn't actually true, and at that point we
can switch to a DEV_INFO flag instead.

I've defined everything where the docs are clear, and left the rest as
magic.

But we need it before we set the pte_encode function pointers, which
happens really early, in gtt_init.

The problem with just doing the normal sequence earlier is we don't have
the ability to use forcewake until after the pte functions have been set
up.

Since all solutions are somewhat ugly (barring rewriting all the init
ordering), I've opted to do the detection really early, and the enabling
later - since the register to detect doesn't require forcewake.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
[danvet: Move dev_priv->ellc_size away from the dri1 dungeon to a nice
place right next to the l3 parity stuff. Also squash in the follow-up
commit to read out the eLLC size a bit earlier.]
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_dma.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c