[Intel-gfx] [PATCH] drm/i915: request ring to be pinned above GUC_WOPCM_TOP
Srivatsa, Anusha
anusha.srivatsa at intel.com
Thu Dec 22 20:58:22 UTC 2016
>-----Original Message-----
>From: Ceraolo Spurio, Daniele
>Sent: Thursday, December 22, 2016 11:55 AM
>To: intel-gfx at lists.freedesktop.org
>Cc: Ceraolo Spurio, Daniele <daniele.ceraolospurio at intel.com>; Chris Wilson
><chris at chris-wilson.co.uk>; Wajdeczko, Michal <Michal.Wajdeczko at intel.com>;
>Hiler, Arkadiusz <arkadiusz.hiler at intel.com>; Srivatsa, Anusha
><anusha.srivatsa at intel.com>; Winiarski, Michal <michal.winiarski at intel.com>
>Subject: [PATCH] drm/i915: request ring to be pinned above GUC_WOPCM_TOP
>
>From: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>
>GuC will validate the ring offset and fail if it is in the [0, GUC_WOPCM_TOP)
>range.
>
>Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
>Cc: Chris Wilson <chris at chris-wilson.co.uk>
>Cc: Michal Wajdeczko <michal.wajdeczko at intel.com>
>Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
>Cc: Anusha Srivatsa <anusha.srivatsa at intel.com>
>Cc: Michał Winiarski <michal.winiarski at intel.com>
Tested-by: Anusha Srivatsa <anusha.srivatsa at intel.com>
>---
> drivers/gpu/drm/i915/intel_ringbuffer.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c
>b/drivers/gpu/drm/i915/intel_ringbuffer.c
>index 69ccf4f..8f97b2e 100644
>--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
>+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
>@@ -1807,8 +1807,11 @@ static int init_phys_status_page(struct
>intel_engine_cs *engine)
>
> int intel_ring_pin(struct intel_ring *ring) {
>- /* Ring wraparound at offset 0 sometimes hangs. No idea why. */
>- unsigned int flags = PIN_GLOBAL | PIN_OFFSET_BIAS | 4096;
>+ /* Need a bias for 2 reasons:
>+ * 1: ring wraparound at offset 0 sometimes hangs. No idea why.
>+ * 2: GuC requires the ring to be placed above GUC_WOPCM_TOP
>+ */
>+ unsigned int flags = PIN_GLOBAL | PIN_OFFSET_BIAS |
>GUC_WOPCM_TOP;
> enum i915_map_type map;
> struct i915_vma *vma = ring->vma;
> void *addr;
>--
>1.9.1
More information about the Intel-gfx
mailing list