diff options
| author | Luben Tuikov <luben.tuikov@amd.com> | 2021-05-03 20:02:22 -0400 | 
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2021-05-10 18:07:56 -0400 | 
| commit | acdae2169bae6993c61ded36ae0b2301c07c0a9e (patch) | |
| tree | 2f91063454951ccccf04b433f0c8faacaaf084e7 /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
| parent | 71efc8701a47aa9e3de74bab06020da81757893f (diff) | |
drm/amdgpu: Remove redundant ras->supported
Remove redundant ras->supported, as this value
is also stored in adev->ras_features.
Use adev->ras_features, as that supercedes "ras",
since the latter is its member.
The dependency goes like this:
ras <== adev->ras_features <== hw_supported,
and is read as "ras depends on ras_features, which
depends on hw_supported." The arrows show the flow
of information, i.e. the dependency update.
"hw_supported" should also live in "adev".
Cc: Alexander Deucher <Alexander.Deucher@amd.com>
Cc: John Clements <john.clements@amd.com>
Cc: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Reviewed-by: John Clements <John.Clements@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 | 
1 files changed, 4 insertions, 5 deletions
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index ebbe2c5190c4..a484ac6a8399 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c @@ -2130,9 +2130,8 @@ static void amdgpu_ras_check_supported(struct amdgpu_device *adev,  	/* hw_supported needs to be aligned with RAS block mask. */  	*hw_supported &= AMDGPU_RAS_BLOCK_MASK; -	*supported = amdgpu_ras_enable == 0 ? -			0 : *hw_supported & amdgpu_ras_mask; -	adev->ras_features = *supported; +	*supported = amdgpu_ras_enable == 0 ? 0 : +		*hw_supported & amdgpu_ras_mask;  }  int amdgpu_ras_init(struct amdgpu_device *adev) @@ -2154,7 +2153,7 @@ int amdgpu_ras_init(struct amdgpu_device *adev)  	amdgpu_ras_set_context(adev, con);  	amdgpu_ras_check_supported(adev, &con->hw_supported, -			&con->supported); +				   &adev->ras_features);  	if (!con->hw_supported || (adev->asic_type == CHIP_VEGA10)) {  		/* set gfx block ras context feature for VEGA20 Gaming  		 * send ras disable cmd to ras ta during ras late init. @@ -2210,7 +2209,7 @@ int amdgpu_ras_init(struct amdgpu_device *adev)  	dev_info(adev->dev, "RAS INFO: ras initialized successfully, "  			"hardware ability[%x] ras_mask[%x]\n", -			con->hw_supported, con->supported); +			con->hw_supported, adev->ras_features);  	return 0;  release_con:  	amdgpu_ras_set_context(adev, NULL); | 
