Re: [RESEND RFC PATCH 0/7] sun8i H3 HDMI glue driver for DW HDMI
From: Hans Verkuil
Date: Thu Sep 21 2017 - 05:59:35 EST
On 09/21/17 11:39, Jose Abreu wrote:
> Hi Jernej,
> On 20-09-2017 21:01, Jernej Skrabec wrote:
>> [added media mailing list due to CEC question]
>> This patch series adds a HDMI glue driver for Allwinner H3 SoC. For now, only
>> video and CEC functionality is supported. Audio needs more tweaks.
>> Series is based on the H3 DE2 patch series available on mailing list:
>> (ignore patches marked with [NOT FOR REVIEW NOW] tag)
>> Patch 1 adds support for polling plug detection since custom PHY used here
>> doesn't support HPD interrupt.
>> Patch 2 enables overflow workaround for v1.32a. This HDMI controller exhibits
>> same issues as HDMI controller used in iMX6 SoCs.
>> Patch 3 adds CLK_SET_RATE_PARENT to hdmi clock.
>> Patch 4 adds dt bindings documentation.
>> Patch 5 adds actual H3 HDMI glue driver.
>> Patch 6 and 7 add HDMI node to DT and enable it where needed.
>> Allwinner used DW HDMI controller in a non standard way:
>> - register offsets obfuscation layer, which can fortunately be turned off
>> - register read lock, which has to be disabled by magic number
>> - custom PHY, which have to be initialized before DW HDMI controller
>> - non standard clocks
>> - no HPD interrupt
>> Because of that, I have two questions:
>> - Since HPD have to be polled, is it enough just to enable poll mode? I'm
>> mainly concerned about invalidating CEC address here.
> You mean you get no interrupt when HPD status changes? Hans can
> answer this better but then you will need to invalidate the cec
> physical address yourself because right now its invalidated in
> the dw-hdmi irq handler (see dw_hdmi_irq()).
That's correct. When the HPD goes low you need to call cec_notifier_phys_addr_invalidate()
to invalidate the physical address. This is not terribly time sensitive, i.e.
checking this once a second would be quick enough.