Skip to contentSkip to conversation

drm/amdgpu: correct releasing the same sdma fw repeatedly

PATCH In review Jiansong Chen 2 participants 3 messages Dec 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: correct releasing the same sdma fw repeatedly

Same as sienna_cichlid, dimgrey_cavefish and navy_flounder reuse sdma0 fw for other instances, so free it only once.

Change-Id I9dda4a9b73e20243ee48f54d8f0c7593d7e7354b
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +2 -1
index f1ba36a094da..6ac314c8be32 100644
@@ -125,7 +125,8 @@ static void sdma_v5_2_destroy_inst_ctx(struct amdgpu_device *adev)
 		release_firmware(adev->sdma.instance[i].fw);
 		adev->sdma.instance[i].fw = NULL;
 
-		if (adev->asic_type == CHIP_SIENNA_CICHLID)
+		if (adev->asic_type >= CHIP_SIENNA_CICHLID &&
+		    adev->asic_type <= CHIP_DIMGREY_CAVEFISH)
 			break;
 	}
 
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
#1 lore raw

[AMD Public Use]

Shall we ignore this patch and wait for your latest fixes that remove the asic type check for sdma_v5_2.

I agree with you that should be more reasonable approach.

Regards,
Hawking

-----Original Message-----
From: Jiansong Chen <[email protected]>
Sent: Wednesday, December 30, 2020 17:23
To: [email protected]
Cc: Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; Chen, Jiansong (Simon) <[email protected]>
Subject: [PATCH] drm/amdgpu: correct releasing the same sdma fw repeatedly

Same as sienna_cichlid, dimgrey_cavefish and navy_flounder reuse sdma0 fw for other instances, so free it only once.

Change-Id I9dda4a9b73e20243ee48f54d8f0c7593d7e7354b
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +2 -1
index f1ba36a094da..6ac314c8be32 100644
@@ -125,7 +125,8 @@ static void sdma_v5_2_destroy_inst_ctx(struct amdgpu_device *adev)
 		release_firmware(adev->sdma.instance[i].fw);
 		adev->sdma.instance[i].fw = NULL;
 
-		if (adev->asic_type == CHIP_SIENNA_CICHLID)
+		if (adev->asic_type >= CHIP_SIENNA_CICHLID &&
+		    adev->asic_type <= CHIP_DIMGREY_CAVEFISH)
 			break;
 	}
 

--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#2 lore raw

Ok, I will send another patch.

Regards,
Jiansong
-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, December 30, 2020 6:02 PM
To: Chen, Jiansong (Simon) <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>; Chen, Jiansong (Simon) <[email protected]>
Subject: RE: [PATCH] drm/amdgpu: correct releasing the same sdma fw repeatedly

[AMD Public Use]

Shall we ignore this patch and wait for your latest fixes that remove the asic type check for sdma_v5_2.

I agree with you that should be more reasonable approach.

Regards,
Hawking

-----Original Message-----
From: Jiansong Chen <[email protected]>
Sent: Wednesday, December 30, 2020 17:23
To: [email protected]
Cc: Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; Chen, Jiansong (Simon) <[email protected]>
Subject: [PATCH] drm/amdgpu: correct releasing the same sdma fw repeatedly

Same as sienna_cichlid, dimgrey_cavefish and navy_flounder reuse sdma0 fw for other instances, so free it only once.

Change-Id I9dda4a9b73e20243ee48f54d8f0c7593d7e7354b
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +2 -1
index f1ba36a094da..6ac314c8be32 100644
@@ -125,7 +125,8 @@ static void sdma_v5_2_destroy_inst_ctx(struct amdgpu_device *adev)
 		release_firmware(adev->sdma.instance[i].fw);
 		adev->sdma.instance[i].fw = NULL;
 
-		if (adev->asic_type == CHIP_SIENNA_CICHLID)
+		if (adev->asic_type >= CHIP_SIENNA_CICHLID &&
+		    adev->asic_type <= CHIP_DIMGREY_CAVEFISH)
 			break;
 	}
 

--
2.25.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx