AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gmail.com>
To: "Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
	"Le Ma" <le.ma@amd.com>, "Lijo Lazar" <lijo.lazar@amd.com>
Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	 linux-kernel@vger.kernel.org, Matt Turner <mattst88@gmail.com>,
	 Jatin Kataria <jkataria@netflix.com>
Subject: [PATCH 2/3] drm/amdgpu: clear stale JPEG and VCN1 IP dump pointers
Date: Wed, 02 Dec 2026 17:34:11 -0500	[thread overview]
Message-ID: <20261202-amdgpu-devcoredump-fixes-v1-2-59f622a29769@gmail.com> (raw)
In-Reply-To: <20261202-amdgpu-devcoredump-fixes-v1-0-59f622a29769@gmail.com>

amdgpu_jpeg_reg_dump_fini() and vcn_v1_0_sw_fini() free the IP dump
buffer but leave adev->jpeg.ip_dump and adev->vcn.ip_dump set. Clear
them, as amdgpu_vcn_reg_dump_fini() already does for the other VCN
versions, so that anything looking at them after teardown sees NULL
rather than a freed buffer.

Suggested-by: Jatin Kataria <jkataria@netflix.com>
Signed-off-by: Matt Turner <mattst88@gmail.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c | 1 +
 drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
index ec3833c79a01..9f31cb445aa5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_jpeg.c
@@ -501,6 +501,7 @@ int amdgpu_jpeg_reg_dump_init(struct amdgpu_device *adev,
 static void amdgpu_jpeg_reg_dump_fini(struct amdgpu_device *adev)
 {
 	kfree(adev->jpeg.ip_dump);
+	adev->jpeg.ip_dump = NULL;
 	adev->jpeg.reg_list = NULL;
 	adev->jpeg.reg_count = 0;
 }
diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
index 897310d04f83..ee30cf1503ed 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c
@@ -233,6 +233,7 @@ static int vcn_v1_0_sw_fini(struct amdgpu_ip_block *ip_block)
 	amdgpu_vcn_sw_fini(adev, 0);
 
 	kfree(adev->vcn.ip_dump);
+	adev->vcn.ip_dump = NULL;
 
 	return 0;
 }

-- 
2.56.1


  parent reply	other threads:[~2026-12-02 22:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-02 22:34 [PATCH 0/3] drm/amdgpu: devcoredump and reset fixes Matt Turner
2026-12-02 22:34 ` [PATCH 1/3] drm/amdgpu: fix IB content read in the devcoredump Matt Turner
2026-12-02 22:53   ` sashiko-bot
2026-12-02 22:34 ` Matt Turner [this message]
2026-12-02 22:34 ` [PATCH 3/3] drm/amdgpu: don't unmap legacy queues through MES during reset Matt Turner
2026-12-02 22:48   ` sashiko-bot

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=20261202-amdgpu-devcoredump-fixes-v1-2-59f622a29769@gmail.com \
    --to=mattst88@gmail.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jkataria@netflix.com \
    --cc=le.ma@amd.com \
    --cc=lijo.lazar@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=simona@ffwll.ch \
    /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