Lines Matching full:service
51 dev_dbg(user_service->service->state->dev, in close_delivered()
52 "arm: (handle=%x)\n", user_service->service->handle); in close_delivered()
55 /* Allow the underlying service to be culled */ in close_delivered()
56 vchiq_service_put(user_service->service); in close_delivered()
144 struct vchiq_service *service; in vchiq_ioc_create_service() local
170 service = vchiq_add_service_internal(instance->state, ¶ms, in vchiq_ioc_create_service()
173 if (!service) { in vchiq_ioc_create_service()
178 user_service->service = service; in vchiq_ioc_create_service()
192 status = vchiq_open_service_internal(service, instance->pid); in vchiq_ioc_create_service()
194 vchiq_remove_service(instance, service->handle); in vchiq_ioc_create_service()
199 args->handle = service->handle; in vchiq_ioc_create_service()
208 struct vchiq_service *service; in vchiq_ioc_dequeue_message() local
214 service = find_service_for_instance(instance, args->handle); in vchiq_ioc_dequeue_message()
215 if (!service) in vchiq_ioc_dequeue_message()
218 user_service = (struct user_service *)service->base.userdata; in vchiq_ioc_dequeue_message()
224 spin_lock(&service->state->msg_queue_spinlock); in vchiq_ioc_dequeue_message()
227 spin_unlock(&service->state->msg_queue_spinlock); in vchiq_ioc_dequeue_message()
235 spin_unlock(&service->state->msg_queue_spinlock); in vchiq_ioc_dequeue_message()
238 dev_dbg(service->state->dev, "arm: DEQUEUE_MESSAGE interrupted\n"); in vchiq_ioc_dequeue_message()
242 spin_lock(&service->state->msg_queue_spinlock); in vchiq_ioc_dequeue_message()
251 spin_unlock(&service->state->msg_queue_spinlock); in vchiq_ioc_dequeue_message()
259 spin_unlock(&service->state->msg_queue_spinlock); in vchiq_ioc_dequeue_message()
268 vchiq_release_message(instance, service->handle, header); in vchiq_ioc_dequeue_message()
273 dev_err(service->state->dev, in vchiq_ioc_dequeue_message()
281 vchiq_service_put(service); in vchiq_ioc_dequeue_message()
290 struct vchiq_service *service; in vchiq_irq_queue_bulk_tx_rx() local
296 service = find_service_for_instance(instance, args->handle); in vchiq_irq_queue_bulk_tx_rx()
297 if (!service) in vchiq_irq_queue_bulk_tx_rx()
327 dev_err(service->state->dev, in vchiq_irq_queue_bulk_tx_rx()
332 dev_dbg(service->state->dev, "arm: found bulk_waiter %p for pid %d\n", in vchiq_irq_queue_bulk_tx_rx()
357 spin_lock(&service->state->bulk_waiter_spinlock); in vchiq_irq_queue_bulk_tx_rx()
359 spin_unlock(&service->state->bulk_waiter_spinlock); in vchiq_irq_queue_bulk_tx_rx()
370 dev_dbg(service->state->dev, "arm: saved bulk_waiter %p for pid %d\n", in vchiq_irq_queue_bulk_tx_rx()
376 vchiq_service_put(service); in vchiq_irq_queue_bulk_tx_rx()
483 struct vchiq_service *service; in vchiq_ioc_await_completion() local
498 service = completion->service_userdata; in vchiq_ioc_await_completion()
499 user_service = service->base.userdata; in vchiq_ioc_await_completion()
513 /* This must be a VCHIQ-style service */ in vchiq_ioc_await_completion()
515 dev_err(service->state->dev, in vchiq_ioc_await_completion()
543 vchiq_release_message(instance, service->handle, header); in vchiq_ioc_await_completion()
551 vchiq_service_put(service); in vchiq_ioc_await_completion()
588 struct vchiq_service *service = NULL; in vchiq_ioctl() local
603 while ((service = next_service_by_instance(instance->state, in vchiq_ioctl()
605 status = vchiq_remove_service(instance, service->handle); in vchiq_ioctl()
606 vchiq_service_put(service); in vchiq_ioctl()
610 service = NULL; in vchiq_ioctl()
668 service = find_service_for_instance(instance, handle); in vchiq_ioctl()
669 if (!service) { in vchiq_ioctl()
674 user_service = service->base.userdata; in vchiq_ioctl()
682 vchiq_close_service(instance, service->handle) : in vchiq_ioctl()
683 vchiq_remove_service(instance, service->handle); in vchiq_ioctl()
689 * close_pending is true once the underlying service in vchiq_ioctl()
703 service = find_service_for_instance(instance, handle); in vchiq_ioctl()
704 if (service) { in vchiq_ioctl()
706 vchiq_use_service_internal(service) : in vchiq_ioctl()
707 vchiq_release_service_internal(service); in vchiq_ioctl()
710 "suspend: cmd %s returned error %ld for service %p4cc:%03d\n", in vchiq_ioctl()
714 ret, &service->base.fourcc, in vchiq_ioctl()
715 service->client_id); in vchiq_ioctl()
731 service = find_service_for_instance(instance, args.handle); in vchiq_ioctl()
733 if (service && (args.count <= MAX_ELEMENTS)) { in vchiq_ioctl()
829 service = find_service_for_instance(instance, args.handle); in vchiq_ioctl()
830 if (!service) { in vchiq_ioctl()
851 service = find_closed_service_for_instance(instance, handle); in vchiq_ioctl()
852 if (service) { in vchiq_ioctl()
854 (struct user_service *)service->base.userdata; in vchiq_ioctl()
866 if (service) in vchiq_ioctl()
867 vchiq_service_put(service); in vchiq_ioctl()
969 struct vchiq_service *service; in vchiq_compat_ioctl_queue_message() local
985 service = find_service_for_instance(instance, args.handle); in vchiq_compat_ioctl_queue_message()
986 if (!service) in vchiq_compat_ioctl_queue_message()
996 vchiq_service_put(service); in vchiq_compat_ioctl_queue_message()
1010 vchiq_service_put(service); in vchiq_compat_ioctl_queue_message()
1212 struct vchiq_service *service; in vchiq_release() local
1239 while ((service = next_service_by_instance(state, instance, &i))) { in vchiq_release()
1240 struct user_service *user_service = service->base.userdata; in vchiq_release()
1245 vchiq_terminate_service_internal(service); in vchiq_release()
1246 vchiq_service_put(service); in vchiq_release()
1251 while ((service = next_service_by_instance(state, instance, &i))) { in vchiq_release()
1252 struct user_service *user_service = service->base.userdata; in vchiq_release()
1254 wait_for_completion(&service->remove_event); in vchiq_release()
1256 if (WARN_ON(service->srvstate != VCHIQ_SRVSTATE_FREE)) { in vchiq_release()
1257 vchiq_service_put(service); in vchiq_release()
1261 spin_lock(&service->state->msg_queue_spinlock); in vchiq_release()
1269 spin_unlock(&service->state->msg_queue_spinlock); in vchiq_release()
1272 vchiq_release_message(instance, service->handle, header); in vchiq_release()
1273 spin_lock(&service->state->msg_queue_spinlock); in vchiq_release()
1276 spin_unlock(&service->state->msg_queue_spinlock); in vchiq_release()
1278 vchiq_service_put(service); in vchiq_release()
1284 struct vchiq_service *service; in vchiq_release() local
1288 service = completion->service_userdata; in vchiq_release()
1291 service->base.userdata; in vchiq_release()
1296 vchiq_service_put(service); in vchiq_release()
1301 /* Release the PEER service count. */ in vchiq_release()