]> Pileus Git - ~andy/linux/commitdiff
drm/i915/bdw: HW context support
authorBen Widawsky <benjamin.widawsky@intel.com>
Sun, 3 Nov 2013 04:07:05 +0000 (21:07 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 8 Nov 2013 17:09:37 +0000 (18:09 +0100)
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>
drivers/gpu/drm/i915/i915_gem_context.c
drivers/gpu/drm/i915/i915_reg.h

index cc619c138777165b8e05550b4d09cf43e2281135..72a3df32292f79d88d1ba17dc8d620a24ad435ca 100644 (file)
@@ -117,6 +117,9 @@ static int get_context_size(struct drm_device *dev)
                else
                        ret = GEN7_CXT_TOTAL_SIZE(reg) * 64;
                break;
+       case 8:
+               ret = GEN8_CXT_TOTAL_SIZE;
+               break;
        default:
                BUG();
        }
index 0c5cb3cea9c66422cca18cbc99877c3649f92d19..f897a7092ce088ce2e0082eee31eadd990e46d75 100644 (file)
  * on HSW) - so the final size is 66944 bytes, which rounds to 17 pages.
  */
 #define HSW_CXT_TOTAL_SIZE             (17 * PAGE_SIZE)
+/* Same as Haswell, but 72064 bytes now. */
+#define GEN8_CXT_TOTAL_SIZE            (18 * PAGE_SIZE)
+
 
 #define VLV_CLK_CTL2                   0x101104
 #define   CLK_CTL2_CZCOUNT_30NS_SHIFT  28