On Tue, Dec 26, 2023 at 5:10 AM Srinivasan Shanmugam <srinivasan.shanmu...@amd.com> wrote: > > In function 'amdgpu_device_need_post(struct amdgpu_device *adev)' - > 'adev->pm.fw' may not be released before return. > > Using the function release_firmware() to release adev->pm.fw. > > Thus fixing the below: > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:1571 amdgpu_device_need_post() > warn: 'adev->pm.fw' from request_firmware() not released on lines: 1554. > > Suggested-by: Lijo Lazar <lijo.la...@amd.com> > Cc: Monk Liu <monk....@amd.com> > Cc: Christian König <christian.koe...@amd.com> > Cc: Alex Deucher <alexander.deuc...@amd.com> > Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmu...@amd.com>
Reviewed-by: Alex Deucher <alexander.deuc...@amd.com> > --- > v2: > release fw needs to be done only FIJI ASIC (Lijo) > > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > index 4b694696930e..33f37efaf373 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c > @@ -1544,6 +1544,7 @@ bool amdgpu_device_need_post(struct amdgpu_device *adev) > return true; > > fw_ver = *((uint32_t *)adev->pm.fw->data + 69); > + release_firmware(adev->pm.fw); > if (fw_ver < 0x00160e00) > return true; > } > -- > 2.34.1 >