diff options
author | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-11-03 00:07:05 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-11-08 12:09:37 -0500 |
commit | 8897644a6db05c64d3fa0c40dcca8067d4802e0a (patch) | |
tree | 46f5a7738925eb5ccffeec037a0f5a0dbce542dd | |
parent | 31a5336e1c8e7cffb5ce3f6530aded7c05edb664 (diff) |
drm/i915/bdw: HW context support
BDW context sizes varies a bit.
v2: Squash in fixup for the hw context size from Ben.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net> (v1)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_context.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_reg.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index cc619c138777..72a3df32292f 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c | |||
@@ -117,6 +117,9 @@ static int get_context_size(struct drm_device *dev) | |||
117 | else | 117 | else |
118 | ret = GEN7_CXT_TOTAL_SIZE(reg) * 64; | 118 | ret = GEN7_CXT_TOTAL_SIZE(reg) * 64; |
119 | break; | 119 | break; |
120 | case 8: | ||
121 | ret = GEN8_CXT_TOTAL_SIZE; | ||
122 | break; | ||
120 | default: | 123 | default: |
121 | BUG(); | 124 | BUG(); |
122 | } | 125 | } |
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 0c5cb3cea9c6..f897a7092ce0 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h | |||
@@ -1822,6 +1822,9 @@ | |||
1822 | * on HSW) - so the final size is 66944 bytes, which rounds to 17 pages. | 1822 | * on HSW) - so the final size is 66944 bytes, which rounds to 17 pages. |
1823 | */ | 1823 | */ |
1824 | #define HSW_CXT_TOTAL_SIZE (17 * PAGE_SIZE) | 1824 | #define HSW_CXT_TOTAL_SIZE (17 * PAGE_SIZE) |
1825 | /* Same as Haswell, but 72064 bytes now. */ | ||
1826 | #define GEN8_CXT_TOTAL_SIZE (18 * PAGE_SIZE) | ||
1827 | |||
1825 | 1828 | ||
1826 | #define VLV_CLK_CTL2 0x101104 | 1829 | #define VLV_CLK_CTL2 0x101104 |
1827 | #define CLK_CTL2_CZCOUNT_30NS_SHIFT 28 | 1830 | #define CLK_CTL2_CZCOUNT_30NS_SHIFT 28 |