All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Hans Verkuil <hansverk@cisco.com>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	m.szyprowski@samsung.com, kyungmin.park@samsung.com,
	thomas@tommie-lie.de, sean@mess.org, dmitry.torokhov@gmail.com,
	linux-input@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	lars@opdenkamp.eu, kamil@wypas.org,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [PATCHv9 07/15] cec: add HDMI CEC framework
Date: Mon, 12 Oct 2015 13:35:54 +0200	[thread overview]
Message-ID: <561B9B1A.4020001@xs4all.nl> (raw)
In-Reply-To: <20151006170635.GQ21513@n2100.arm.linux.org.uk>

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

  reply	other threads:[~2015-10-12 11:35 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-07 13:44 [PATCHv9 00/15] HDMI CEC framework Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 01/15] dts: exynos4*: add HDMI CEC pin definition to pinctrl Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 02/15] dts: exynos4: add node for the HDMI CEC device Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 03/15] dts: exynos4412-odroid*: enable " Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 04/15] input.h: add BUS_CEC type Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 05/15] HID: add HDMI CEC specific keycodes Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 06/15] rc: Add HDMI CEC protocol handling Hans Verkuil
2015-10-06 18:05   ` Russell King - ARM Linux
2015-10-12 11:50     ` Hans Verkuil
2015-10-13 23:09       ` Russell King - ARM Linux
2015-10-13 23:09         ` Russell King - ARM Linux
2015-10-14  7:12         ` Hans Verkuil
2015-10-15  7:31       ` Russell King - ARM Linux
2015-09-07 13:44 ` [PATCHv9 07/15] cec: add HDMI CEC framework Hans Verkuil
2015-10-06 17:06   ` Russell King - ARM Linux
2015-10-12 11:35     ` Hans Verkuil [this message]
2015-10-13 22:51       ` Russell King - ARM Linux
2015-10-14  6:29         ` Hans Verkuil
2015-10-15 17:34           ` Russell King - ARM Linux
2015-10-15 17:34             ` Russell King - ARM Linux
2015-10-15 17:45             ` Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 08/15] cec.txt: add CEC framework documentation Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 09/15] DocBook/media: add CEC documentation Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 10/15] v4l2-subdev: add HDMI CEC ops Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 11/15] cec: adv7604: add cec support Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 12/15] cec: adv7842: " Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 13/15] cec: adv7511: " Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 14/15] cec: s5p-cec: Add s5p-cec driver Hans Verkuil
2015-10-05 22:32   ` Russell King - ARM Linux
2015-10-12 10:50     ` Hans Verkuil
2015-10-12 12:33       ` Kamil Debski
2015-10-12 12:39         ` Hans Verkuil
2015-10-12 12:39           ` Hans Verkuil
2015-10-12 12:44           ` Kamil Debski
2015-10-13 23:26           ` Russell King - ARM Linux
2015-10-05 23:11   ` Russell King - ARM Linux
2015-10-12 10:54     ` Hans Verkuil
2015-09-07 13:44 ` [PATCHv9 15/15] cobalt: add cec support Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=561B9B1A.4020001@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hans.verkuil@cisco.com \
    --cc=hansverk@cisco.com \
    --cc=kamil@wypas.org \
    --cc=kyungmin.park@samsung.com \
    --cc=lars@opdenkamp.eu \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=sean@mess.org \
    --cc=thomas@tommie-lie.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.