lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW3PR12MB445966A61F43C3676E115205C1319@MW3PR12MB4459.namprd12.prod.outlook.com>
Date:   Mon, 14 Jun 2021 17:05:10 +0000
From:   Nelson Costa <Nelson.Costa@...opsys.com>
To:     Hans Verkuil <hverkuil-cisco@...all.nl>,
        "linux-media@...r.kernel.org" <linux-media@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
CC:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Kishon Vijay Abraham I <kishon@...com>,
        Vinod Koul <vkoul@...nel.org>,
        Rob Herring <robh+dt@...nel.org>,
        Jose Abreu <Jose.Abreu@...opsys.com>
Subject: RE: [PATCH 9/9] media: dwc: dw-hdmi-rx: Add support for CEC

Hi Hans,

Thanks for your comments!

From: Hans Verkuil <hverkuil-cisco@...all.nl>
Date: qua, jun 02, 2021 at 19:27:46

> On 02/06/2021 20:20, Nelson Costa wrote:
> > Hi Hans,
> > 
> > Thanks for your comments and feedback!
> > 
> > From: Hans Verkuil <hverkuil-cisco@...all.nl>
> > Date: qua, jun 02, 2021 at 13:45:45
> > 
> >> On 02/06/2021 13:24, Nelson Costa wrote:
> >>> @@ -3194,10 +3428,29 @@ static int dw_hdmi_rx_probe(struct platform_device *pdev)
> >>>  	if (ret)
> >>>  		goto err_phy_exit;
> >>>  
> >>> +	/* CEC */
> >>> +#if IS_ENABLED(CONFIG_VIDEO_DWC_HDMI_RX_CEC)
> >>> +	dw_dev->cec_adap = cec_allocate_adapter(&dw_hdmi_cec_adap_ops,
> >>> +						dw_dev, dev_name(dev),
> >>> +						(CEC_CAP_DEFAULTS |
> >>> +						 CEC_CAP_NEEDS_HPD |
> >>
> >> This cap makes no sense for a receiver.
> >>
> > 
> > This cap was added in order to overcome a scenario that we have when 
> > there
> > was an hot plug. The driver performs a main reset that cause the loss of
> > cec controller configuration. And in that case in order to reconfigure 
> 
> What do you mean with 'there was an hot plug'? Are you talking about the HPD
> signal? Or when a new source/cable is connected? Can you point to the code
> where that happens in the driver?
> 

I mean, whenever a new source/cable is connected.

When it happens we receive the 5v interrupt and the state machine is 
started.
At the beginning of the state machine the function 
"dw_hdmi_reset(dw_dev)" is called to perform the controller reset.
Inside that function you can see the following note added explaining the 
cec physical address reconfiguration needed after the reset:

	/* After a main reset try to re-enable the cec adapter in order to
	 * reconfigure the required cec registers. For this the physical address
	 * is invalidated and reconfigured, and with CEC_CAP_NEEDS_HPD allowing
	 * to re-enable the adapter.
	 */

Thanks a lot!

BR,

Nelson Costa

> Regards,
> 
> 	Hans
> 
> > the
> > cec this cap was added. Because whenever there is a reset the physical
> > address is reconfigured (invalidated and set) and with this cap the cec
> > configuration callback function (adap_enable) is called again allowing to
> > reconfigure the cec.
> > 
> > Does it make sense?
> > 
> > If not, what should be the best approach in order to deal with this 
> > scenario?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