All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>, dri-devel@lists.freedesktop.org
Subject: [PATCH 0/8] omapdrm: add OMAP4 CEC support
Date: Fri, 14 Apr 2017 12:25:04 +0200	[thread overview]
Message-ID: <20170414102512.48834-1-hverkuil@xs4all.nl> (raw)

From: Hans Verkuil <hans.verkuil@cisco.com>

This patch series adds support for the OMAP4 HDMI CEC IP core.

Most of the patches leading up to the actual CEC implementation
make changes to the HDMI core support. The reason for this is
that CEC has to be enabled even if the HPD is low: some displays will
set the HPD low when they go into standby or when they switch to another
input, but CEC is still available and able to wake up/change input for
such a display.
 
This corner case is explicitly allowed by the CEC standard, and such
displays really exist, even in modern displays.

So CEC has to be able to wake up the HDMI core, even when there is no
HPD.

I also looked at implementing CEC monitoring (i.e. 'snooping' the CEC
bus for messages between other CEC devices), but I couldn't figure
that out. The omap4 datasheet does not give sufficient information
on how it is supposed to work. There is a CEC_SN bit in CEC_DBG_3 and
a 'CEC Snoop Initiator' field in CEC_DBG_2, but no information on
how to use those registers. Trying to enable CEC_SN gave me weird
results, so I decided to leave that feature out.

Links to CEC documentation and utilities:

Public API:

https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/cec/cec-api.html

Kernel API:

https://www.linuxtv.org/downloads/v4l-dvb-apis-new/kapi/cec-core.html

CEC utilities (esp. cec-ctl):

https://git.linuxtv.org/v4l-utils.git/ (master branch)

To test:

First configure the CEC adapter as a playback device:

cec-ctl --playback

Then detect and query any other CEC devices, such as a CEC-enabled display:

cec-ctl -S

Regards,

	Hans

Hans Verkuil (8):
  arm: omap4: enable CEC pin for Pandaboard A4 and ES
  omapdrm: encoder-tpd12s015: keep ls_oe_gpio high if CEC is enabled
  omapdrm: hdmi.h: extend hdmi_core_data with CEC fields
  omapdrm: hdmi4: make low-level functions available
  omapdrm: hdmi4: prepare irq handling for HDMI CEC support
  omapdrm: hdmi4: refcount hdmi_power_on/off_core
  omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support
  omapdrm: hdmi4: hook up the HDMI CEC support

 arch/arm/boot/dts/omap4-panda-a4.dts               |   2 +-
 arch/arm/boot/dts/omap4-panda-es.dts               |   2 +-
 .../gpu/drm/omapdrm/displays/encoder-tpd12s015.c   |   8 +
 drivers/gpu/drm/omapdrm/dss/Kconfig                |   9 +
 drivers/gpu/drm/omapdrm/dss/Makefile               |   1 +
 drivers/gpu/drm/omapdrm/dss/hdmi.h                 |   6 +-
 drivers/gpu/drm/omapdrm/dss/hdmi4.c                |  58 +++-
 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c            | 381 +++++++++++++++++++++
 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.h            |  55 +++
 drivers/gpu/drm/omapdrm/dss/hdmi4_core.c           |   6 +-
 drivers/gpu/drm/omapdrm/dss/hdmi4_core.h           |   4 +
 11 files changed, 513 insertions(+), 19 deletions(-)
 create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
 create mode 100644 drivers/gpu/drm/omapdrm/dss/hdmi4_cec.h

-- 
2.11.0

             reply	other threads:[~2017-04-14 10:25 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14 10:25 Hans Verkuil [this message]
2017-04-14 10:25 ` [PATCH 1/8] arm: omap4: enable CEC pin for Pandaboard A4 and ES Hans Verkuil
2017-04-14 10:25   ` Hans Verkuil
2017-04-28 11:11   ` Tomi Valkeinen
2017-04-28 11:11     ` Tomi Valkeinen
2017-04-28 15:08     ` Tony Lindgren
2017-04-28 18:26       ` Sebastian Reichel
2017-04-28 18:54         ` Tony Lindgren
2017-04-29 20:21           ` Tony Lindgren
2017-06-26 11:07     ` Tony Lindgren
2017-06-27  8:38       ` Hans Verkuil
2017-06-27  8:38         ` Hans Verkuil
2017-06-27  9:14         ` Tony Lindgren
2017-06-27  9:23           ` Jyri Sarha
2017-06-27  9:23             ` Jyri Sarha
2017-06-27  9:27           ` Hans Verkuil
2017-06-27  9:47             ` Jyri Sarha
2017-06-27  9:47               ` Jyri Sarha
2017-06-27 10:09               ` Tony Lindgren
2017-06-27 10:06             ` Tony Lindgren
2017-04-14 10:25 ` [PATCH 2/8] omapdrm: encoder-tpd12s015: keep ls_oe_gpio high if CEC is enabled Hans Verkuil
2017-04-28 11:33   ` Tomi Valkeinen
2017-04-28 11:33     ` Tomi Valkeinen
2017-04-14 10:25 ` [PATCH 3/8] omapdrm: hdmi.h: extend hdmi_core_data with CEC fields Hans Verkuil
2017-04-14 10:25 ` [PATCH 4/8] omapdrm: hdmi4: make low-level functions available Hans Verkuil
2017-04-14 10:25 ` [PATCH 5/8] omapdrm: hdmi4: prepare irq handling for HDMI CEC support Hans Verkuil
2017-04-14 10:25 ` [PATCH 6/8] omapdrm: hdmi4: refcount hdmi_power_on/off_core Hans Verkuil
2017-04-28 11:30   ` Tomi Valkeinen
2017-04-28 11:30     ` Tomi Valkeinen
2017-05-05 13:04     ` Hans Verkuil
2017-05-05 13:04       ` Hans Verkuil
2017-04-14 10:25 ` [PATCH 7/8] omapdrm: hdmi4_cec: add OMAP4 HDMI CEC support Hans Verkuil
2017-04-14 10:25 ` [PATCH 8/8] omapdrm: hdmi4: hook up the " Hans Verkuil
2017-05-06 11:58   ` Hans Verkuil
2017-05-08 10:26     ` Tomi Valkeinen
2017-05-08 10:26       ` Tomi Valkeinen
2017-05-08 10:46       ` Hans Verkuil
2017-06-08  7:34       ` Hans Verkuil
2017-06-08  9:19         ` Tomi Valkeinen
2017-06-08  9:19           ` Tomi Valkeinen
2017-07-31  7:52           ` Hans Verkuil
2017-04-28 11:52 ` [PATCH 0/8] omapdrm: add OMAP4 " Tomi Valkeinen
2017-04-28 11:52   ` Tomi Valkeinen
2017-04-28 12:05   ` Hans Verkuil
2017-04-28 12:05     ` 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=20170414102512.48834-1-hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-media@vger.kernel.org \
    --cc=tomi.valkeinen@ti.com \
    /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.