if (!amdgpu_device_supports_baco(adev_to_drm(adev)))
                return -ENOTSUPP;
 
-       if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
+       if (ras && adev->ras_features &&
+           adev->nbio.funcs->enable_doorbell_interrupt)
                adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
 
        return amdgpu_dpm_baco_enter(adev);
        if (ret)
                return ret;
 
-       if (ras && ras->supported && adev->nbio.funcs->enable_doorbell_interrupt)
+       if (ras && adev->ras_features &&
+           adev->nbio.funcs->enable_doorbell_interrupt)
                adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
 
        return 0;
 
 
                if (!ras)
                        return -EINVAL;
-               ras_mask = (uint64_t)ras->supported << 32 | ras->features;
+               ras_mask = (uint64_t)adev->ras_features << 32 | ras->features;
 
                return copy_to_user(out, &ras_mask,
                                min_t(u64, size, sizeof(ras_mask))) ?
 
                return 0;
 
        if ((amdgpu_in_reset(adev) &&
-            ras && ras->supported &&
+            ras && adev->ras_features &&
             (adev->asic_type == CHIP_ARCTURUS ||
              adev->asic_type == CHIP_VEGA20)) ||
             (adev->in_runpm &&
 
        /* 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)
        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.
 
        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);
 
        /* ras infrastructure */
        /* for ras itself. */
        uint32_t hw_supported;
-       /* for IP to check its ras ability. */
-       uint32_t supported;
        uint32_t features;
        struct list_head head;
        /* sysfs */
 
        if (block >= AMDGPU_RAS_BLOCK_COUNT)
                return 0;
-       return ras && (ras->supported & (1 << block));
+       return ras && (adev->ras_features & (1 << block));
 }
 
 int amdgpu_ras_recovery_init(struct amdgpu_device *adev);
 
        int ret = 0;
 
        /* avoid NBIF got stuck when do RAS recovery in BACO reset */
-       if (ras && ras->supported)
+       if (ras && adev->ras_features)
                adev->nbio.funcs->enable_doorbell_interrupt(adev, false);
 
        ret = amdgpu_dpm_baco_reset(adev);
                return ret;
 
        /* re-enable doorbell interrupt after BACO exit */
-       if (ras && ras->supported)
+       if (ras && adev->ras_features)
                adev->nbio.funcs->enable_doorbell_interrupt(adev, true);
 
        return 0;
                 * 1. PMFW version > 0x284300: all cases use baco
                 * 2. PMFW version <= 0x284300: only sGPU w/o RAS use baco
                 */
-               if ((ras && ras->supported) && adev->pm.fw_version <= 0x283400)
+               if (ras && adev->ras_features &&
+                   adev->pm.fw_version <= 0x283400)
                        baco_reset = false;
                break;
        case CHIP_ALDEBARAN:
 
                return 0;
 
        if (state == BACO_STATE_IN) {
-               if (!ras || !ras->supported) {
+               if (!ras || !adev->ras_features) {
                        data = RREG32_SOC15(THM, 0, mmTHM_BACO_CNTL);
                        data |= 0x80000000;
                        WREG32_SOC15(THM, 0, mmTHM_BACO_CNTL, data);
 
                                                                      NULL);
                        break;
                default:
-                       if (!ras || !ras->supported || adev->gmc.xgmi.pending_reset) {
+                       if (!ras || !adev->ras_features ||
+                           adev->gmc.xgmi.pending_reset) {
                                if (adev->asic_type == CHIP_ARCTURUS) {
                                        data = RREG32_SOC15(THM, 0, mmTHM_BACO_CNTL_ARCT);
                                        data |= 0x80000000;