From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Hans Verkuil <hverkuil@xs4all.nl>, linux-media@vger.kernel.org
Cc: Hans Verkuil <hans.verkuil@cisco.com>, dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid
Date: Tue, 10 May 2016 14:36:50 +0300 [thread overview]
Message-ID: <5731C7D2.4090807@ti.com> (raw)
In-Reply-To: <1461922746-17521-4-git-send-email-hverkuil@xs4all.nl>
[-- Attachment #1.1.1: Type: text/plain, Size: 2627 bytes --]
Hi Hans,
On 29/04/16 12:39, Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@cisco.com>
>
> As long as there is a valid physical address in the EDID and the omap
> CEC support is enabled, then we keep ls_oe_gpio on to ensure the CEC
> signal is passed through the tpd12s015.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Suggested-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> index 916a899..efbba23 100644
> --- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> +++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
> @@ -16,6 +16,7 @@
> #include <linux/platform_device.h>
> #include <linux/gpio/consumer.h>
>
> +#include <media/cec-edid.h>
> #include <video/omapdss.h>
> #include <video/omap-panel-data.h>
>
> @@ -65,6 +66,7 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
> return;
>
> gpiod_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
> + gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
>
> dst->src = NULL;
> dssdev->dst = NULL;
> @@ -142,6 +144,7 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
> {
> struct panel_drv_data *ddata = to_panel_data(dssdev);
> struct omap_dss_device *in = ddata->in;
> + bool valid_phys_addr = 0;
> int r;
>
> if (!gpiod_get_value_cansleep(ddata->hpd_gpio))
> @@ -151,7 +154,15 @@ static int tpd_read_edid(struct omap_dss_device *dssdev,
>
> r = in->ops.hdmi->read_edid(in, edid, len);
>
> - gpiod_set_value_cansleep(ddata->ls_oe_gpio, 0);
> +#ifdef CONFIG_OMAP2_DSS_HDMI_CEC
> + /*
> + * In order to support CEC this pin should remain high
> + * as long as the EDID has a valid physical address.
> + */
> + valid_phys_addr =
> + cec_get_edid_phys_addr(edid, r, NULL) != CEC_PHYS_ADDR_INVALID;
> +#endif
> + gpiod_set_value_cansleep(ddata->ls_oe_gpio, valid_phys_addr);
>
> return r;
> }
I think this works, but... Maybe it would be cleaner to have the LS_OE
enabled if a cable is connected. That's actually what we had earlier,
but I removed that due to a race issue:
a87a6d6b09de3118e5679c2057b99b7791b7673b ("OMAPDSS: encoder-tpd12s015:
Fix race issue with LS_OE"). Now, with CEC, there's need to have LS_OE
enabled even after reading the EDID, so I think it's better to go back
to the old model (after fixing the race issue, of course =).
Tomi
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-05-10 11:36 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-29 9:39 [RFC PATCH 0/3] OMAP4 HDMI CEC support Hans Verkuil
2016-04-29 9:39 ` [RFC PATCH 1/3] drm/omap: fix OMAP4 hdmi_core_powerdown_disable() Hans Verkuil
2016-04-29 9:39 ` [RFC PATCH 2/3] omap4: add CEC support Hans Verkuil
2016-05-10 12:01 ` Tomi Valkeinen
2016-05-10 12:26 ` Hans Verkuil
2016-05-10 12:41 ` Tomi Valkeinen
2016-04-29 9:39 ` [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid Hans Verkuil
2016-05-10 11:36 ` Tomi Valkeinen [this message]
2017-04-08 10:11 ` Hans Verkuil
2017-04-08 10:57 ` Hans Verkuil
2017-04-10 11:59 ` Tomi Valkeinen
2017-04-12 13:03 ` Hans Verkuil
2017-04-12 13:10 ` Hans Verkuil
2017-04-12 13:21 ` Tomi Valkeinen
2017-04-12 14:04 ` Hans Verkuil
2017-04-13 8:43 ` Tomi Valkeinen
2017-04-13 9:12 ` Hans Verkuil
2017-04-13 9:26 ` Tomi Valkeinen
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=5731C7D2.4090807@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hans.verkuil@cisco.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
/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