[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a6063bc0-4ba1-4cad-9045-5fa31ea4ed7a@amd.com>
Date: Thu, 6 Nov 2025 12:46:51 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Sultan Alsawaf <sultan@...neltoast.com>, bin.du@....com,
pratap.nirujogi@....com, amd-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Cc: alexander.deucher@....com, benjamin.chan@....com,
christian.koenig@....com, dantony@....com, gjorgji.rosikopulos@....com,
king.li@....com, phil.jawich@....com
Subject: Re: [PATCH] drm/amd/amdgpu: Ensure isp_kernel_buffer_alloc() creates
a new BO
On 11/5/25 5:21 PM, Sultan Alsawaf wrote:
> From: Sultan Alsawaf <sultan@...neltoast.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@...neltoast.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,
Powered by blists - more mailing lists