Skip to contentSkip to conversation

drm/amdgpu: return 0 by default in amdgpu_pm_load_smu_firmware

PATCH In review Alex Deucher 4 participants 4 messages Jun 11, 2019 – Jun 13, 2019 2 messages not in the archive

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

PATCH 1/1 drm/amdgpu: return 0 by default in amdgpu_pm_load_smu_firmware

Fixes SI cards running on amdgpu.

Fixes 1929059893022 ("drm/amd/amdgpu: add RLC firmware to support raven1 refresh")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +2 -2
index d8828a37e43a..653b2491fec8 100644
@@ -2700,7 +2700,7 @@ void amdgpu_pm_print_power_states(struct amdgpu_device *adev)
 
 int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_version)
 {
-	int r = -EINVAL;
+	int r;
 
 	if (amdgpu_sriov_vf(adev))
 		return 0;
@@ -2713,7 +2713,7 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio
 		}
 		*smu_version = adev->pm.fw_version;
 	}
-	return r;
+	return 0;
 }
 
 int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
Signature · 6 lines
2.20.1

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

A message that is not in the archive (sent off-list or not yet received): 20190611145103.621-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org

Reviewed-by Evan Quan
#2 lore raw
Quoted 47 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Tuesday, June 11, 2019 10:51 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: return 0 by default in amdgpu_pm_load_smu_firmware

Fixes SI cards running on amdgpu.

Fixes 1929059893022 ("drm/amd/amdgpu: add RLC firmware to support

raven1 refresh")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -1
index d8828a37e43a..653b2491fec8 100644
@@ -2700,7 +2700,7 @@ void amdgpu_pm_print_power_states(struct
 amdgpu_device *adev)
 
 int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev,
 uint32_t *smu_version)  {
-	int r = -EINVAL;
+	int r;
 
 	if (amdgpu_sriov_vf(adev))
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -0
 		return 0;
@@ -2713,7 +2713,7 @@ int amdgpu_pm_load_smu_firmware(struct

amdgpu_device *adev, uint32_t *smu_versio

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -2
 		}
 		*smu_version = adev->pm.fw_version;
 	}
-	return r;
+	return 0;
 }
 
 int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)
--

2.20.1

Quoted 4 lines

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

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

#3 lore raw
In reply to a message not in the archive

Dear Alex,

Quoted 1 line · Alex Deucher

Fixes SI cards running on amdgpu.

Shouldn’t the caller be updated to check for the error code? Wouldn’t that be more explicit?

        else if (!strcmp(chip_name, "raven") && (amdgpu_pm_load_smu_firmware(adev, &smu_version) == 0)
Quoted 21 lines
Fixes 1929059893022 ("drm/amd/amdgpu: add RLC firmware to support raven1 refresh")
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -1
index d8828a37e43a..653b2491fec8 100644
@@ -2700,7 +2700,7 @@ void amdgpu_pm_print_power_states(struct amdgpu_device *adev)
 
 int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_version)
 {
-	int r = -EINVAL;
+	int r;
 
 	if (amdgpu_sriov_vf(adev))
 		return 0;

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio · line 2719

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -1
@@ -2713,7 +2713,7 @@ int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio
 		}
 		*smu_version = adev->pm.fw_version;
 	}
-	return r;
+	return 0;
 }
 
 int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)

Kind regards,

Paul

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

A message that is not in the archive (sent off-list or not yet received): af8e0143-5d3c-b683-d877-60d7f6e2a6b9-KUpvgZVWgV9o1qOY/[email protected]

#5 lore raw
Quoted 13 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Paul Menzel
Sent: Thursday, June 13, 2019 6:32 PM
To: Alex Deucher <[email protected]>
Cc: Deucher, Alexander <[email protected]>; Sibren Vasse <[email protected]>; [email protected]
Subject: Re: [PATCH] drm/amdgpu: return 0 by default in amdgpu_pm_load_smu_firmware

Dear Alex,

Quoted 9 lines
Quoted 1 line · Alex Deucher

Fixes SI cards running on amdgpu.

Shouldn’t the caller be updated to check for the error code? Wouldn’t that be more explicit?

        else if (!strcmp(chip_name, "raven") &&

(amdgpu_pm_load_smu_firmware(adev, &smu_version) == 0)

Yes. Alex, this function will be called to get the SMC FW version from SBIOS. And make sure whether current ASIC is RV1 refresh kicker.

Thanks,
Ray

Quoted 33 lines
Quoted 14 lines
Fixes 1929059893022 ("drm/amd/amdgpu: add RLC firmware to support

raven1 refresh")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -0
index d8828a37e43a..653b2491fec8 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c void amdgpu_pm_print_power_states(struct · line 2702

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -0
@@ -2700,7 +2700,7 @@ void amdgpu_pm_print_power_states(struct
 amdgpu_device *adev)
 
 int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev,

uint32_t

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c int amdgpu_pm_load_smu_firmware(struct

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -1
 *smu_version)  {
-	int r = -EINVAL;
+	int r;
 
 	if (amdgpu_sriov_vf(adev))
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -0
 		return 0;
@@ -2713,7 +2713,7 @@ int amdgpu_pm_load_smu_firmware(struct

amdgpu_device *adev, uint32_t *smu_versio

Quoted 7 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +1 -1
 		}
 		*smu_version = adev->pm.fw_version;
 	}
-	return r;
+	return 0;
 }
 
Quoted 6 lines

drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c int amdgpu_pm_load_smu_firmware(struct amdgpu_device *adev, uint32_t *smu_versio · line 2719

Quoted 1 line
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +0 -0
 int amdgpu_pm_sysfs_init(struct amdgpu_device *adev)

Kind regards,

Paul

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