From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Hans Verkuil <hansverk@cisco.com>,
Tomi Valkeinen <tomi.valkeinen@ti.com>,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC 4/5] drm/bridge: add dw-hdmi cec driver using Hans Verkil's CEC code
Date: Tue, 23 Aug 2016 07:59:50 +0000 [thread overview]
Message-ID: <20160823075950.GC1041@n2100.armlinux.org.uk> (raw)
In-Reply-To: <dcd9587f-be60-0cb6-92bb-3226c51bddfb@xs4all.nl>
On Tue, Aug 23, 2016 at 09:21:17AM +0200, Hans Verkuil wrote:
> Hi Russell,
>
> On 08/12/2016 04:15 PM, Russell King wrote:
> > Add a CEC driver for the dw-hdmi hardware using Hans Verkil's CEC
> > implementation.
> >
> > Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
> > ---
> > drivers/gpu/drm/bridge/Kconfig | 7 +
> > drivers/gpu/drm/bridge/Makefile | 1 +
> > drivers/gpu/drm/bridge/dw-hdmi-cec.c | 344 ++++++++++++++++++++++++++++++
> > drivers/gpu/drm/bridge/dw-hdmi.c | 64 +++++-
> > include/linux/platform_data/dw_hdmi-cec.h | 16 ++
> > 5 files changed, 421 insertions(+), 11 deletions(-)
> > create mode 100644 drivers/gpu/drm/bridge/dw-hdmi-cec.c
> > create mode 100644 include/linux/platform_data/dw_hdmi-cec.h
> >
>
> <snip>
>
> > +static unsigned int parse_hdmi_addr(const struct edid *edid)
> > +{
> > + if (!edid || edid->extensions = 0)
> > + return (u16)~0;
> > +
> > + return cec_get_edid_phys_addr((u8 *)edid,
> > + EDID_LENGTH * (edid->extensions + 1), NULL);
> > +}
> > +
> > +static int dw_hdmi_cec_notify(struct notifier_block *nb, unsigned long event,
> > + void *data)
> > +{
> > + struct dw_hdmi_cec *cec = container_of(nb, struct dw_hdmi_cec, nb);
> > + union hdmi_event *event_block = data;
> > + unsigned int phys;
> > +
> > + dev_info(event_block->base.source, "event %lu\n", event);
> > +
> > + if (event_block->base.source != cec->adap->devnode.parent)
> > + return NOTIFY_OK;
> > +
> > + switch (event) {
> > + case HDMI_CONNECTED:
> > + break;
> > +
> > + case HDMI_DISCONNECTED:
> > + cec_s_phys_addr(cec->adap, CEC_PHYS_ADDR_INVALID, false);
> > + break;
> > +
> > + case HDMI_NEW_EDID:
> > + phys = parse_hdmi_addr(event_block->edid.edid);
> > + cec_s_phys_addr(cec->adap, phys, false);
> > + break;
> > + }
> > +
> > + return NOTIFY_OK;
> > +}
>
> Wouldn't it make a lot of sense to integrate this into the cec framework?
>
> All you need is to pass an hdmi_notifier_dev as argument to cec_allocate_adapter()
> and you can integrate this.
>
> If you are OK with that, then I can make patches for that.
It's not just about CEC. It's also used for passing information between
the video and audio parts, so tying this into CEC is wrong.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2016-08-23 7:59 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-12 14:14 [PATCH RFC 0/5] CEC drivers for iMX6 and TDA9950 Russell King - ARM Linux
2016-08-12 14:14 ` [PATCH RFC 1/5] video: add HDMI state notifier support Russell King
2016-08-12 15:26 ` Hans Verkuil
2016-08-12 14:15 ` [PATCH RFC 2/5] drm/bridge: dw_hdmi: remove CEC engine register definitions Russell King
2016-08-12 14:15 ` [PATCH RFC 3/5] drm/bridge: dw_hdmi: add HDMI notifier support Russell King
2016-08-12 14:15 ` [PATCH RFC 4/5] drm/bridge: add dw-hdmi cec driver using Hans Verkil's CEC code Russell King
2016-08-12 14:25 ` Hans Verkuil
2016-08-12 14:26 ` Russell King - ARM Linux
2016-08-23 7:21 ` Hans Verkuil
2016-08-23 7:59 ` Russell King - ARM Linux [this message]
2016-08-23 8:05 ` Hans Verkuil
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-23 8:03 ` Hans Verkuil
2016-08-31 12:28 ` Russell King - ARM Linux
2016-08-12 14:15 ` [PATCH RFC 5/5] drm/i2c: add tda998x/tda9950 CEC driver Russell King
2016-08-12 14:38 ` Hans Verkuil
2016-08-12 14:52 ` Russell King - ARM Linux
2016-08-12 15:16 ` Hans Verkuil
2016-08-12 15:29 ` Russell King - ARM Linux
2016-08-12 15:53 ` Hans Verkuil
2016-08-12 15:59 ` Russell King - ARM Linux
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=20160823075950.GC1041@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansverk@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).