From: Jure Repinc <jlp@holodeck1.com>
To: amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update
Date: Thu, 19 Dec 2024 01:25:15 +0100 [thread overview]
Message-ID: <4917513.OV4Wx5bFTl@excalibur> (raw)
In-Reply-To: <20241217172256.3668-1-michel@daenzer.net>
[-- Attachment #1: Type: text/plain, Size: 1702 bytes --]
> From: Michel Dänzer <mdaenzer@redhat.com>
>
> Third time's the charm, I hope?
>
> Fixes: d3116756a710 ("drm/ttm: rename bo->mem and make it a pointer")
> Issue: https://gitlab.freedesktop.org/drm/amd/-/issues/3837
> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com>
> ---
>
> Or should amdgpu_vm_bo_evicted be called in the !bo->tbo.resource case
> as well?
>
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index ddd7f05e4db9..c9c48b782ec1
> 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1266,10 +1266,9 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
> struct amdgpu_bo_va *bo_va, * next command submission.
> */
> if (amdgpu_vm_is_bo_always_valid(vm, bo)) {
> - uint32_t mem_type = bo->tbo.resource->mem_type;
> -
> - if (!(bo->preferred_domains &
> - amdgpu_mem_type_to_domain(mem_type)))
> + if (bo->tbo.resource &&
> + !(bo->preferred_domains &
> + amdgpu_mem_type_to_domain(bo->tbo.resource-
>mem_type)))
> amdgpu_vm_bo_evicted(&bo_va->base);
> else
> amdgpu_vm_bo_idle(&bo_va->base);
Hi
I reported the issue and just replying to confirm the fix works for me. I
applied the patch to the openSUSE kernel sources of the same kernel version
that I got the original bug with and tested again with this patch and now all
applications works fine.
Thanks!
--
Jabber/XMPP: JLP@jabber.org
Matrix: @jlp:matrix.org
Mastodon/ActivityPub: @JRepin@mstdn.io
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 4066 bytes --]
prev parent reply other threads:[~2024-12-19 7:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 17:22 [PATCH] drm/amdgpu: Handle NULL bo->tbo.resource (again) in amdgpu_vm_bo_update Michel Dänzer
2024-12-18 8:32 ` Christian König
2024-12-18 8:59 ` Michel Dänzer
2024-12-18 14:50 ` Alex Deucher
2024-12-19 0:25 ` Jure Repinc [this message]
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=4917513.OV4Wx5bFTl@excalibur \
--to=jlp@holodeck1.com \
--cc=amd-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.