Skip to content

Commit 7132f7e

Browse files
kerneltoastalexdeucher
authored andcommitted
drm/amd/amdgpu: Ensure isp_kernel_buffer_alloc() creates a new BO
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(). Ensure this by zeroing *bo right before the amdgpu_bo_create_kernel() call. Fixes: 55d42f6 ("drm/amd/amdgpu: Add helper functions for isp buffers") Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Reviewed-by: Pratap Nirujogi <pratap.nirujogi@amd.com> Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 73c8c29)
1 parent 33c9957 commit 7132f7e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_isp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ int isp_kernel_buffer_alloc(struct device *dev, u64 size,
280280
if (ret)
281281
return ret;
282282

283+
/* Ensure *bo is NULL so a new BO will be created */
284+
*bo = NULL;
283285
ret = amdgpu_bo_create_kernel(adev,
284286
size,
285287
ISP_MC_ADDR_ALIGN,

0 commit comments

Comments
 (0)