/** * xe_force_wake_get() : Increase the domain refcount * @fw: struct xe_force_wake * @domains: forcewake domains to get refcount on * * This function wakes up @domains if they are asleep and takes references. * If requested domain is XE_FORCEWAKE_ALL then only applicable/initialized * domains will be considered for refcount and it is a caller responsibility * to check returned ref if it includes any specific domain by using * xe_force_wake_ref_has_domain() function. Caller must call * xe_force_wake_put() function to decrease incremented refcounts. * * Return: opaque reference to woken domains or zero if none of requested * domains were awake.
*/ unsignedint __must_check xe_force_wake_get(struct xe_force_wake *fw, enum xe_force_wake_domains domains)
{ struct xe_gt *gt = fw->gt; struct xe_force_wake_domain *domain; unsignedint ref_incr = 0, awake_rqst = 0, awake_failed = 0; unsignedint tmp, ref_rqst; unsignedlong flags;
/** * xe_force_wake_put - Decrement the refcount and put domain to sleep if refcount becomes 0 * @fw: Pointer to the force wake structure * @fw_ref: return of xe_force_wake_get() * * This function reduces the reference counts for domains in fw_ref. If * refcount for any of the specified domain reaches 0, it puts the domain to sleep * and waits for acknowledgment for domain to sleep within 50 milisec timeout. * Warns in case of timeout of ack from domain.
*/ void xe_force_wake_put(struct xe_force_wake *fw, unsignedint fw_ref)
{ struct xe_gt *gt = fw->gt; struct xe_force_wake_domain *domain; unsignedint tmp, sleep = 0; unsignedlong flags; int ack_fail = 0;
/* * Avoid unnecessary lock and unlock when the function is called * in error path of individual domains.
*/ if (!fw_ref) return;
if (xe_force_wake_ref_has_domain(fw_ref, XE_FORCEWAKE_ALL))
fw_ref = fw->initialized_domains;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.