]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/amdgpu: add printing after executing page reservation to eeprom
authorGuchun Chen <guchun.chen@amd.com>
Mon, 20 Jul 2020 03:11:13 +0000 (11:11 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 6 Aug 2020 20:24:11 +0000 (16:24 -0400)
This will tell users if the faulty page has been written to
external eeprom device in dmesg log.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index e10f02ed3f65e19dda6c03e04a4294def5c95a2a..bcce4c0be4623fd0b758c1078fe0b90a832f2deb 100644 (file)
@@ -1618,7 +1618,7 @@ static int amdgpu_ras_save_bad_pages(struct amdgpu_device *adev)
        data = con->eh_data;
        save_count = data->count - control->num_recs;
        /* only new entries are saved */
-       if (save_count > 0)
+       if (save_count > 0) {
                if (amdgpu_ras_eeprom_process_recods(control,
                                                        &data->bps[control->num_recs],
                                                        true,
@@ -1627,6 +1627,9 @@ static int amdgpu_ras_save_bad_pages(struct amdgpu_device *adev)
                        return -EIO;
                }
 
+               dev_info(adev->dev, "Saved %d pages to EEPROM table.\n", save_count);
+       }
+
        return 0;
 }