Re: [PATCHv2 0/9] omapdrm: hdmi4: add CEC support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/18/17 11:02, Tomi Valkeinen wrote:
> Hi Hans,
> 
> 
> Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
> 
> On 11/08/17 13:57, Tomi Valkeinen wrote:
> 
>> I'm doing some testing with this series on my panda. One issue I see is
>> that when I unload the display modules, I get:
>>
>> [   75.180206] platform 58006000.encoder: enabled after unload, idling
>> [   75.187896] platform 58001000.dispc: enabled after unload, idling
>> [   75.198242] platform 58000000.dss: enabled after unload, idling
> 
> This one is caused by hdmi_cec_adap_enable() never getting called with
> enable=false when unloading the modules. Should that be called
> explicitly in hdmi4_cec_uninit, or is the CEC framework supposed to call it?

Nicely found!

The cec_delete_adapter() function calls __cec_s_phys_addr(CEC_PHYS_ADDR_INVALID)
which would normally call adap_enable(false), except when the device node was
already unregistered, in which case it just returns immediately.

The patch below should fix this. Let me know if it works, and I'll post a proper
patch and get that in for 4.14 (and possible backported as well, I'll have to
look at that).

Regards,

	Hans

Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
---
diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index bf45977b2823..61dffe165565 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -1390,7 +1390,9 @@ static void cec_claim_log_addrs(struct cec_adapter *adap, bool block)
  */
 void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block)
 {
-	if (phys_addr == adap->phys_addr || adap->devnode.unregistered)
+	if (phys_addr == adap->phys_addr)
+		return;
+	if (phys_addr != CEC_PHYS_ADDR_INVALID && adap->devnode.unregistered)
 		return;

 	dprintk(1, "new physical address %x.%x.%x.%x\n",
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux