aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c5
-rw-r--r--drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c6
3 files changed, 13 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 6bb71f6ee18e..309718cc24b2 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -3549,6 +3549,9 @@ static int gfx_v9_0_ecc_late_init(void *handle)
3549 return 0; 3549 return 0;
3550 } 3550 }
3551 3551
3552 if (*ras_if)
3553 goto resume;
3554
3552 *ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL); 3555 *ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL);
3553 if (!*ras_if) 3556 if (!*ras_if)
3554 return -ENOMEM; 3557 return -ENOMEM;
@@ -3573,7 +3576,7 @@ static int gfx_v9_0_ecc_late_init(void *handle)
3573 r = amdgpu_ras_sysfs_create(adev, &fs_info); 3576 r = amdgpu_ras_sysfs_create(adev, &fs_info);
3574 if (r) 3577 if (r)
3575 goto sysfs; 3578 goto sysfs;
3576 3579resume:
3577 r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0); 3580 r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
3578 if (r) 3581 if (r)
3579 goto irq; 3582 goto irq;
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 0252345a1f08..b57476b7cc86 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -927,6 +927,9 @@ static int gmc_v9_0_ecc_late_init(void *handle)
927 amdgpu_ras_feature_enable(adev, &ras_block, 0); 927 amdgpu_ras_feature_enable(adev, &ras_block, 0);
928 return 0; 928 return 0;
929 } 929 }
930 /* handle resume path. */
931 if (*ras_if)
932 goto resume;
930 933
931 *ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL); 934 *ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL);
932 if (!*ras_if) 935 if (!*ras_if)
@@ -952,7 +955,7 @@ static int gmc_v9_0_ecc_late_init(void *handle)
952 r = amdgpu_ras_sysfs_create(adev, &fs_info); 955 r = amdgpu_ras_sysfs_create(adev, &fs_info);
953 if (r) 956 if (r)
954 goto sysfs; 957 goto sysfs;
955 958resume:
956 r = amdgpu_irq_get(adev, &adev->gmc.ecc_irq, 0); 959 r = amdgpu_irq_get(adev, &adev->gmc.ecc_irq, 0);
957 if (r) 960 if (r)
958 goto irq; 961 goto irq;
diff --git a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
index f7a6fafd70ae..756f3c60ae6a 100644
--- a/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
@@ -1522,6 +1522,10 @@ static int sdma_v4_0_late_init(void *handle)
1522 return 0; 1522 return 0;
1523 } 1523 }
1524 1524
1525 /* handle resume path. */
1526 if (*ras_if)
1527 goto resume;
1528
1525 *ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL); 1529 *ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL);
1526 if (!*ras_if) 1530 if (!*ras_if)
1527 return -ENOMEM; 1531 return -ENOMEM;
@@ -1546,7 +1550,7 @@ static int sdma_v4_0_late_init(void *handle)
1546 r = amdgpu_ras_sysfs_create(adev, &fs_info); 1550 r = amdgpu_ras_sysfs_create(adev, &fs_info);
1547 if (r) 1551 if (r)
1548 goto sysfs; 1552 goto sysfs;
1549 1553resume:
1550 r = amdgpu_irq_get(adev, &adev->sdma.ecc_irq, AMDGPU_SDMA_IRQ_ECC0); 1554 r = amdgpu_irq_get(adev, &adev->sdma.ecc_irq, AMDGPU_SDMA_IRQ_ECC0);
1551 if (r) 1555 if (r)
1552 goto irq; 1556 goto irq;