Lines Matching refs:cec
191 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_received()
214 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_handle_irq()
251 mutex_lock(&aux->cec.lock); in drm_dp_cec_irq()
252 if (!aux->cec.adap) in drm_dp_cec_irq()
263 mutex_unlock(&aux->cec.lock); in drm_dp_cec_irq()
286 cec.unregister_work.work); in drm_dp_cec_unregister_work()
288 mutex_lock(&aux->cec.lock); in drm_dp_cec_unregister_work()
289 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_work()
290 aux->cec.adap = NULL; in drm_dp_cec_unregister_work()
291 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unregister_work()
302 struct drm_connector *connector = aux->cec.connector; in drm_dp_cec_set_edid()
323 cancel_delayed_work_sync(&aux->cec.unregister_work); in drm_dp_cec_set_edid()
325 mutex_lock(&aux->cec.lock); in drm_dp_cec_set_edid()
328 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_set_edid()
329 aux->cec.adap = NULL; in drm_dp_cec_set_edid()
338 if (aux->cec.adap) { in drm_dp_cec_set_edid()
339 if (aux->cec.adap->capabilities == cec_caps && in drm_dp_cec_set_edid()
340 aux->cec.adap->available_log_addrs == num_las) { in drm_dp_cec_set_edid()
342 cec_s_phys_addr_from_edid(aux->cec.adap, edid); in drm_dp_cec_set_edid()
349 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_set_edid()
353 aux->cec.adap = cec_allocate_adapter(&drm_dp_cec_adap_ops, in drm_dp_cec_set_edid()
356 if (IS_ERR(aux->cec.adap)) { in drm_dp_cec_set_edid()
357 aux->cec.adap = NULL; in drm_dp_cec_set_edid()
362 cec_s_conn_info(aux->cec.adap, &conn_info); in drm_dp_cec_set_edid()
364 if (cec_register_adapter(aux->cec.adap, connector->dev->dev)) { in drm_dp_cec_set_edid()
365 cec_delete_adapter(aux->cec.adap); in drm_dp_cec_set_edid()
366 aux->cec.adap = NULL; in drm_dp_cec_set_edid()
373 cec_s_phys_addr_from_edid(aux->cec.adap, edid); in drm_dp_cec_set_edid()
376 mutex_unlock(&aux->cec.lock); in drm_dp_cec_set_edid()
389 cancel_delayed_work_sync(&aux->cec.unregister_work); in drm_dp_cec_unset_edid()
391 mutex_lock(&aux->cec.lock); in drm_dp_cec_unset_edid()
392 if (!aux->cec.adap) in drm_dp_cec_unset_edid()
395 cec_phys_addr_invalidate(aux->cec.adap); in drm_dp_cec_unset_edid()
409 schedule_delayed_work(&aux->cec.unregister_work, in drm_dp_cec_unset_edid()
413 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unset_edid()
430 WARN_ON(aux->cec.adap); in drm_dp_cec_register_connector()
433 aux->cec.connector = connector; in drm_dp_cec_register_connector()
434 INIT_DELAYED_WORK(&aux->cec.unregister_work, in drm_dp_cec_register_connector()
445 if (!aux->cec.adap) in drm_dp_cec_unregister_connector()
447 cancel_delayed_work_sync(&aux->cec.unregister_work); in drm_dp_cec_unregister_connector()
448 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_connector()
449 aux->cec.adap = NULL; in drm_dp_cec_unregister_connector()