Skip to contentSkip to conversation

drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

PATCH In review Tao Zhou 3 participants 4 messages Sep 10, 2024

Subsystems (2)
lore
Share & tools
lore

Tao Zhou

author
#0 lore raw

PATCH 1/1 drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

The feature is not applicable to specific app platform.

v2: update the disablement condition and commit description

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -0
index dbfc41ddc3c7..08efc9121adc 100644
@@ -2055,6 +2055,11 @@ static int amdgpu_ras_fs_init(struct amdgpu_device *adev)
 	con->event_state_attr = dev_attr_event_state;
 	sysfs_attr_init(attrs[3]);
 
+	/* bad page feature is not applicable to specific app platform */
+	if (adev->gmc.is_app_apu &&
+	    amdgpu_ip_version(adev, UMC_HWIP, 0) == IP_VERSION(12, 0, 0))
+		amdgpu_bad_page_threshold = 0;
+
 	if (amdgpu_bad_page_threshold != 0) {
 		/* add bad_page_features entry */
 		bin_attr_gpu_vram_bad_pages.private = NULL;
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Tuesday, September 10, 2024 11:59
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

The feature is not applicable to specific app platform.

v2: update the disablement condition and commit description

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +5 -0
index dbfc41ddc3c7..08efc9121adc 100644
@@ -2055,6 +2055,11 @@ static int amdgpu_ras_fs_init(struct amdgpu_device *adev)
        con->event_state_attr = dev_attr_event_state;
        sysfs_attr_init(attrs[3]);
 
+       /* bad page feature is not applicable to specific app platform */
+       if (adev->gmc.is_app_apu &&
+           amdgpu_ip_version(adev, UMC_HWIP, 0) == IP_VERSION(12, 0, 0))
+               amdgpu_bad_page_threshold = 0;
+
        if (amdgpu_bad_page_threshold != 0) {
                /* add bad_page_features entry */
                bin_attr_gpu_vram_bad_pages.private = NULL;

--
2.34.1

#2 lore raw
In reply to Tao Zhou
Quoted 14 lines · Tao Zhou

The feature is not applicable to specific app platform.

v2: update the disablement condition and commit description

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index dbfc41ddc3c7..08efc9121adc 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c static int amdgpu_ras_fs_init(struct amdgpu_device *adev) · line 2061

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -0
@@ -2055,6 +2055,11 @@ static int amdgpu_ras_fs_init(struct amdgpu_device *adev)
 	con->event_state_attr = dev_attr_event_state;
 	sysfs_attr_init(attrs[3]);
 
+	/* bad page feature is not applicable to specific app platform */
+	if (adev->gmc.is_app_apu &&
+	    amdgpu_ip_version(adev, UMC_HWIP, 0) == IP_VERSION(12, 0, 0))
+		amdgpu_bad_page_threshold = 0;

I think sysfs file creation is not the right place to do this. It should be done probably much earlier at a place where it says what features are supported for the SOC.

Thanks,
Lijo

Quoted 4 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
+
 	if (amdgpu_bad_page_threshold != 0) {
 		/* add bad_page_features entry */
 		bin_attr_gpu_vram_bad_pages.private = NULL;
author
#3 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 34 lines

-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Tuesday, September 10, 2024 1:21 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: disable GPU RAS bad page feature for specific ASIC

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c static int amdgpu_ras_fs_init(struct amdgpu_device

Quoted 15 lines · Tao Zhou

The feature is not applicable to specific app platform.

v2: update the disablement condition and commit description

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +0 -0
index dbfc41ddc3c7..08efc9121adc 100644
@@ -2055,6 +2055,11 @@ static int amdgpu_ras_fs_init(struct amdgpu_device

*adev)

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c static int amdgpu_ras_fs_init(struct amdgpu_device *adev) · line 2061

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +4 -0
    con->event_state_attr = dev_attr_event_state;
    sysfs_attr_init(attrs[3]);
 
+   /* bad page feature is not applicable to specific app platform */
+   if (adev->gmc.is_app_apu &&
+       amdgpu_ip_version(adev, UMC_HWIP, 0) == IP_VERSION(12, 0, 0))
+           amdgpu_bad_page_threshold = 0;
Quoted 6 lines

I think sysfs file creation is not the right place to do this. It should be done probably much earlier at a place where it says what features are supported for the SOC.

Thanks,
Lijo

[Tao] thanks for your suggestion, will update it in v3.

Quoted 5 lines
Quoted 5 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
+
    if (amdgpu_bad_page_threshold != 0) {
            /* add bad_page_features entry */
            bin_attr_gpu_vram_bad_pages.private = NULL;