Lines Matching refs:lsc

283 			ccdc->lsc.state = LSC_STATE_STOPPED;  in __ccdc_lsc_enable()
287 ccdc->lsc.state = LSC_STATE_RUNNING; in __ccdc_lsc_enable()
289 ccdc->lsc.state = LSC_STATE_STOPPING; in __ccdc_lsc_enable()
347 ccdc->lsc.state = LSC_STATE_STOPPED; in ccdc_lsc_error_handler()
373 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_lsc_free_queue()
376 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_lsc_free_queue()
378 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_lsc_free_queue()
380 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_lsc_free_queue()
386 struct ispccdc_lsc *lsc; in ccdc_lsc_free_table_work() local
388 lsc = container_of(work, struct ispccdc_lsc, table_work); in ccdc_lsc_free_table_work()
389 ccdc = container_of(lsc, struct isp_ccdc_device, lsc); in ccdc_lsc_free_table_work()
391 ccdc_lsc_free_queue(ccdc, &lsc->free_queue); in ccdc_lsc_free_table_work()
452 if (copy_from_user(req->table.addr, config->lsc, in ccdc_lsc_config()
462 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_lsc_config()
463 if (ccdc->lsc.request) { in ccdc_lsc_config()
464 list_add_tail(&ccdc->lsc.request->list, &ccdc->lsc.free_queue); in ccdc_lsc_config()
465 schedule_work(&ccdc->lsc.table_work); in ccdc_lsc_config()
467 ccdc->lsc.request = req; in ccdc_lsc_config()
468 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_lsc_config()
484 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_lsc_is_configured()
485 ret = ccdc->lsc.active != NULL; in ccdc_lsc_is_configured()
486 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_lsc_is_configured()
493 struct ispccdc_lsc *lsc = &ccdc->lsc; in ccdc_lsc_enable() local
495 if (lsc->state != LSC_STATE_STOPPED) in ccdc_lsc_enable()
498 if (lsc->active) { in ccdc_lsc_enable()
499 list_add_tail(&lsc->active->list, &lsc->free_queue); in ccdc_lsc_enable()
500 lsc->active = NULL; in ccdc_lsc_enable()
503 if (__ccdc_lsc_configure(ccdc, lsc->request) < 0) { in ccdc_lsc_enable()
506 list_add_tail(&lsc->request->list, &lsc->free_queue); in ccdc_lsc_enable()
507 lsc->request = NULL; in ccdc_lsc_enable()
511 lsc->active = lsc->request; in ccdc_lsc_enable()
512 lsc->request = NULL; in ccdc_lsc_enable()
516 if (!list_empty(&lsc->free_queue)) in ccdc_lsc_enable()
517 schedule_work(&lsc->table_work); in ccdc_lsc_enable()
1286 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_configure()
1287 if (ccdc->lsc.request == NULL) in ccdc_configure()
1290 WARN_ON(ccdc->lsc.active); in ccdc_configure()
1295 if (ccdc->lsc.active == NULL && in ccdc_configure()
1296 __ccdc_lsc_configure(ccdc, ccdc->lsc.request) == 0) { in ccdc_configure()
1297 ccdc->lsc.active = ccdc->lsc.request; in ccdc_configure()
1299 list_add_tail(&ccdc->lsc.request->list, &ccdc->lsc.free_queue); in ccdc_configure()
1300 schedule_work(&ccdc->lsc.table_work); in ccdc_configure()
1303 ccdc->lsc.request = NULL; in ccdc_configure()
1306 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_configure()
1348 ccdc_lsc_free_request(ccdc, ccdc->lsc.request); in ccdc_disable()
1349 ccdc->lsc.request = ccdc->lsc.active; in ccdc_disable()
1350 ccdc->lsc.active = NULL; in ccdc_disable()
1351 cancel_work_sync(&ccdc->lsc.table_work); in ccdc_disable()
1352 ccdc_lsc_free_queue(ccdc, &ccdc->lsc.free_queue); in ccdc_disable()
1430 if (ccdc->lsc.state != LSC_STATE_STOPPED) in ccdc_handle_stopping()
1438 if (ccdc->lsc.state == LSC_STATE_STOPPED) in ccdc_handle_stopping()
1501 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_lsc_isr()
1503 if (ccdc->lsc.state == LSC_STATE_STOPPING) in ccdc_lsc_isr()
1504 ccdc->lsc.state = LSC_STATE_STOPPED; in ccdc_lsc_isr()
1509 if (ccdc->lsc.state != LSC_STATE_RECONFIG) in ccdc_lsc_isr()
1513 ccdc->lsc.state = LSC_STATE_STOPPED; in ccdc_lsc_isr()
1525 if (ccdc->lsc.request == NULL) in ccdc_lsc_isr()
1531 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_lsc_isr()
1665 if (ccdc->lsc.state != LSC_STATE_STOPPED) in ccdc_vd0_isr()
1710 spin_lock_irqsave(&ccdc->lsc.req_lock, flags); in ccdc_vd1_isr()
1729 if (ccdc->lsc.state != LSC_STATE_STOPPED) in ccdc_vd1_isr()
1742 if (ccdc->lsc.request == NULL) in ccdc_vd1_isr()
1749 if (ccdc->lsc.state == LSC_STATE_RUNNING) { in ccdc_vd1_isr()
1751 ccdc->lsc.state = LSC_STATE_RECONFIG; in ccdc_vd1_isr()
1756 if (ccdc->lsc.state == LSC_STATE_STOPPED) in ccdc_vd1_isr()
1760 spin_unlock_irqrestore(&ccdc->lsc.req_lock, flags); in ccdc_vd1_isr()
2717 INIT_WORK(&ccdc->lsc.table_work, ccdc_lsc_free_table_work); in omap3isp_ccdc_init()
2718 ccdc->lsc.state = LSC_STATE_STOPPED; in omap3isp_ccdc_init()
2719 INIT_LIST_HEAD(&ccdc->lsc.free_queue); in omap3isp_ccdc_init()
2720 spin_lock_init(&ccdc->lsc.req_lock); in omap3isp_ccdc_init()
2751 ccdc_lsc_free_request(ccdc, ccdc->lsc.request); in omap3isp_ccdc_cleanup()
2752 cancel_work_sync(&ccdc->lsc.table_work); in omap3isp_ccdc_cleanup()
2753 ccdc_lsc_free_queue(ccdc, &ccdc->lsc.free_queue); in omap3isp_ccdc_cleanup()