All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mika Kuoppala <mika.kuoppala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 01/18] drm/i915: Always wrap the ring offset before resetting
Date: Mon, 19 Aug 2019 11:40:29 +0300	[thread overview]
Message-ID: <87imqt5z0i.fsf@gaia.fi.intel.com> (raw)
In-Reply-To: <20190819075835.20065-2-chris@chris-wilson.co.uk>

Chris Wilson <chris@chris-wilson.co.uk> writes:

> We were passing in an unwrapped offset into intel_ring_reset() on
> unpinning. Sooner or later that had to land on ring->size.
>
> <3> [314.872147] intel_ring_reset:1237 GEM_BUG_ON(!intel_ring_offset_valid(ring, tail))
> <4> [314.872272] ------------[ cut here ]------------
> <2> [314.872276] kernel BUG at drivers/gpu/drm/i915/gt/intel_ringbuffer.c:1237!
> <4> [314.872320] invalid opcode: 0000 [#1] PREEMPT SMP PTI
> <4> [314.872331] CPU: 1 PID: 3466 Comm: i915_selftest Tainted: G     U            5.3.0-rc4-CI-Patchwork_14061+ #1
> <4> [314.872346] Hardware name: Hewlett-Packard HP Compaq 8000 Elite CMT PC/3647h, BIOS 786G7 v01.02 10/22/2009
> <4> [314.872477] RIP: 0010:intel_ring_reset+0x51/0x70 [i915]
> <4> [314.872487] Code: 9e db 51 e0 48 8b 35 b6 c7 22 00 49 c7 c0 f8 d9 d6 a0 b9 d5 04 00 00 48 c7 c2 70 5b d4 a0 48 c7 c7 6c fc c0 a0 e8 cf be 58 e0 <0f> 0b 89 77 20 89 77 1c 89 77 24 e9 4f ed ff ff 0f 1f 44 00 00 66
> <4> [314.872512] RSP: 0018:ffffc9000034fa98 EFLAGS: 00010282
> <4> [314.872523] RAX: 0000000000000010 RBX: ffff8881019412c8 RCX: 0000000000000000
> <4> [314.872534] RDX: 0000000000000001 RSI: 0000000000000008 RDI: 0000000000000f20
> <4> [314.872545] RBP: ffff888104e0f740 R08: 0000000000000000 R09: 0000000000000f20
> <4> [314.872557] R10: 0000000000000000 R11: ffff888117094518 R12: ffffffffa0d3d2c0
> <4> [314.872569] R13: ffffffffa0e2a250 R14: ffffffffa0e2a1e0 R15: ffffc9000034fe88
> <4> [314.872581] FS:  00007fe6d49f6e40(0000) GS:ffff888117a80000(0000) knlGS:0000000000000000
> <4> [314.872595] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> <4> [314.872605] CR2: 000055e3283e9cc8 CR3: 0000000108842000 CR4: 00000000000406e0
> <4> [314.872616] Call Trace:
> <4> [314.872701]  intel_ring_unpin+0x1a/0x220 [i915]
> <4> [314.872787]  ring_destroy+0x48/0xc0 [i915]
> <4> [314.872870]  intel_engines_cleanup+0x24/0x40 [i915]
> <4> [314.872964]  i915_gem_driver_release+0x1b/0xf0 [i915]
> <4> [314.872984]  i915_driver_release+0x1c/0x80 [i915]
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/gt/intel_ringbuffer.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> index 1d9c125b76d0..601c16239fdf 100644
> --- a/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> +++ b/drivers/gpu/drm/i915/gt/intel_ringbuffer.c
> @@ -1234,8 +1234,7 @@ int intel_ring_pin(struct intel_ring *ring)
>  
>  void intel_ring_reset(struct intel_ring *ring, u32 tail)
>  {
> -	GEM_BUG_ON(!intel_ring_offset_valid(ring, tail));
> -
> +	tail = intel_ring_wrap(ring, tail);
>  	ring->tail = tail;
>  	ring->head = tail;
>  	ring->emit = tail;
> -- 
> 2.23.0.rc1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-08-19  8:41 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-19  7:58 Lock dropping Chris Wilson
2019-08-19  7:58 ` [PATCH 01/18] drm/i915: Always wrap the ring offset before resetting Chris Wilson
2019-08-19  8:40   ` Mika Kuoppala [this message]
2019-08-19  7:58 ` [PATCH 02/18] drm/i915/gt: Mark up the nested engine-pm timeline lock as irqsafe Chris Wilson
2019-08-19  8:43   ` Mika Kuoppala
2019-08-19  9:04     ` Chris Wilson
2019-08-19 11:31       ` Mika Kuoppala
2019-08-19  7:58 ` [PATCH 03/18] drm/i915: Use 0 for the unordered context Chris Wilson
2019-08-19  7:58 ` [PATCH 04/18] drm/i915: Only emit the 'send bug report' once for a GPU hang Chris Wilson
2019-08-19 11:29   ` Mika Kuoppala
2019-08-19 11:36     ` Chris Wilson
2019-08-19  7:58 ` [PATCH 05/18] drm/i915: i915_active.retire() is optional Chris Wilson
2019-08-19 14:35   ` Matthew Auld
2019-08-19  7:58 ` [PATCH 06/18] drm/i915: Generalise the clflush dma-worker Chris Wilson
2019-08-19  7:58 ` [PATCH 07/18] drm/i915: Replace PIN_NONFAULT with calls to PIN_NOEVICT Chris Wilson
2019-08-19  7:58 ` [PATCH 08/18] drm/i915: Track ggtt fence reservations under its own mutex Chris Wilson
2019-08-19  7:58 ` [PATCH 09/18] drm/i915: Only track bound elements of the GTT Chris Wilson
2019-08-19  7:58 ` [PATCH 10/18] drm/i915: Pull obj->userfault tracking under the ggtt->mutex Chris Wilson
2019-08-19  7:58 ` [PATCH 11/18] drm/i915: Replace i915_vma_put_fence() Chris Wilson
2019-08-19  7:58 ` [PATCH 12/18] drm/i915: Make shrink/unshrink be atomic Chris Wilson
2019-08-19  7:58 ` [PATCH 13/18] drm/i915: Make i915_vma.flags atomic_t for mutex reduction Chris Wilson
2019-08-19  7:58 ` [PATCH 14/18] drm/i915: Pull i915_vma_pin under the vm->mutex Chris Wilson
2019-08-19  7:58 ` [PATCH 15/18] drm/i915: Push the i915_active.retire into a worker Chris Wilson
2019-08-19  7:58 ` [PATCH 16/18] drm/i915: Coordinate i915_active with its own mutex Chris Wilson
2019-08-19  7:58 ` [PATCH 17/18] drm/i915: Move idle barrier cleanup into engine-pm Chris Wilson
2019-08-19  7:58 ` [PATCH 18/18] drm/i915: Drop struct_mutex from around i915_retire_requests() Chris Wilson
2019-08-19  8:39 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/18] drm/i915: Always wrap the ring offset before resetting Patchwork
2019-08-19  9:15 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-08-19  9:20   ` Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87imqt5z0i.fsf@gaia.fi.intel.com \
    --to=mika.kuoppala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.