Commit 19d0dfda authored by Stanley.Yang's avatar Stanley.Yang Committed by Alex Deucher

drm/amdgpu: optimize gfx ras features flag clean

Signed-off-by: default avatarStanley.Yang <Stanley.Yang@amd.com>
Reviewed-by: default avatarFeifei Xu <Feifei.Xu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ef9bcfde
...@@ -658,11 +658,7 @@ static int __amdgpu_ras_feature_enable(struct amdgpu_device *adev, ...@@ -658,11 +658,7 @@ static int __amdgpu_ras_feature_enable(struct amdgpu_device *adev,
con->features |= BIT(head->block); con->features |= BIT(head->block);
} else { } else {
if (obj && amdgpu_ras_is_feature_enabled(adev, head)) { if (obj && amdgpu_ras_is_feature_enabled(adev, head)) {
/* skip clean gfx ras context feature for VEGA20 Gaming. con->features &= ~BIT(head->block);
* will clean later
*/
if (!(!adev->ras_features && con->features & BIT(AMDGPU_RAS_BLOCK__GFX)))
con->features &= ~BIT(head->block);
put_obj(obj); put_obj(obj);
} }
} }
...@@ -770,6 +766,10 @@ int amdgpu_ras_feature_enable_on_boot(struct amdgpu_device *adev, ...@@ -770,6 +766,10 @@ int amdgpu_ras_feature_enable_on_boot(struct amdgpu_device *adev,
con->features |= BIT(head->block); con->features |= BIT(head->block);
ret = amdgpu_ras_feature_enable(adev, head, 0); ret = amdgpu_ras_feature_enable(adev, head, 0);
/* clean gfx block ras features flag */
if (adev->ras_features && head->block == AMDGPU_RAS_BLOCK__GFX)
con->features &= ~BIT(head->block);
} }
} else } else
ret = amdgpu_ras_feature_enable(adev, head, enable); ret = amdgpu_ras_feature_enable(adev, head, enable);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment