linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pierre-Hugues Husson <phh@phh.me>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-fbdev@vger.kernel.org,
	Russell King <rmk+kernel@armlinux.org.uk>,
	Russell King - ARM Linux <linux@armlinux.org.uk>,
	dri-devel@lists.freedesktop.org
Subject: Re: [RFCv2 PATCH 4/5] drm/bridge: add dw-hdmi cec driver using Hans Verkuil's CEC code
Date: Sun, 5 Feb 2017 01:17:45 +0100	[thread overview]
Message-ID: <CAJ-oXjSsk=cZgpNp-6qLPo13Mj8Cw5mvqEe8mtFVCPSphxJOWQ@mail.gmail.com> (raw)
In-Reply-To: <1479136968-24477-5-git-send-email-hverkuil@xs4all.nl>

Hi,

2016-11-14 16:22 GMT+01:00 Hans Verkuil <hverkuil@xs4all.nl>:
> From: Russell King <rmk+kernel@arm.linux.org.uk>
>
> Add a CEC driver for the dw-hdmi hardware using Hans Verkuil's CEC
> implementation.
>
> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
I've seen that the patchset concerning CEC/HDMI notifier after this
one dropped dw-hdmi support.
Is this only temporary, or does this driver need someone to take care of it?

> diff --git a/drivers/gpu/drm/bridge/dw-hdmi-cec.c b/drivers/gpu/drm/bridge/dw-hdmi-cec.c
> new file mode 100644
> index 0000000..e7e12b5
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/dw-hdmi-cec.c
> @@ -0,0 +1,346 @@
> +/* http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/
> + * tree/drivers/mxc/hdmi-cec/mxc_hdmi-cec.c?h=imx_3.0.35_4.1.0 */
It is perhaps mandatory to have GPL header?

> +#include <linux/hdmi-notifier.h>
> +#include <linux/interrupt.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/notifier.h>
> +#include <linux/platform_data/dw_hdmi-cec.h>
> +#include <linux/platform_device.h>
> +#include <linux/sched.h>
> +#include <linux/slab.h>
> +
> +#include <drm/drm_edid.h>
> +
> +#include <media/cec.h>
> +#include <media/cec-edid.h>
> +
> +#define DEV_NAME "mxc_hdmi_cec"
I think that to respect the convention it should be dw-hdmi-cec?

> +       writeb_relaxed(addresses & 255, cec->base + HDMI_CEC_ADDR_L);
> +       writeb_relaxed(addresses >> 8, cec->base + HDMI_CEC_ADDR_H);
Some platforms (at least rockchip) discuss with dw-hdmi with longs
instead of bytes
dw-hdmi-i2s-audio.c uses hdmi_read/hdmi_write for that

Is it ok to add write and read functions to dw_hdmi_cec_ops ?

> +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);
> +       struct hdmi_notifier *n = data;
> +       unsigned int phys;
> +
> +       dev_info(cec->adap->devnode.parent, "event %lu\n", event);
> +
> +       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(n->edid);
> +               cec_s_phys_addr(cec->adap, phys, false);
> +               break;
> +       }
> +
> +       return NOTIFY_OK;
> +}
Thanks to "cec: integrate HDMI notifier support" this code can be dropped

  reply	other threads:[~2017-02-05  0:18 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-14 15:22 [RFCv2 PATCH 0/5] CEC drivers for iMX6 and TDA9950 Hans Verkuil
2016-11-14 15:22 ` [RFCv2 PATCH 1/5] video: add HDMI state notifier support Hans Verkuil
2016-11-15 18:24   ` Philipp Zabel
2016-11-15 20:41     ` Hans Verkuil
2016-11-16  9:43       ` Hans Verkuil
2016-12-01 10:09   ` Hans Verkuil
2016-11-14 15:22 ` [RFCv2 PATCH 2/5] drm/bridge: dw_hdmi: remove CEC engine register definitions Hans Verkuil
2016-11-14 15:39   ` Russell King - ARM Linux
2016-11-14 15:42     ` Hans Verkuil
2016-11-15 23:23   ` Pierre-Hugues Husson
2016-11-15 23:27     ` Russell King - ARM Linux
2016-11-15 23:35       ` Pierre-Hugues Husson
2016-11-14 15:22 ` [RFCv2 PATCH 3/5] drm/bridge: dw_hdmi: add HDMI notifier support Hans Verkuil
2016-11-15 23:21   ` Pierre-Hugues Husson
2017-02-05  0:22   ` Pierre-Hugues Husson
2016-11-14 15:22 ` [RFCv2 PATCH 4/5] drm/bridge: add dw-hdmi cec driver using Hans Verkuil's CEC code Hans Verkuil
2017-02-05  0:17   ` Pierre-Hugues Husson [this message]
2016-11-14 15:22 ` [RFCv2 PATCH 5/5] drm/i2c: add tda998x/tda9950 CEC driver 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='CAJ-oXjSsk=cZgpNp-6qLPo13Mj8Cw5mvqEe8mtFVCPSphxJOWQ@mail.gmail.com' \
    --to=phh@phh.me \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=rmk+kernel@armlinux.org.uk \
    /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).