Lines Matching refs:host1x

268 static int host1x_add_client(struct host1x *host1x,  in host1x_add_client()  argument
274 mutex_lock(&host1x->devices_lock); in host1x_add_client()
276 list_for_each_entry(device, &host1x->devices, list) { in host1x_add_client()
280 mutex_unlock(&host1x->devices_lock); in host1x_add_client()
286 mutex_unlock(&host1x->devices_lock); in host1x_add_client()
290 static int host1x_del_client(struct host1x *host1x, in host1x_del_client() argument
296 mutex_lock(&host1x->devices_lock); in host1x_del_client()
298 list_for_each_entry_safe(device, dt, &host1x->devices, list) { in host1x_del_client()
302 mutex_unlock(&host1x->devices_lock); in host1x_del_client()
308 mutex_unlock(&host1x->devices_lock); in host1x_del_client()
394 static int host1x_device_add(struct host1x *host1x, in host1x_device_add() argument
416 device->dev.coherent_dma_mask = host1x->dev->coherent_dma_mask; in host1x_device_add()
420 device->dev.of_node = host1x->dev->of_node; in host1x_device_add()
422 device->dev.parent = host1x->dev; in host1x_device_add()
424 of_dma_configure(&device->dev, host1x->dev->of_node, true); in host1x_device_add()
432 list_add_tail(&device->list, &host1x->devices); in host1x_device_add()
456 static void host1x_device_del(struct host1x *host1x, in host1x_device_del() argument
467 static void host1x_attach_driver(struct host1x *host1x, in host1x_attach_driver() argument
473 mutex_lock(&host1x->devices_lock); in host1x_attach_driver()
475 list_for_each_entry(device, &host1x->devices, list) { in host1x_attach_driver()
477 mutex_unlock(&host1x->devices_lock); in host1x_attach_driver()
482 err = host1x_device_add(host1x, driver); in host1x_attach_driver()
484 dev_err(host1x->dev, "failed to allocate device: %d\n", err); in host1x_attach_driver()
486 mutex_unlock(&host1x->devices_lock); in host1x_attach_driver()
489 static void host1x_detach_driver(struct host1x *host1x, in host1x_detach_driver() argument
494 mutex_lock(&host1x->devices_lock); in host1x_detach_driver()
496 list_for_each_entry_safe(device, tmp, &host1x->devices, list) in host1x_detach_driver()
498 host1x_device_del(host1x, device); in host1x_detach_driver()
500 mutex_unlock(&host1x->devices_lock); in host1x_detach_driver()
511 int host1x_register(struct host1x *host1x) in host1x_register() argument
516 list_add_tail(&host1x->list, &devices); in host1x_register()
522 host1x_attach_driver(host1x, driver); in host1x_register()
536 int host1x_unregister(struct host1x *host1x) in host1x_unregister() argument
543 host1x_detach_driver(host1x, driver); in host1x_unregister()
548 list_del_init(&host1x->list); in host1x_unregister()
598 struct host1x *host1x; in host1x_driver_register_full() local
608 list_for_each_entry(host1x, &devices, list) in host1x_driver_register_full()
609 host1x_attach_driver(host1x, driver); in host1x_driver_register_full()
653 struct host1x *host1x; in host1x_client_register() local
658 list_for_each_entry(host1x, &devices, list) { in host1x_client_register()
659 err = host1x_add_client(host1x, client); in host1x_client_register()
686 struct host1x *host1x; in host1x_client_unregister() local
691 list_for_each_entry(host1x, &devices, list) { in host1x_client_unregister()
692 err = host1x_del_client(host1x, client); in host1x_client_unregister()