Re: [PATCHv9 07/15] cec: add HDMI CEC framework

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

 



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 <hans.verkuil@xxxxxxxxx>
>>
>> The added HDMI CEC framework provides a generic kernel interface for
>> HDMI CEC devices.
>>
>> Signed-off-by: Hans Verkuil <hansverk@xxxxxxxxx>
>> [k.debski@xxxxxxxxxxx: Merged CEC Updates commit by Hans Verkuil]
>> [k.debski@xxxxxxxxxxx: Merged Update author commit by Hans Verkuil]
>> [k.debski@xxxxxxxxxxx: change kthread handling when setting logical
>> address]
>> [k.debski@xxxxxxxxxxx: code cleanup and fixes]
>> [k.debski@xxxxxxxxxxx: add missing CEC commands to match spec]
>> [k.debski@xxxxxxxxxxx: add RC framework support]
>> [k.debski@xxxxxxxxxxx: move and edit documentation]
>> [k.debski@xxxxxxxxxxx: add vendor id reporting]
>> [k.debski@xxxxxxxxxxx: add possibility to clear assigned logical
>> addresses]
>> [k.debski@xxxxxxxxxxx: documentation fixes, clenaup and expansion]
>> [k.debski@xxxxxxxxxxx: reorder of API structs and add reserved fields]
>> [k.debski@xxxxxxxxxxx: fix handling of events and fix 32/64bit timespec
>> problem]
>> [k.debski@xxxxxxxxxxx: add cec.h to include/uapi/linux/Kbuild]
>> [k.debski@xxxxxxxxxxx: add sequence number handling]
>> [k.debski@xxxxxxxxxxx: add passthrough mode]
>> [k.debski@xxxxxxxxxxx: fix CEC defines, add missing CEC 2.0 commands]
>> minor additions]
>> Signed-off-by: Kamil Debski <kamil@xxxxxxxxx>
>> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> 
> 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux