mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
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: 51462211f4 ("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
This commit is contained in:
parent
5d9e708d2a
commit
f1b5a77fc9
|
|
@ -871,11 +871,6 @@ int xe_pxp_pm_suspend(struct xe_pxp *pxp)
|
|||
pxp->key_instance++;
|
||||
needs_queue_inval = true;
|
||||
break;
|
||||
default:
|
||||
drm_err(&pxp->xe->drm, "unexpected state during PXP suspend: %u",
|
||||
pxp->status);
|
||||
ret = -EIO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -900,7 +895,6 @@ int xe_pxp_pm_suspend(struct xe_pxp *pxp)
|
|||
|
||||
pxp->last_suspend_key_instance = pxp->key_instance;
|
||||
|
||||
out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user