• Home
  • Raw
  • Download

Lines Matching full:cec

3  * DisplayPort CEC-Tunneling-over-AUX support
12 #include <media/cec.h>
17 * have a converter chip that supports CEC-Tunneling-over-AUX (usually the
18 * Parade PS176), but they do not wire up the CEC pin, thus making CEC
23 * any of the other CEC devices. Quite literally the CEC wire is cut
28 * and no incentive to correctly wire up the CEC pin.
31 * finally fix their adapters and test the CEC functionality.
35 * https://hverkuil.home.xs4all.nl/cec-status.txt
40 * Note that the current implementation does not support CEC over an MST hub.
42 * standard to transport CEC interrupts over an MST device. It might be
48 * DOC: dp cec helpers
50 * These functions take care of supporting the CEC-Tunneling-over-AUX
55 * When the EDID is unset because the HPD went low, then the CEC DPCD registers
58 * short period for one reason or another, and that would cause the CEC adapter
61 * This module parameter sets a delay in seconds before the CEC adapter is
63 * the CEC adapter be unregistered.
65 * If it is set to a value >= NEVER_UNREG_DELAY, then the CEC adapter will never
68 * If it is set to 0, then the CEC adapter will be unregistered immediately as
72 * the CEC adapter.
74 * Note that for integrated HDMI branch devices that support CEC the DPCD
76 * by the HPD. In that case the CEC adapter will never be unregistered during
78 * have hardware with an integrated HDMI branch device that supports CEC.
84 "CEC unregister delay in seconds, 0: no delay, >= 1000: never unregister");
185 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_received()
208 struct cec_adapter *adap = aux->cec.adap; in drm_dp_cec_handle_irq()
230 * drm_dp_cec_irq() - handle CEC interrupt, if any
233 * Should be called when handling an IRQ_HPD request. If CEC-tunneling-over-AUX
241 mutex_lock(&aux->cec.lock); in drm_dp_cec_irq()
242 if (!aux->cec.adap) in drm_dp_cec_irq()
253 mutex_unlock(&aux->cec.lock); in drm_dp_cec_irq()
271 * seconds. This unregisters the CEC adapter.
276 cec.unregister_work.work); in drm_dp_cec_unregister_work()
278 mutex_lock(&aux->cec.lock); in drm_dp_cec_unregister_work()
279 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_work()
280 aux->cec.adap = NULL; in drm_dp_cec_unregister_work()
281 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unregister_work()
285 * A new EDID is set. If there is no CEC adapter, then create one. If
286 * there was a CEC adapter, then check if the CEC adapter properties
287 * were unchanged and just update the CEC physical address. Otherwise
288 * unregister the old CEC adapter and create a new one.
306 cancel_delayed_work_sync(&aux->cec.unregister_work); in drm_dp_cec_set_edid()
308 mutex_lock(&aux->cec.lock); in drm_dp_cec_set_edid()
310 /* CEC is not supported, unregister any existing adapter */ in drm_dp_cec_set_edid()
311 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_set_edid()
312 aux->cec.adap = NULL; in drm_dp_cec_set_edid()
321 if (aux->cec.adap) { in drm_dp_cec_set_edid()
322 if (aux->cec.adap->capabilities == cec_caps && in drm_dp_cec_set_edid()
323 aux->cec.adap->available_log_addrs == num_las) { in drm_dp_cec_set_edid()
325 cec_s_phys_addr_from_edid(aux->cec.adap, edid); in drm_dp_cec_set_edid()
332 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_set_edid()
336 aux->cec.adap = cec_allocate_adapter(&drm_dp_cec_adap_ops, in drm_dp_cec_set_edid()
337 aux, aux->cec.name, cec_caps, in drm_dp_cec_set_edid()
339 if (IS_ERR(aux->cec.adap)) { in drm_dp_cec_set_edid()
340 aux->cec.adap = NULL; in drm_dp_cec_set_edid()
343 if (cec_register_adapter(aux->cec.adap, aux->cec.parent)) { in drm_dp_cec_set_edid()
344 cec_delete_adapter(aux->cec.adap); in drm_dp_cec_set_edid()
345 aux->cec.adap = NULL; in drm_dp_cec_set_edid()
348 * Update the phys addr for the new CEC adapter. When called in drm_dp_cec_set_edid()
352 cec_s_phys_addr_from_edid(aux->cec.adap, edid); in drm_dp_cec_set_edid()
355 mutex_unlock(&aux->cec.lock); in drm_dp_cec_set_edid()
364 cancel_delayed_work_sync(&aux->cec.unregister_work); in drm_dp_cec_unset_edid()
366 mutex_lock(&aux->cec.lock); in drm_dp_cec_unset_edid()
367 if (!aux->cec.adap) in drm_dp_cec_unset_edid()
370 cec_phys_addr_invalidate(aux->cec.adap); in drm_dp_cec_unset_edid()
372 * We're done if we want to keep the CEC device in drm_dp_cec_unset_edid()
374 * DPCD still indicates the CEC capability (expected for an integrated in drm_dp_cec_unset_edid()
380 * Unregister the CEC adapter after drm_dp_cec_unregister_delay in drm_dp_cec_unset_edid()
384 schedule_delayed_work(&aux->cec.unregister_work, in drm_dp_cec_unset_edid()
388 mutex_unlock(&aux->cec.lock); in drm_dp_cec_unset_edid()
395 * @name: name of the CEC device
398 * A new connector was registered with associated CEC adapter name and
399 * CEC adapter parent device. After registering the name and parent
401 * CEC and to register a CEC adapter if that is the case.
406 WARN_ON(aux->cec.adap); in drm_dp_cec_register_connector()
407 aux->cec.name = name; in drm_dp_cec_register_connector()
408 aux->cec.parent = parent; in drm_dp_cec_register_connector()
409 INIT_DELAYED_WORK(&aux->cec.unregister_work, in drm_dp_cec_register_connector()
417 * drm_dp_cec_unregister_connector() - unregister the CEC adapter, if any
422 if (!aux->cec.adap) in drm_dp_cec_unregister_connector()
424 cancel_delayed_work_sync(&aux->cec.unregister_work); in drm_dp_cec_unregister_connector()
425 cec_unregister_adapter(aux->cec.adap); in drm_dp_cec_unregister_connector()
426 aux->cec.adap = NULL; in drm_dp_cec_unregister_connector()