[PATCH 9/9] drm/i915: Enable render context support for Ironlake
Chris Wilson
chris at chris-wilson.co.uk
Fri Nov 17 18:31:47 UTC 2017
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem_context.c | 7 ++++++-
drivers/gpu/drm/i915/intel_engine_cs.c | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 1c3eac354f21..eb1925b5d5e1 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -591,6 +591,8 @@ mi_set_context(struct drm_i915_gem_request *req, u32 flags)
len = 4;
if (IS_GEN7(dev_priv))
len += 2 + (num_rings ? 4*num_rings + 6 : 0);
+ if (IS_GEN5(dev_priv))
+ len += 2;
cs = intel_ring_begin(req, len);
if (IS_ERR(cs))
@@ -613,6 +615,8 @@ mi_set_context(struct drm_i915_gem_request *req, u32 flags)
GEN6_PSMI_SLEEP_MSG_DISABLE);
}
}
+ } else if (IS_GEN5(dev_priv)) {
+ *cs++ = MI_SUSPEND_FLUSH | MI_SUSPEND_FLUSH_EN;
}
*cs++ = MI_NOOP;
@@ -646,7 +650,8 @@ mi_set_context(struct drm_i915_gem_request *req, u32 flags)
*cs++ = i915_ggtt_offset(engine->scratch);
*cs++ = MI_NOOP;
}
- *cs++ = MI_ARB_ON_OFF | MI_ARB_ENABLE;
+ } else if (IS_GEN5(dev_priv)) {
+ *cs++ = MI_SUSPEND_FLUSH;
}
intel_ring_advance(req, cs);
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 22c095035539..f2dfa3f9fbdf 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -29,6 +29,8 @@
#include "intel_ringbuffer.h"
#include "intel_lrc.h"
+#define GEN5_CXT_TOTAL_SIZE ( 1 * PAGE_SIZE)
+
/* Haswell does have the CXT_SIZE register however it does not appear to be
* valid. Now, docs explain in dwords what is in the context object. The full
* size is 70720 bytes, however, the power context and execlist context will
@@ -175,6 +177,7 @@ __intel_engine_context_size(struct drm_i915_private *dev_priv, u8 class)
return round_up(GEN6_CXT_TOTAL_SIZE(cxt_size) * 64,
PAGE_SIZE);
case 5:
+ return GEN5_CXT_TOTAL_SIZE;
case 4:
case 3:
case 2:
--
2.15.0
More information about the Intel-gfx-trybot
mailing list