Lines Matching refs:gpu

165 	spin_lock(&ptdev->gpu->reqs_lock);  in panthor_gpu_irq_handler()
166 if (status & ptdev->gpu->pending_reqs) { in panthor_gpu_irq_handler()
167 ptdev->gpu->pending_reqs &= ~status; in panthor_gpu_irq_handler()
168 wake_up_all(&ptdev->gpu->reqs_acked); in panthor_gpu_irq_handler()
170 spin_unlock(&ptdev->gpu->reqs_lock); in panthor_gpu_irq_handler()
172 PANTHOR_IRQ_HANDLER(gpu, GPU, panthor_gpu_irq_handler);
184 panthor_gpu_irq_suspend(&ptdev->gpu->irq); in panthor_gpu_unplug()
187 spin_lock_irqsave(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_unplug()
188 ptdev->gpu->pending_reqs = 0; in panthor_gpu_unplug()
189 wake_up_all(&ptdev->gpu->reqs_acked); in panthor_gpu_unplug()
190 spin_unlock_irqrestore(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_unplug()
201 struct panthor_gpu *gpu; in panthor_gpu_init() local
205 gpu = drmm_kzalloc(&ptdev->base, sizeof(*gpu), GFP_KERNEL); in panthor_gpu_init()
206 if (!gpu) in panthor_gpu_init()
209 spin_lock_init(&gpu->reqs_lock); in panthor_gpu_init()
210 init_waitqueue_head(&gpu->reqs_acked); in panthor_gpu_init()
211 ptdev->gpu = gpu; in panthor_gpu_init()
224 ret = panthor_request_gpu_irq(ptdev, &ptdev->gpu->irq, irq, GPU_INTERRUPTS_MASK); in panthor_gpu_init()
396 spin_lock_irqsave(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_flush_caches()
398 ptdev->gpu->pending_reqs & GPU_IRQ_CLEAN_CACHES_COMPLETED)) { in panthor_gpu_flush_caches()
399 ptdev->gpu->pending_reqs |= GPU_IRQ_CLEAN_CACHES_COMPLETED; in panthor_gpu_flush_caches()
402 spin_unlock_irqrestore(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_flush_caches()
404 if (!wait_event_timeout(ptdev->gpu->reqs_acked, in panthor_gpu_flush_caches()
405 !(ptdev->gpu->pending_reqs & GPU_IRQ_CLEAN_CACHES_COMPLETED), in panthor_gpu_flush_caches()
407 spin_lock_irqsave(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_flush_caches()
408 if ((ptdev->gpu->pending_reqs & GPU_IRQ_CLEAN_CACHES_COMPLETED) != 0 && in panthor_gpu_flush_caches()
412 ptdev->gpu->pending_reqs &= ~GPU_IRQ_CLEAN_CACHES_COMPLETED; in panthor_gpu_flush_caches()
413 spin_unlock_irqrestore(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_flush_caches()
435 spin_lock_irqsave(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_soft_reset()
437 ptdev->gpu->pending_reqs & GPU_IRQ_RESET_COMPLETED)) { in panthor_gpu_soft_reset()
438 ptdev->gpu->pending_reqs |= GPU_IRQ_RESET_COMPLETED; in panthor_gpu_soft_reset()
442 spin_unlock_irqrestore(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_soft_reset()
444 if (!wait_event_timeout(ptdev->gpu->reqs_acked, in panthor_gpu_soft_reset()
445 !(ptdev->gpu->pending_reqs & GPU_IRQ_RESET_COMPLETED), in panthor_gpu_soft_reset()
447 spin_lock_irqsave(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_soft_reset()
448 if ((ptdev->gpu->pending_reqs & GPU_IRQ_RESET_COMPLETED) != 0 && in panthor_gpu_soft_reset()
452 ptdev->gpu->pending_reqs &= ~GPU_IRQ_RESET_COMPLETED; in panthor_gpu_soft_reset()
453 spin_unlock_irqrestore(&ptdev->gpu->reqs_lock, flags); in panthor_gpu_soft_reset()
479 panthor_gpu_irq_suspend(&ptdev->gpu->irq); in panthor_gpu_suspend()
491 panthor_gpu_irq_resume(&ptdev->gpu->irq, GPU_INTERRUPTS_MASK); in panthor_gpu_resume()