All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>, linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org, Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFC PATCH 3/3] encoder-tpd12s015: keep the ls_oe_gpio on while the phys_addr is valid
Date: Wed, 12 Apr 2017 16:04:09 +0200	[thread overview]
Message-ID: <54a864cd-00b8-3e5f-94d6-ceee1248cd53@xs4all.nl> (raw)
In-Reply-To: <fc682c3d-3ab3-0d0f-3bb7-f6dc62f477f6@ti.com>

On 04/12/2017 03:21 PM, Tomi Valkeinen wrote:
> On 12/04/17 16:03, Hans Verkuil wrote:
> 
>> I noticed while experimenting with this that tpd_disconnect() in
>> drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c isn't called when
>> I disconnect the HDMI cable. Is that a bug somewhere?
>>
>> I would expect that tpd_connect and tpd_disconnect are balanced. The tpd_enable
>> and tpd_disable calls are properly balanced and I see the tpd_disable when I
>> disconnect the HDMI cable.
> 
> The connect/disconnect naming there is legacy... It's not about cable
> connect, it's about the initial "connect" of the drivers in the video
> pipeline. It's done just once when starting omapdrm.

Ah, good to know.

>> The key to keeping CEC up and running, even when there is no HPD is to keep
>> the hdmi.vdda_reg regulator enabled. Also the HDMI_IRQ_CORE should always be
>> on, otherwise I won't get any CEC interrupts.
> 
> At the moment there's no way to enable the pipeline without enabling the
> video.
> 
>> So if the omap4 CEC support is enabled in the kernel config, then always enable
>> this regulator and irq, and otherwise keep the current code.
> 
> Well, I have no clue about how CEC is used, but don't we have some
> userspace components using it? I presume there's an open() or something
> similar that signals that the userspace is interested in CEC. That
> should be the trigger to enable the HW required for CEC.

Why didn't I think of that. I did a quick implementation to test this and it
works.

> So is some other driver supporting this already? Or is the omap4 the
> first platform you're trying this on?

No, there are quite a few CEC drivers by now, but typically the CEC block is
a totally independent IP block with its own power, irq, etc. The omap4 is by far
the most complex one to set up with various GPIO pins, interrupts, regulators,
etc. to deal with.

Normally it takes about 2 days to make a new CEC driver, but the omap4 is much
more work :-(

Regards,

	Hans

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

Thread overview: 31+ 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 ` 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   ` Hans Verkuil
2016-04-29  9:39 ` [RFC PATCH 2/3] omap4: add CEC support Hans Verkuil
2016-04-29  9:39   ` Hans Verkuil
2016-05-10 12:01   ` Tomi Valkeinen
2016-05-10 12:01     ` Tomi Valkeinen
2016-05-10 12:26     ` Hans Verkuil
2016-05-10 12:41       ` Tomi Valkeinen
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-04-29  9:39   ` Hans Verkuil
2016-05-10 11:36   ` Tomi Valkeinen
2016-05-10 11:36     ` Tomi Valkeinen
2017-04-08 10:11     ` Hans Verkuil
2017-04-08 10:57       ` Hans Verkuil
2017-04-08 10:57         ` Hans Verkuil
2017-04-10 11:59       ` Tomi Valkeinen
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 13:21             ` Tomi Valkeinen
2017-04-12 14:04             ` Hans Verkuil [this message]
2017-04-13  8:43               ` Tomi Valkeinen
2017-04-13  8:43                 ` Tomi Valkeinen
2017-04-13  9:12                 ` Hans Verkuil
2017-04-13  9:12                   ` Hans Verkuil
2017-04-13  9:26                   ` Tomi Valkeinen
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=54a864cd-00b8-3e5f-94d6-ceee1248cd53@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hans.verkuil@cisco.com \
    --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.