From: "Christian König" <christian.koenig@amd.com>
To: Zack Rusin <zackr@vmware.com>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
"daniel.vetter@ffwll.ch" <daniel.vetter@ffwll.ch>,
"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
"ckoenig.leichtzumerken@gmail.com"
<ckoenig.leichtzumerken@gmail.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 03/15] dma-buf & drm/amdgpu: remove dma_resv workaround
Date: Wed, 20 Apr 2022 09:37:57 +0200 [thread overview]
Message-ID: <4c2e9414-3926-c9d7-8482-0d6d9191c2ac@amd.com> (raw)
In-Reply-To: <60ab53ce1ce1333f5e6a15fc83c3c05cd9bd1084.camel@vmware.com>
Hi Zack,
Am 20.04.22 um 05:56 schrieb Zack Rusin:
> On Thu, 2022-04-07 at 10:59 +0200, Christian König wrote:
>> Rework the internals of the dma_resv object to allow adding more than
>> one
>> write fence and remember for each fence what purpose it had.
>>
>> This allows removing the workaround from amdgpu which used a container
>> for
>> this instead.
>>
>> Signed-off-by: Christian König <christian.koenig@amd.com>
>> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: amd-gfx@lists.freedesktop.org
>
> afaict this change broke vmwgfx which now kernel oops right after boot.
> I haven't had the time to look into it yet, so I'm not sure what's the
> problem. I'll look at this tomorrow, but just in case you have some
> clues, the backtrace follows:
that's a known issue and should already be fixed with:
commit d72dcbe9fce505228dae43bef9da8f2b707d1b3d
Author: Christian König <christian.koenig@amd.com>
Date: Mon Apr 11 15:21:59 2022 +0200
drm/ttm: fix logic inversion in ttm_eu_reserve_buffers
That should have been max, not min.
Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: c8d4c18bfbc4 ("dma-buf/drivers: make reserving a shared slot
mandatory v4")
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link:
https://patchwork.freedesktop.org/patch/msgid/20220411134537.2854-1-christian.koenig@amd.com
Just a stupid logic inversion. Sorry for the noise.
Regards,
Christian.
>
> ------------[ cut here ]------------
> kernel BUG at drivers/dma-buf/dma-resv.c:306!
> invalid opcode: 0000 [#1] PREEMPT SMP PTI
> CPU: 1 PID: 1608 Comm: gnome-shell Not tainted 5.18.0-rc1-vmwgfx #18
> Hardware name: VMware, Inc. VMware Virtual Platform/440BX Desktop
> Reference Platform, BIOS 6.00 11/12/2020
> RIP: 0010:dma_resv_add_fence+0x2ed/0x300
> Code: ff ff be 01 00 00 00 e8 31 7d d9 ff e9 80 fd ff ff be 03 00 00
> 00 e8 22 7d d9 ff e9 ee fe ff ff 0f 1f 44 00 00 e9 bc fe ff ff <0f> 0b
> e8 4c cc 45 00 66 6>
> RSP: 0018:ffffa1e6846c3ab0 EFLAGS: 00010246
> RAX: 0000000000000000 RBX: ffff94c5c5507138 RCX: 902bc24e7b7c70ae
> RDX: 902bc24e7b7c70ae RSI: ffffffffaaf7f437 RDI: ffffffffaaffde66
> RBP: ffffa1e6846c3b08 R08: 0000000000000000 R09: 0000000000000001
> R10: 0000000000000004 R11: 0000000000000000 R12: ffff94c5cba90578
> R13: 0000000000000000 R14: ffff94c5cba8bc00 R15: 0000000000000000
> FS: 00007f9a17c6e600(0000) GS:ffff94c6f9e40000(0000)
> knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f9a14113000 CR3: 000000000144c003 CR4: 00000000003706e0
> Call Trace:
> <TASK>
> ttm_eu_fence_buffer_objects+0x54/0x110 [ttm]
> vmw_execbuf_process+0xcae/0x12a0 [vmwgfx]
> ? vmw_execbuf_release_pinned_bo+0x60/0x60 [vmwgfx]
> vmw_execbuf_ioctl+0xfb/0x160 [vmwgfx]
> ? vmw_execbuf_release_pinned_bo+0x60/0x60 [vmwgfx]
> drm_ioctl_kernel+0xba/0x150 [drm]
> ? __might_fault+0x77/0x80
> drm_ioctl+0x247/0x460 [drm]
> ? vmw_execbuf_release_pinned_bo+0x60/0x60 [vmwgfx]
> ? find_held_lock+0x31/0x90
> ? __fget_files+0xc5/0x190
> ? __this_cpu_preempt_check+0x13/0x20
> ? lock_release+0x142/0x2f0
> ? drm_ioctl_kernel+0x150/0x150 [drm]
> vmw_generic_ioctl+0xa3/0x110 [vmwgfx]
> vmw_unlocked_ioctl+0x15/0x20 [vmwgfx]
> __x64_sys_ioctl+0x91/0xc0
> do_syscall_64+0x3b/0x90
> entry_SYSCALL_64_after_hwframe+0x44/0xae
> RIP: 0033:0x7f9a1af1aaff
> Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48
> 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89
> c0 3d 00 f0 ff ff 7>
> RSP: 002b:00007ffd833696c0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 00007ffd83369780 RCX: 00007f9a1af1aaff
> RDX: 00007ffd83369780 RSI: 000000004028644c RDI: 000000000000000d
> RBP: 000000004028644c R08: 0000000000001248 R09: 00007ffd83369808
> R10: 0000000000000008 R11: 0000000000000246 R12: 00007ffd83369808
> R13: 000000000000000d R14: 000055719cb629c0 R15: 00007ffd83369808
> </TASK>
> Modules linked in: overlay snd_ens1371 intel_rapl_msr snd_ac97_codec
> intel_rapl_common ac97_bus vsock_loopback
> vmw_vsock_virtio_transport_common vmw_vsock_vmci>
> ---[ end trace 0000000000000000 ]---
>
> z
next prev parent reply other threads:[~2022-04-20 7:38 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-07 8:59 DMA-resv usage Christian König
2022-04-07 8:59 ` [PATCH 01/15] dma-buf: add enum dma_resv_usage v4 Christian König
2022-04-07 8:59 ` [PATCH 02/15] dma-buf: specify usage while adding fences to dma_resv obj v7 Christian König
2022-04-07 9:14 ` Daniel Vetter
2022-04-07 13:08 ` Javier Martinez Canillas
2022-04-07 13:13 ` Christian König
2022-04-07 13:16 ` Javier Martinez Canillas
2022-04-07 8:59 ` [PATCH 03/15] dma-buf & drm/amdgpu: remove dma_resv workaround Christian König
2022-04-20 3:56 ` Zack Rusin
2022-04-20 7:37 ` Christian König [this message]
2022-04-20 17:38 ` Zack Rusin
2022-04-20 17:40 ` Christian König
2022-04-20 18:41 ` Zack Rusin
2022-04-20 18:49 ` Christian König
2022-04-20 18:56 ` Christian König
2022-04-20 19:28 ` Zack Rusin
2022-04-21 10:17 ` Christian König
2022-04-21 21:13 ` Zack Rusin
2022-04-22 7:47 ` Christian König
2022-04-07 8:59 ` [PATCH 04/15] dma-buf: add DMA_RESV_USAGE_KERNEL v3 Christian König
2022-04-07 8:59 ` [PATCH 05/15] drm/amdgpu: use DMA_RESV_USAGE_KERNEL Christian König
2022-04-07 8:59 ` [PATCH 06/15] drm/radeon: " Christian König
2022-04-07 8:59 ` [PATCH 07/15] drm/nouveau: only wait for kernel fences in nouveau_bo_vm_cleanup Christian König
2022-04-07 8:59 ` [PATCH 08/15] RDMA: use DMA_RESV_USAGE_KERNEL Christian König
2022-04-07 8:59 ` [PATCH 09/15] dma-buf: add DMA_RESV_USAGE_BOOKKEEP v3 Christian König
2022-04-07 8:59 ` [PATCH 10/15] drm/amdgpu: use DMA_RESV_USAGE_BOOKKEEP Christian König
2022-04-07 8:59 ` [PATCH 11/15] dma-buf: wait for map to complete for static attachments Christian König
2022-04-07 8:59 ` [PATCH 12/15] drm/i915: drop bo->moving dependency Christian König
2022-04-08 9:05 ` Jani Nikula
2022-04-08 9:27 ` Christian König
2022-04-08 9:33 ` Daniel Vetter
2022-04-08 9:39 ` Christian König
2022-04-08 10:15 ` Jani Nikula
2022-04-08 10:41 ` Christian König
2022-04-07 8:59 ` [PATCH 13/15] drm/ttm: remove bo->moving Christian König
2022-04-07 8:59 ` [PATCH 14/15] dma-buf: drop seq count based update Christian König
2022-04-07 8:59 ` [PATCH 15/15] seqlock: drop seqcount_ww_mutex_t Christian König
2022-04-07 9:19 ` Daniel Vetter
2022-04-07 11:48 ` Christian König
2022-04-07 9:26 ` Peter Zijlstra
2022-04-07 9:15 ` DMA-resv usage Daniel Vetter
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=4c2e9414-3926-c9d7-8482-0d6d9191c2ac@amd.com \
--to=christian.koenig@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ckoenig.leichtzumerken@gmail.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=zackr@vmware.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox