Lines Matching +full:rpm +full:- +full:stats
1 /* SPDX-License-Identifier: GPL-2.0 or MIT */
10 #include <linux/io-pgtable.h>
35 * enum panthor_device_pm_state - PM state
52 * struct panthor_irq - IRQ data
71 * enum panthor_device_profiling_mode - Profiling state
90 * struct panthor_device - Panthor device
200 /** @profile_mask: User-set profiling flags for job accounting. */
216 * struct panthor_file - Panthor file
228 /** @stats: cycle and timestamp measures for job execution. */
229 struct panthor_gpu_usage stats; member
236 * panthor_device_schedule_reset() - Schedules a reset operation
240 if (!atomic_cmpxchg(&ptdev->reset.pending, 0, 1) && in panthor_device_schedule_reset()
241 atomic_read(&ptdev->pm.state) == PANTHOR_DEVICE_PM_STATE_ACTIVE) in panthor_device_schedule_reset()
242 queue_work(ptdev->reset.wq, &ptdev->reset.work); in panthor_device_schedule_reset()
246 * panthor_device_reset_is_pending() - Checks if a reset is pending.
252 return atomic_read(&ptdev->reset.pending) != 0; in panthor_device_reset_is_pending()
263 int ret = pm_runtime_resume_and_get(ptdev->base.dev); in panthor_device_resume_and_get()
266 * can done by forcing the RPM state to suspended. If multiple in panthor_device_resume_and_get()
277 if (ret && atomic_cmpxchg(&ptdev->pm.recovery_needed, 1, 0) == 1) in panthor_device_resume_and_get()
278 pm_runtime_set_suspended(ptdev->base.dev); in panthor_device_resume_and_get()
336 * panthor_exception_is_fault() - Checks if an exception is a fault.
350 * PANTHOR_IRQ_HANDLER() - Define interrupt handlers and the interrupt
353 * The boiler-plate to gracefully deal with shared interrupts is
354 * auto-generated. All you have to do is call PANTHOR_IRQ_HANDLER()
363 struct panthor_device *ptdev = pirq->ptdev; \
365 if (atomic_read(&pirq->suspended)) \
377 struct panthor_device *ptdev = pirq->ptdev; \
381 u32 status = gpu_read(ptdev, __reg_prefix ## _INT_RAWSTAT) & pirq->mask; \
392 if (!atomic_read(&pirq->suspended)) \
393 gpu_write(ptdev, __reg_prefix ## _INT_MASK, pirq->mask); \
400 pirq->mask = 0; \
401 gpu_write(pirq->ptdev, __reg_prefix ## _INT_MASK, 0); \
402 synchronize_irq(pirq->irq); \
403 atomic_set(&pirq->suspended, true); \
408 atomic_set(&pirq->suspended, false); \
409 pirq->mask = mask; \
410 gpu_write(pirq->ptdev, __reg_prefix ## _INT_CLEAR, mask); \
411 gpu_write(pirq->ptdev, __reg_prefix ## _INT_MASK, mask); \
418 pirq->ptdev = ptdev; \
419 pirq->irq = irq; \
422 return devm_request_threaded_irq(ptdev->base.dev, irq, \
425 IRQF_SHARED, KBUILD_MODNAME "-" # __name, \