Lines Matching full:domain
29 static void domain_init(struct xe_force_wake_domain *domain, in domain_init() argument
33 domain->id = id; in domain_init()
34 domain->reg_ctl = reg; in domain_init()
35 domain->reg_ack = ack; in domain_init()
36 domain->val = val; in domain_init()
37 domain->mask = mask; in domain_init()
109 static void domain_wake(struct xe_gt *gt, struct xe_force_wake_domain *domain) in domain_wake() argument
111 xe_mmio_write32(gt, domain->reg_ctl, domain->mask | domain->val); in domain_wake()
115 struct xe_force_wake_domain *domain) in domain_wake_wait() argument
117 return xe_mmio_wait32(gt, domain->reg_ack, domain->val, domain->val, in domain_wake_wait()
122 static void domain_sleep(struct xe_gt *gt, struct xe_force_wake_domain *domain) in domain_sleep() argument
124 xe_mmio_write32(gt, domain->reg_ctl, domain->mask); in domain_sleep()
128 struct xe_force_wake_domain *domain) in domain_sleep_wait() argument
130 return xe_mmio_wait32(gt, domain->reg_ack, domain->val, 0, in domain_sleep_wait()
146 struct xe_force_wake_domain *domain; in xe_force_wake_get() local
152 for_each_fw_domain_masked(domain, domains, fw, tmp) { in xe_force_wake_get()
153 if (!domain->ref++) { in xe_force_wake_get()
154 woken |= BIT(domain->id); in xe_force_wake_get()
155 domain_wake(gt, domain); in xe_force_wake_get()
158 for_each_fw_domain_masked(domain, woken, fw, tmp) { in xe_force_wake_get()
159 ret = domain_wake_wait(gt, domain); in xe_force_wake_get()
162 drm_notice(&xe->drm, "Force wake domain (%d) failed to ack wake, ret=%d\n", in xe_force_wake_get()
163 domain->id, ret); in xe_force_wake_get()
176 struct xe_force_wake_domain *domain; in xe_force_wake_put() local
182 for_each_fw_domain_masked(domain, domains, fw, tmp) { in xe_force_wake_put()
183 if (!--domain->ref) { in xe_force_wake_put()
184 sleep |= BIT(domain->id); in xe_force_wake_put()
185 domain_sleep(gt, domain); in xe_force_wake_put()
188 for_each_fw_domain_masked(domain, sleep, fw, tmp) { in xe_force_wake_put()
189 ret = domain_sleep_wait(gt, domain); in xe_force_wake_put()
192 drm_notice(&xe->drm, "Force wake domain (%d) failed to ack sleep, ret=%d\n", in xe_force_wake_put()
193 domain->id, ret); in xe_force_wake_put()