On 10/06/2015 07:06 PM, Russell King - ARM Linux wrote:
> On Mon, Sep 07, 2015 at 03:44:36PM +0200, Hans Verkuil wrote:
>> From: Hans Verkuil <[email protected]>
>>
>> The added HDMI CEC framework provides a generic kernel interface for
>> HDMI CEC devices.
>>
>> Signed-off-by: Hans Verkuil <[email protected]>
>> [[email protected]: Merged CEC Updates commit by Hans Verkuil]
>> [[email protected]: Merged Update author commit by Hans Verkuil]
>> [[email protected]: change kthread handling when setting logical
>> address]
>> [[email protected]: code cleanup and fixes]
>> [[email protected]: add missing CEC commands to match spec]
>> [[email protected]: add RC framework support]
>> [[email protected]: move and edit documentation]
>> [[email protected]: add vendor id reporting]
>> [[email protected]: add possibility to clear assigned logical
>> addresses]
>> [[email protected]: documentation fixes, clenaup and expansion]
>> [[email protected]: reorder of API structs and add reserved fields]
>> [[email protected]: fix handling of events and fix 32/64bit timespec
>> problem]
>> [[email protected]: add cec.h to include/uapi/linux/Kbuild]
>> [[email protected]: add sequence number handling]
>> [[email protected]: add passthrough mode]
>> [[email protected]: fix CEC defines, add missing CEC 2.0 commands]
>> minor additions]
>> Signed-off-by: Kamil Debski <[email protected]>
>> Signed-off-by: Hans Verkuil <[email protected]>
> 
> I don't see much in the way of support for source devices in this:
> how do we handle hotplug of the sink, and how to do we configure the
> physical address?

The source device driver should call cec_enable(false) if the hotplug
goes down and cec_enable(true) when the EDID has been read and the physical
address has been retrieved and configured in the cec adapter.

This however assumes that the source driver is the one controlling the
CEC hardware. This is the case for the cobalt driver, but not apparently
for the exynos hardware. In that case userspace will have to handle this:
disable the CEC adapter when the hotplug disappears, set the physical address
and enable the CEC adapter when a new EDID is read.

Such drivers have the CEC_CAP_STATE and CEC_CAP_PHYS_ADDR caps set. I.e.
they expect that userspace does this.

This is also something that USB CEC dongles will do, although I don't have
a driver for that.

> Surely you aren't proposing that drivers should write directly to
> adap->phys_addr without calling some notification function that the
> physical address has changed?

Userspace is informed through CEC_EVENT_STATE_CHANGE when the adapter is
enabled/disabled. When the adapter is enabled and CEC_CAP_PHYS_ADDR is
not set (i.e. the kernel takes care of this), then calling CEC_ADAP_G_PHYS_ADDR
returns the new physical address.
 
> Please can you give some guidance on how a HDMI source bridge driver
> should deal with these issues.  Thanks.
> 

The cec.txt file will give more information about the kernel internals.
All I need is time (ha!) to update that file since the current version
is completely outdated (as mentioned in the cover letter).

Regards,

        Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to