From: Mario Limonciello <mario.limonciello@amd.com>
To: Sultan Alsawaf <sultan@kerneltoast.com>,
bin.du@amd.com, pratap.nirujogi@amd.com,
amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: alexander.deucher@amd.com, benjamin.chan@amd.com,
christian.koenig@amd.com, dantony@amd.com,
gjorgji.rosikopulos@amd.com, king.li@amd.com,
phil.jawich@amd.com
Subject: Re: [PATCH] drm/amd/amdgpu: Ensure isp_kernel_buffer_alloc() creates a new BO
Date: Thu, 6 Nov 2025 12:46:51 -0600 [thread overview]
Message-ID: <a6063bc0-4ba1-4cad-9045-5fa31ea4ed7a@amd.com> (raw)
In-Reply-To: <20251105232108.107765-1-sultan@kerneltoast.com>
On 11/5/25 5:21 PM, Sultan Alsawaf wrote:
> From: Sultan Alsawaf <sultan@kerneltoast.com>
>
> When the BO pointer provided to amdgpu_bo_create_kernel() points to
> non-NULL, amdgpu_bo_create_kernel() takes it as a hint to pin that address
> rather than allocate a new BO.
>
> This functionality is never desired for allocating ISP buffers. A new BO
> should always be created when isp_kernel_buffer_alloc() is called, per the
> description for isp_kernel_buffer_alloc().
Are you just going off descriptions, or is there a problem with reuse?
>
> Ensure this by zeroing *bo right before the amdgpu_bo_create_kernel() call.
>
> Fixes: 55d42f616976 ("drm/amd/amdgpu: Add helper functions for isp buffers")
> Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c
> index 9cddbf50442a..37270c4dab8d 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c
> @@ -280,6 +280,8 @@ int isp_kernel_buffer_alloc(struct device *dev, u64 size,
> if (ret)
> return ret;
>
> + /* Ensure *bo is NULL so a new BO will be created */
> + *bo = NULL;
> ret = amdgpu_bo_create_kernel(adev,
> size,
> ISP_MC_ADDR_ALIGN,
next prev parent reply other threads:[~2025-11-06 18:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-05 23:21 [PATCH] drm/amd/amdgpu: Ensure isp_kernel_buffer_alloc() creates a new BO Sultan Alsawaf
2025-11-06 18:46 ` Mario Limonciello [this message]
2025-11-06 18:58 ` Sultan Alsawaf
2025-11-06 19:00 ` Mario Limonciello
2025-11-06 20:08 ` Nirujogi, Pratap
2025-11-06 20:31 ` Sultan Alsawaf
2025-11-06 20:51 ` Nirujogi, Pratap
2025-11-10 3:12 ` Du, Bin
2025-11-10 16:26 ` Nirujogi, Pratap
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=a6063bc0-4ba1-4cad-9045-5fa31ea4ed7a@amd.com \
--to=mario.limonciello@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=benjamin.chan@amd.com \
--cc=bin.du@amd.com \
--cc=christian.koenig@amd.com \
--cc=dantony@amd.com \
--cc=gjorgji.rosikopulos@amd.com \
--cc=king.li@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phil.jawich@amd.com \
--cc=pratap.nirujogi@amd.com \
--cc=sultan@kerneltoast.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