Thank you for your contribution! Sashiko AI review found 2 potential issues to consider: - [Medium] drm/amdgpu: incomplete reset check in amdgpu_persistent_edc_harvesting() - [Low] drm/amdgpu: missing Fixes trailer for GPU reset ECC query regression --
commit a877bda7a103d3656c06f840d5177c8e2b166cc8 Author: Ce Sun <[email protected]> > drm/amdgpu: skip uniras block ECC query in GPU reset path > > amdgpu_uniras_query_block_ecc doesn't support being called during GPU reset. > > Signed-off-by: Ce Sun <[email protected]> > Signed-off-by: YiPeng Chai <[email protected]> [Severity: Low] This fixes a GPU reset regression introduced when amdgpu_ras_query_error_status() was wired to amdgpu_uniras_query_block_ecc(). Should this include: Fixes: fe2ccc7b7b23 ("drm/amdgpu: query block error count of ras module") > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > index 312566337ab14..6d8b2e24880f6 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > @@ -3758,6 +3758,10 @@ static int amdgpu_persistent_edc_harvesting(struct > amdgpu_device *adev, > if (!amdgpu_persistent_edc_harvesting_supported(adev)) > return 0; > > + if ((amdgpu_in_reset(adev) || amdgpu_ras_in_recovery(adev)) && > + amdgpu_uniras_enabled(adev)) > + return 0; > + > if (amdgpu_ras_query_error_status(adev, &info) != 0) > drm_warn(adev_to_drm(adev), "RAS init query failure"); > [Severity: Medium] Should this check skip the query during GPU reset regardless of amdgpu_uniras_enabled(adev), matching amdgpu_ras_reset_error_count()? During GPU reset (including amdgpu_xgmi_reset_on_init_work(), where the RAS IP block has not yet run hw_init so amdgpu_uniras_enabled(adev) returns false even on uniras devices), the reset thread holds down_write(&adev->reset_domain->sem). When amdgpu_uniras_enabled(adev) is false, execution falls through to amdgpu_ras_query_error_status() -> amdgpu_ras_query_error_status_with_event(), which fails down_read_trylock(&adev->reset_domain->sem) with -EIO and logs a false "RAS init query failure" warning for each RAS block. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
