Skip to content

Commit 4fed244

Browse files
dceraolorodrigovivi
authored andcommitted
drm/xe/pxp: Remove incorrect handling of impossible state during suspend
The default case of the PXP suspend switch is incorrectly exiting without releasing the lock. However, this case is impossible to hit because we're switching on an enum and all the valid enum values have their own cases. Therefore, we can just get rid of the default case and rely on the compiler to warn us if a new enum value is added and we forget to add it to the switch. Fixes: 5146221 ("drm/xe/pxp: add PXP PM support") Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Cc: Alan Previn Teres Alexis <alan.previn.teres.alexis@intel.com> Cc: Julia Filipchuk <julia.filipchuk@intel.com> Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com> Link: https://patch.msgid.link/20260324153718.3155504-8-daniele.ceraolospurio@intel.com (cherry picked from commit f1b5a77fc9b6a90cd9a5e3db9d4c73ae1edfcfac) Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
1 parent e2628e6 commit 4fed244

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

drivers/gpu/drm/xe/xe_pxp.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -871,11 +871,6 @@ int xe_pxp_pm_suspend(struct xe_pxp *pxp)
871871
pxp->key_instance++;
872872
needs_queue_inval = true;
873873
break;
874-
default:
875-
drm_err(&pxp->xe->drm, "unexpected state during PXP suspend: %u",
876-
pxp->status);
877-
ret = -EIO;
878-
goto out;
879874
}
880875

881876
/*
@@ -900,7 +895,6 @@ int xe_pxp_pm_suspend(struct xe_pxp *pxp)
900895

901896
pxp->last_suspend_key_instance = pxp->key_instance;
902897

903-
out:
904898
return ret;
905899
}
906900

0 commit comments

Comments
 (0)