Re: [PATCH 8/8] omapdrm: hdmi4: hook up the HDMI CEC support

2017-07-31 Thread Hans Verkuil
Hi Tomi,

On 06/08/2017 11:19 AM, Tomi Valkeinen wrote:
> On 08/06/17 10:34, Hans Verkuil wrote:
> 
>>> Peter is about to send hotplug-interrupt-handling series, I think the
>>> HPD function work should be done on top of that, as otherwise it'll just
>>> conflict horribly.
>>
>> Has that been merged yet? And if so, what git repo/branch should I base
>> my next version of this patch series on? If not, do you know when it is
>> expected?
> 
> No, still pending review. The patches ("[PATCH v2 0/3] drm/omap: Support
> for hotplug detection") apply on top of latest drm-next, if you want to try.

I gather[1] that this has been merged? Where can I find a git tree that has
these patches? I'd like to get the omap4 CEC support in for 4.14.

Regards,

Hans

[1]: http://www.spinics.net/lists/dri-devel/msg143440.html


Re: [PATCH 8/8] omapdrm: hdmi4: hook up the HDMI CEC support

2017-06-08 Thread Tomi Valkeinen
On 08/06/17 10:34, Hans Verkuil wrote:

>> Peter is about to send hotplug-interrupt-handling series, I think the
>> HPD function work should be done on top of that, as otherwise it'll just
>> conflict horribly.
> 
> Has that been merged yet? And if so, what git repo/branch should I base
> my next version of this patch series on? If not, do you know when it is
> expected?

No, still pending review. The patches ("[PATCH v2 0/3] drm/omap: Support
for hotplug detection") apply on top of latest drm-next, if you want to try.

 Tomi



signature.asc
Description: OpenPGP digital signature


Re: [PATCH 8/8] omapdrm: hdmi4: hook up the HDMI CEC support

2017-06-08 Thread Hans Verkuil
Hi Tomi,

On 08/05/17 12:26, Tomi Valkeinen wrote:
> On 06/05/17 14:58, Hans Verkuil wrote:
> 
>> My assumption was that hdmi_display_disable() was called when the hotplug 
>> would go
>> away. But I discovered that that isn't the case, or at least not when X is 
>> running.
>> It seems that the actual HPD check is done in hdmic_detect() in
>> omapdrm/displays/connector-hdmi.c.
> 
> For some HW it's done there (in the case there's no IP handling the
> HPD), but in some cases it's done in tpd12s015 driver (e.g. pandaboard),
> and in some cases it also could be done in the hdmi driver (if the HPD
> is handled by the HDMI IP, but at the moment we don't have this case
> supported in the SW).
> 
>> But there I have no access to hdmi.core (needed for the 
>> hdmi4_cec_set_phys_addr() call).
>>
>> Any idea how to solve this? I am not all that familiar with drm, let alone 
>> omapdrm,
>> so if you can point me in the right direction, then that would be very 
>> helpful.
> 
> Hmm, indeed, looks the the output is kept enabled even if HPD drops and
> the connector status is changed to disconnected.
> 
> I don't have a very good solution... I think we have to add a function
> to omapdss_hdmi_ops, which the connector-hdmi and tpd12s015 drivers can
> call when they detect a HPD change. That call would go to the HDMI IP
> driver.
> 
> Peter is about to send hotplug-interrupt-handling series, I think the
> HPD function work should be done on top of that, as otherwise it'll just
> conflict horribly.

Has that been merged yet? And if so, what git repo/branch should I base
my next version of this patch series on? If not, do you know when it is
expected?

Regards,

Hans


Re: [PATCH 8/8] omapdrm: hdmi4: hook up the HDMI CEC support

2017-05-08 Thread Hans Verkuil
On 05/08/2017 12:26 PM, Tomi Valkeinen wrote:
> On 06/05/17 14:58, Hans Verkuil wrote:
> 
>> My assumption was that hdmi_display_disable() was called when the hotplug 
>> would go
>> away. But I discovered that that isn't the case, or at least not when X is 
>> running.
>> It seems that the actual HPD check is done in hdmic_detect() in
>> omapdrm/displays/connector-hdmi.c.
> 
> For some HW it's done there (in the case there's no IP handling the
> HPD), but in some cases it's done in tpd12s015 driver (e.g. pandaboard),
> and in some cases it also could be done in the hdmi driver (if the HPD
> is handled by the HDMI IP, but at the moment we don't have this case
> supported in the SW).
> 
>> But there I have no access to hdmi.core (needed for the 
>> hdmi4_cec_set_phys_addr() call).
>>
>> Any idea how to solve this? I am not all that familiar with drm, let alone 
>> omapdrm,
>> so if you can point me in the right direction, then that would be very 
>> helpful.
> 
> Hmm, indeed, looks the the output is kept enabled even if HPD drops and
> the connector status is changed to disconnected.
> 
> I don't have a very good solution... I think we have to add a function
> to omapdss_hdmi_ops, which the connector-hdmi and tpd12s015 drivers can
> call when they detect a HPD change. That call would go to the HDMI IP
> driver.

