From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: "Pierre-Eric Pelloux-Prayer" <pierre-eric.pelloux-prayer@amd.com>,
"Christian König" <christian.koenig@amd.com>,
"Alex Deucher" <alexander.deucher@amd.com>,
"Sasha Levin" <sashal@kernel.org>
Subject: [PATCH 6.18.y 2/3] drm/amdgpu: rename amdgpu_fill_buffer as amdgpu_ttm_clear_buffer
Date: Wed, 16 Sep 2026 14:36:40 -0400 [thread overview]
Message-ID: <20260916183641.1771014-2-sashal@kernel.org> (raw)
In-Reply-To: <20260916183641.1771014-1-sashal@kernel.org>
From: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
[ Upstream commit 5bd8aab55bc18a744577bff79a8c58b031e3c05d ]
This is the only use case for this function.
---
v2: amdgpu_ttm_clear_buffer instead of amdgpu_clear_buffer
---
Signed-off-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Stable adaptation for 6.18:
The preceding stable dependency already specialized amdgpu_fill_buffer
for zeroing and removed its src_data argument. Retain that adaptation
and limit this dependency to renaming the existing helper, its declaration,
its kernel-doc heading, and all three callers.
Keep the existing drm_sched_entity type, high_pr/low_pr selection, shared
GART-window locking, reservation dependencies, and no-job return handling.
The upstream amdgpu_ttm_buffer_entity infrastructure and next-clear-entity
helper are absent from this stable tree and are not needed for the rename.
No functions are added. The VMID-flush changes remain in the target commit,
whose unchanged patch applies cleanly after this dependency.
Stable-dep-of: 87ceb8cba73d ("drm/amdgpu: skip the VMID 0 flush for VRAM")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 12 ++++++------
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 18 +++++++++---------
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 12 ++++++------
3 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index e29bcb090f06d..4def8b6640891 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -728,9 +728,9 @@ int amdgpu_bo_create(struct amdgpu_device *adev,
bo->tbo.resource->mem_type == TTM_PL_VRAM) {
struct dma_fence *fence;
- r = amdgpu_fill_buffer(&adev->mman.low_pr, bo,
- bo->tbo.base.resv, &fence, true,
- AMDGPU_KERNEL_JOB_ID_TTM_CLEAR_BUFFER);
+ r = amdgpu_ttm_clear_buffer(&adev->mman.low_pr, bo,
+ bo->tbo.base.resv, &fence, true,
+ AMDGPU_KERNEL_JOB_ID_TTM_CLEAR_BUFFER);
if (unlikely(r))
goto fail_unreserve;
@@ -1328,9 +1328,9 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
if (r)
goto out;
- r = amdgpu_fill_buffer(&adev->mman.low_pr, abo,
- &bo->base._resv, &fence, false,
- AMDGPU_KERNEL_JOB_ID_CLEAR_ON_RELEASE);
+ r = amdgpu_ttm_clear_buffer(&adev->mman.low_pr, abo,
+ &bo->base._resv, &fence, false,
+ AMDGPU_KERNEL_JOB_ID_CLEAR_ON_RELEASE);
if (WARN_ON(r))
goto out;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
index dbaba8aacec27..8a433a0920e74 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
@@ -412,8 +412,8 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
(abo->flags & AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE)) {
struct dma_fence *wipe_fence = NULL;
- r = amdgpu_fill_buffer(&adev->mman.high_pr, abo, NULL, &wipe_fence,
- false, AMDGPU_KERNEL_JOB_ID_MOVE_BLIT);
+ r = amdgpu_ttm_clear_buffer(&adev->mman.high_pr, abo, NULL, &wipe_fence,
+ false, AMDGPU_KERNEL_JOB_ID_MOVE_BLIT);
if (r) {
goto error;
} else if (wipe_fence) {
@@ -2394,7 +2394,7 @@ static int amdgpu_ttm_fill_mem(struct amdgpu_device *adev,
}
/**
- * amdgpu_fill_buffer - fill a buffer with 0
+ * amdgpu_ttm_clear_buffer - fill a buffer with 0
* @entity: scheduler entity to use
* @bo: the bo to fill
* @resv: fences contained in this reservation will be used as dependencies.
@@ -2404,12 +2404,12 @@ static int amdgpu_ttm_fill_mem(struct amdgpu_device *adev,
* after allocation.
* @k_job_id: trace id
*/
-int amdgpu_fill_buffer(struct drm_sched_entity *entity,
- struct amdgpu_bo *bo,
- struct dma_resv *resv,
- struct dma_fence **out_fence,
- bool consider_clear_status,
- u64 k_job_id)
+int amdgpu_ttm_clear_buffer(struct drm_sched_entity *entity,
+ struct amdgpu_bo *bo,
+ struct dma_resv *resv,
+ struct dma_fence **out_fence,
+ bool consider_clear_status,
+ u64 k_job_id)
{
struct amdgpu_device *adev = amdgpu_ttm_adev(bo->tbo.bdev);
struct dma_fence *fence = NULL;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index fc5133af30485..c5f7efd78409a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@ -178,12 +178,12 @@ int amdgpu_ttm_copy_mem_to_mem(struct amdgpu_device *adev,
uint64_t size, bool tmz,
struct dma_resv *resv,
struct dma_fence **f);
-int amdgpu_fill_buffer(struct drm_sched_entity *entity,
- struct amdgpu_bo *bo,
- struct dma_resv *resv,
- struct dma_fence **out_fence,
- bool consider_clear_status,
- u64 k_job_id);
+int amdgpu_ttm_clear_buffer(struct drm_sched_entity *entity,
+ struct amdgpu_bo *bo,
+ struct dma_resv *resv,
+ struct dma_fence **out_fence,
+ bool consider_clear_status,
+ u64 k_job_id);
int amdgpu_ttm_alloc_gart(struct ttm_buffer_object *bo);
void amdgpu_ttm_recover_gart(struct ttm_buffer_object *tbo);
--
2.53.0
next prev parent reply other threads:[~2026-09-16 18:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-16 9:21 FAILED: patch "[PATCH] drm/amdgpu: skip the VMID 0 flush for VRAM" failed to apply to 6.18-stable tree gregkh
2026-09-16 18:36 ` [PATCH 6.18.y 1/3] drm/amdgpu: get rid of amdgpu_ttm_clear_buffer Sasha Levin
2026-09-16 18:36 ` Sasha Levin [this message]
2026-09-17 8:17 ` [PATCH 6.18.y 2/3] drm/amdgpu: rename amdgpu_fill_buffer as amdgpu_ttm_clear_buffer Christian König
2026-09-17 9:54 ` Arunpravin Paneer Selvam
2026-09-17 10:35 ` Arunpravin Paneer Selvam
2026-09-16 18:36 ` [PATCH 6.18.y 3/3] drm/amdgpu: skip the VMID 0 flush for VRAM Sasha Levin
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=20260916183641.1771014-2-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=alexander.deucher@amd.com \
--cc=christian.koenig@amd.com \
--cc=pierre-eric.pelloux-prayer@amd.com \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox