Unverified Commit 4fed2449 authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by Rodrigo Vivi
Browse files

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: 51462211 ("drm/xe/pxp: add PXP PM support")
Signed-off-by: default avatarDaniele 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: default avatarJulia 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: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent e2628e67
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -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;
}