Right, I was thinking the same, I just wasn't sure if that was the correct
solution.

> Peter is about to send hotplug-interrupt-handling series, I think the
> HPD function work should be done on top of that, as otherwise it'll just
> conflict horribly.

OK, I'll do that.

I'll get CEC supported on the omap4 eventually! :-)

Regards,

Hans


Re: [PATCH 8/8] omapdrm: hdmi4: hook up the HDMI CEC support

2017-05-08 Thread Tomi Valkeinen
On 06/05/17 14:58, Hans Verkuil wrote:

> My assumption was that hdmi_display_disable() was called when the hotplug 
> would go
> away. But I discovered that that isn't the case, or at least not when X is 
> running.
> It seems that the actual HPD check is done in hdmic_detect() in
> omapdrm/displays/connector-hdmi.c.

For some HW it's done there (in the case there's no IP handling the
HPD), but in some cases it's done in tpd12s015 driver (e.g. pandaboard),
and in some cases it also could be done in the hdmi driver (if the HPD
is handled by the HDMI IP, but at the moment we don't have this case
supported in the SW).

> But there I have no access to hdmi.core (needed for the 
> hdmi4_cec_set_phys_addr() call).
> 
> Any idea how to solve this? I am not all that familiar with drm, let alone 
> omapdrm,
> so if you can point me in the right direction, then that would be very 
> helpful.

Hmm, indeed, looks the the output is kept enabled even if HPD drops and
the connector status is changed to disconnected.

I don't have a very good solution... I think we have to add a function
to omapdss_hdmi_ops, which the connector-hdmi and tpd12s015 drivers can
call when they detect a HPD change. That call would go to the HDMI IP
driver.

Peter is about to send hotplug-interrupt-handling series, I think the
HPD function work should be done on top of that, as otherwise it'll just
conflict horribly.

 Tomi



signature.asc
Description: OpenPGP digital signature


Re: [PATCH 8/8] omapdrm: hdmi4: hook up the HDMI CEC support

2017-05-06 Thread Hans Verkuil
Hi Tomi,

I did some more testing, and I discovered a bug in this code, but I am not
sure how to solve it.

On 04/14/2017 12:25 PM, Hans Verkuil wrote:
> From: Hans Verkuil 
> 
> Hook up the HDMI CEC support in the hdmi4 driver.
> 
> It add the CEC irq handler, the CEC (un)init calls and tells the CEC
> implementation when the physical address changes.
> 
> Signed-off-by: Hans Verkuil 
> ---
>  drivers/gpu/drm/omapdrm/dss/Kconfig  |  9 +
>  drivers/gpu/drm/omapdrm/dss/Makefile |  1 +
>  drivers/gpu/drm/omapdrm/dss/hdmi4.c  | 23 ++-
>  3 files changed, 32 insertions(+), 1 deletion(-)
> 



> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c 
> b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> index e371b47ff6ff..ebe5b27cee6f 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c



> @@ -392,6 +401,8 @@ static void hdmi_display_disable(struct omap_dss_device 
> *dssdev)
>  
>   DSSDBG("Enter hdmi_display_disable\n");
>  
> + hdmi4_cec_set_phys_addr(&hdmi.core, CEC_PHYS_ADDR_INVALID);
> +
>   mutex_lock(&hdmi.lock);
>  
>   spin_lock_irqsave(&hdmi.audio_playing_lock, flags);

My assumption was that hdmi_display_disable() was called when the hotplug would 
go
away. But I discovered that that isn't the case, or at least not when X is 
running.
It seems that the actual HPD check is done in hdmic_detect() in
omapdrm/displays/connector-hdmi.c.

But there I have no access to hdmi.core (needed for the 
hdmi4_cec_set_phys_addr() call).

Any idea how to solve this? I am not all that familiar with drm, let alone 
omapdrm,
so if you can point me in the right direction, then that would be very helpful.

Regards,

Hans