dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-samsung-soc@vger.kernel.org, sean@mess.org,
	Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
	dmitry.torokhov@gmail.com, lars@opdenkamp.eu,
	dri-devel@lists.freedesktop.org, kamil@wypas.org,
	Hans Verkuil <hansverk@cisco.com>,
	kyungmin.park@samsung.com, Hans Verkuil <hans.verkuil@cisco.com>,
	thomas@tommie-lie.de, linux-input@vger.kernel.org,
	m.szyprowski@samsung.com, linux-media@vger.kernel.org
Subject: Re: [PATCHv9 06/15] rc: Add HDMI CEC protocol handling
Date: Wed, 14 Oct 2015 00:09:57 +0100	[thread overview]
Message-ID: <20151013230957.GN32532@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <561B9E97.4050909@xs4all.nl>

On Mon, Oct 12, 2015 at 01:50:47PM +0200, Hans Verkuil wrote:
> On 10/06/2015 08:05 PM, Russell King - ARM Linux wrote:
> > On Mon, Sep 07, 2015 at 03:44:35PM +0200, Hans Verkuil wrote:
> >> From: Kamil Debski <kamil@wypas.org>
> >>
> >> Add handling of remote control events coming from the HDMI CEC bus.
> >> This patch includes a new keymap that maps values found in the CEC
> >> messages to the keys pressed and released. Also, a new protocol has
> >> been added to the core.
> >>
> >> Signed-off-by: Kamil Debski <kamil@wypas.org>
> >> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> > 
> > (Added Mauro)
> > 
> > Hmm, how is rc-cec supposed to be loaded?
> 
> Is CONFIG_RC_MAP enabled in your config? Ran 'depmod -a'? (Sorry, I'm sure you've done
> that, just checking...)

CONFIG_RC_MAP=m

and yes, if depmod hadn't have been run, modprobing rc-cec would not
have worked - modprobe always looks up in the depmod information to
find out where the module is located, and also to determine any
dependencies.

> It's optional as I understand it, since you could configure the keytable from
> userspace instead of using this module.
> 
> For the record (just tried it), it does load fine on my setup.

Immediately after boot, I have:

# lsmod
Module                  Size  Used by
...
coda                   54685  0
v4l2_mem2mem           14517  1 coda
videobuf2_dma_contig     9478  1 coda
videobuf2_vmalloc       5529  1 coda
videobuf2_memops        1888  2 videobuf2_dma_contig,videobuf2_vmalloc
cecd_dw_hdmi            3129  0
# modprobe rc-cec
# lsmod
Module                  Size  Used by
rc_cec                  1785  0
...
coda                   54685  0
v4l2_mem2mem           14517  1 coda
videobuf2_dma_contig     9478  1 coda
videobuf2_vmalloc       5529  1 coda
videobuf2_memops        1888  2 videobuf2_dma_contig,videobuf2_vmalloc
cecd_dw_hdmi            3129  0

So, rc-cec is perfectly loadable, it just doesn't get loaded at boot.
Manually loading it like this is useless though - I have to unload
cecd_dw_hdmi and then re-load it after rc-cec is loaded for rc-cec to
be seen.  At that point, (and with the help of a userspace program)
things start working as expected.

> BTW, I am still on the fence whether using the kernel RC subsystem is
> the right thing to do. There are a number of CEC RC commands that use
> extra parameters that cannot be mapped to the RC API, so you still
> need to handle those manually.

Even though it is a remote control which is being forwarded for the
most part, but there are operation codes which aren't related to
key presses specified by the standard.  I don't think there's anything
wrong with having a RC interface present, but allowing other interfaces
as a possibility is a good thing too - it allows a certain amount of
flexibility.

For example, with rc-cec loaded and properly bound, I can control at
least rhythmbox within gnome using the TVs remote control with no
modifications - and that happens because the X server passes on the
events it receives via the event device.

Given the range of media applications, I think that's key - it needs
to at least have the capability to plug into the existing ways of doing
things, even if those ways are not perfect.

> Perhaps I should split it off into a separate patch and keep it out
> from the initial pull request once we're ready for that.

I'm biased because it is an enablement feature - it allows CEC to work
out of the box with at least some existing media apps. :)

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-10-13 23:10 UTC|newest]

Thread overview: 35+ 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 [this message]
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
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: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: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=20151013230957.GN32532@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=dmitry.torokhov@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hans.verkuil@cisco.com \
    --cc=hansverk@cisco.com \
    --cc=hverkuil@xs4all.nl \
    --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=m.szyprowski@samsung.com \
    --cc=mchehab@osg.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox