Skip to contentSkip to conversation

drm/amd/pm: remove deprecated I2C_CLASS_SPD support from newly added SMU_14_0_2

PATCH In review Heiner Kallweit 3 participants 5 messages May 9, 2024 – May 29, 2024

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

PATCH 1/1 drm/amd/pm: remove deprecated I2C_CLASS_SPD support from newly added SMU_14_0_2

Support for I2C_CLASS_SPD is currently being removed from the kernel. Only remaining step is to remove the definition of I2C_CLASS_SPD. Setting I2C_CLASS_SPD in a driver is a no-op meanwhile, so remove it here.

---
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +0 -1
index 0d5ad531c..fb6f3bbe2 100644
@@ -1616,7 +1616,6 @@ static int smu_v14_0_2_i2c_control_init(struct smu_context *smu)
 		smu_i2c->port = i;
 		mutex_init(&smu_i2c->mutex);
 		control->owner = THIS_MODULE;
-		control->class = I2C_CLASS_SPD;
 		control->dev.parent = &adev->pdev->dev;
 		control->algo = &smu_v14_0_2_i2c_algo;
 		snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
Signature · 1 line
2.45.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Heiner Kallweit

Support for I2C_CLASS_SPD is currently being removed from the kernel. Only remaining step is to remove the definition of I2C_CLASS_SPD. Setting I2C_CLASS_SPD in a driver is a no-op meanwhile, so remove it here.

and applied.

Thanks!

Quoted 19 lines
---
 drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_2_ppt.c +0 -2
index 0d5ad531c..fb6f3bbe2 100644
@@ -1616,7 +1616,6 @@ static int smu_v14_0_2_i2c_control_init(struct smu_context *smu)
                smu_i2c->port = i;
                mutex_init(&smu_i2c->mutex);
                control->owner = THIS_MODULE;
-               control->class = I2C_CLASS_SPD;
                control->dev.parent = &adev->pdev->dev;
                control->algo = &smu_v14_0_2_i2c_algo;
                snprintf(control->name, sizeof(control->name), "AMDGPU SMU %d", i);
--

2.45.0

#2 lore raw

Hi Alex,

Quoted 11 lines · Alex Deucher
Quoted 7 lines · Heiner Kallweit

Support for I2C_CLASS_SPD is currently being removed from the kernel. Only remaining step is to remove the definition of I2C_CLASS_SPD. Setting I2C_CLASS_SPD in a driver is a no-op meanwhile, so remove it here.

and applied.

TLDR: can you ack this so I can apply it for -rc2?

Reason: I2C_CLASS_SPD was scheduled to be removed for 5.10. For some reason, the newly introduced usage of I2C_CLASS_SPD in this driver went unnoticed in -next. I would really like to remove I2C_CLASS_SPD now before other users appear in the next cycle. In my experience, it is possible to send Linus such patches for early rcX. Like it fixes a "bug" when trying to handle a moving target.

So, would that be possible that I push this upstream so I can ultimately remove I2C_CLASS_SPD without further dependencies? If you prefer to push it through your tree, can you send it to Linus soon?

Thanks and happy hacking,

Wolfram

#3 lore raw
Quoted 25 lines · Wolfram Sang

Hi Alex,

Quoted 11 lines · Alex Deucher
Quoted 7 lines · Heiner Kallweit

Support for I2C_CLASS_SPD is currently being removed from the kernel. Only remaining step is to remove the definition of I2C_CLASS_SPD. Setting I2C_CLASS_SPD in a driver is a no-op meanwhile, so remove it here.

and applied.

TLDR: can you ack this so I can apply it for -rc2?

Reason: I2C_CLASS_SPD was scheduled to be removed for 5.10. For some reason, the newly introduced usage of I2C_CLASS_SPD in this driver went unnoticed in -next. I would really like to remove I2C_CLASS_SPD now before other users appear in the next cycle. In my experience, it is possible to send Linus such patches for early rcX. Like it fixes a "bug" when trying to handle a moving target.

Quoted 3 lines

So, would that be possible that I push this upstream so I can ultimately remove I2C_CLASS_SPD without further dependencies? If you prefer to push it through your tree, can you send it to Linus soon?

Yes, I'll include the patch in my PR for this week.

Thanks,

Alex

#4 lore raw
Quoted 5 lines
Quoted 3 lines

remove I2C_CLASS_SPD without further dependencies? If you prefer to push it through your tree, can you send it to Linus soon?

Yes, I'll include the patch in my PR for this week.

Awesome, thank you!