This now handles all of the states. Those states are not valid (and
therefore not handled) for Aldebaran. If the intent is to skip handling
of any other state, may be just return 0 for default or skip default
altogether so that it falls through to return 0 for any other state.
In any case,
Reviewed-by: Lijo Lazar <lijo.lazar@xxxxxxx>
On 5/20/2021 3:20 PM, Feifei Xu wrote:
We should just return error in invalid case. For valid but not
implemented one, do nothing and return 0. Otherwise resume will
abort because of the wrong return value.
Signed-off-by: Feifei Xu <Feifei.Xu@xxxxxxx>
---
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 5d04a1dfdfd8..5fcfd8e1a548 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -1781,13 +1781,15 @@ static int aldebaran_set_mp1_state(struct smu_context *smu,
enum pp_mp1_state mp1_state)
{
switch (mp1_state) {
+ case PP_MP1_STATE_NONE:
+ case PP_MP1_STATE_RESET:
+ case PP_MP1_STATE_SHUTDOWN:
+ return 0;
case PP_MP1_STATE_UNLOAD:
return smu_cmn_set_mp1_state(smu, mp1_state);
default:
return -EINVAL;
}
-
- return 0;
}
static const struct pptable_funcs aldebaran_ppt_funcs = {
--
Thanks,
Lijo
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx