]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h
Merge tag 'sched-urgent-2021-07-11' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_ras.h
index 60df268a0c66d25f4e6a159e5186d0e639b81821..256cea5d34f2b6fd11c309d61a0df95d910e151c 100644 (file)
@@ -313,9 +313,6 @@ struct ras_common_if {
 struct amdgpu_ras {
        /* 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 */
@@ -343,6 +340,11 @@ struct amdgpu_ras {
 
        /* disable ras error count harvest in recovery */
        bool disable_ras_err_cnt_harvest;
+
+       /* RAS count errors delayed work */
+       struct delayed_work ras_counte_delay_work;
+       atomic_t ras_ue_count;
+       atomic_t ras_ce_count;
 };
 
 struct ras_fs_data {
@@ -478,7 +480,7 @@ static inline int amdgpu_ras_is_supported(struct amdgpu_device *adev,
 
        if (block >= AMDGPU_RAS_BLOCK_COUNT)
                return 0;
-       return ras && (ras->supported & (1 << block));
+       return ras && (adev->ras_enabled & (1 << block));
 }
 
 int amdgpu_ras_recovery_init(struct amdgpu_device *adev);
@@ -488,8 +490,9 @@ int amdgpu_ras_request_reset_on_boot(struct amdgpu_device *adev,
 void amdgpu_ras_resume(struct amdgpu_device *adev);
 void amdgpu_ras_suspend(struct amdgpu_device *adev);
 
-unsigned long amdgpu_ras_query_error_count(struct amdgpu_device *adev,
-               bool is_ce);
+void amdgpu_ras_query_error_count(struct amdgpu_device *adev,
+                                 unsigned long *ce_count,
+                                 unsigned long *ue_count);
 
 /* error handling functions */
 int amdgpu_ras_add_bad_pages(struct amdgpu_device *adev,
@@ -628,4 +631,7 @@ void amdgpu_ras_set_error_query_ready(struct amdgpu_device *adev, bool ready);
 bool amdgpu_ras_need_emergency_restart(struct amdgpu_device *adev);
 
 void amdgpu_release_ras_context(struct amdgpu_device *adev);
+
+int amdgpu_persistent_edc_harvesting_supported(struct amdgpu_device *adev);
+
 #endif
This page took 0.034982 seconds and 4 git commands to generate.