If an EDID is present, then call cec_s_phys_addr. If not, then call cec_phys_addr_invalidate. This helps the CEC framework differentiate between CEC_PHYS_ADDR_INVALID due to no EDID, or due to an EDID without a Physical Address.
Signed-off-by: Hans Verkuil <[email protected]> --- .../cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c b/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c index 1f8ed7ff31e5..0a0724fd89c0 100644 --- a/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c +++ b/drivers/media/cec/usb/extron-da-hd-4k-plus/extron-da-hd-4k-plus.c @@ -643,8 +643,12 @@ static void extron_irq_work_handler(struct work_struct *work) extron_read_edid(port); } } - if (update_pa) - cec_s_phys_addr(port->adap, pa, false); + if (update_pa) { + if (has_edid) + cec_s_phys_addr(port->adap, pa, false); + else + cec_phys_addr_invalidate(port->adap); + } } static void extron_process_received(struct extron_port *port, const char *data) -- 2.53.0
