mbox series

[v2,0/2] drm/sun4i: dw-hdmi: Improve CEC support

Message ID 20190401191513.23159-1-jernej.skrabec@siol.net (mailing list archive)
Headers show
Series drm/sun4i: dw-hdmi: Improve CEC support | expand

Message

Jernej Škrabec April 1, 2019, 7:15 p.m. UTC
It turns out that additional logic between HDMI CEC controller and
pins on PHY on some Allwinner SoCs prevents proper communication.
It might be possible to fix it, but it's much easier and less error
prone to just directly drive pins using software implementation of
CEC protocol.

Let me know what do you think.

Best regards,
Jernej

Changes from v1:
- renamed is_cec_unusable to disable_cec
- added review-by tag

Jernej Skrabec (2):
  drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC
    driver
  drm/sun4i: dw-hdmi: Bit bang CEC on some SoCs

 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
 drivers/gpu/drm/sun4i/Kconfig             | 10 +++
 drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h     | 11 +++
 drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c    | 83 ++++++++++++++++++++++-
 include/drm/bridge/dw_hdmi.h              |  2 +
 5 files changed, 105 insertions(+), 3 deletions(-)

Comments

Hans Verkuil April 12, 2019, 10:15 a.m. UTC | #1
Hi Jernej,

On 4/1/19 9:15 PM, Jernej Skrabec wrote:
> It turns out that additional logic between HDMI CEC controller and
> pins on PHY on some Allwinner SoCs prevents proper communication.
> It might be possible to fix it, but it's much easier and less error
> prone to just directly drive pins using software implementation of
> CEC protocol.

1) Please CC linux-media as well, I had almost missed this series.

2) Is this a SoC limitation or a board limitation?

3) Is the bit-banging support sunxi specific? Or is it still using some
   DW CEC functionality? It appears to be sunxi specific.

4) I had an old patch series: https://www.spinics.net/lists/dri-devel/msg170232.html

Rob Herring disagreed with that, but the discussion fizzled out at the end.
I still think doing this in the device tree is the right approach since this
is very much hardware related.

If the DW CEC implementation doesn't work for some reason (CEC pins not hooked up,
or for other reasons non-functional), then it should be disabled in the device
tree. So then adding a new SUN8I option to enable bitbanging CEC support seems
logical.

Regards,

	Hans

> 
> Let me know what do you think.
> 
> Best regards,
> Jernej
> 
> Changes from v1:
> - renamed is_cec_unusable to disable_cec
> - added review-by tag
> 
> Jernej Skrabec (2):
>   drm/bridge/synopsys: dw-hdmi: Add an option to suppress loading CEC
>     driver
>   drm/sun4i: dw-hdmi: Bit bang CEC on some SoCs
> 
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi.c |  2 +-
>  drivers/gpu/drm/sun4i/Kconfig             | 10 +++
>  drivers/gpu/drm/sun4i/sun8i_dw_hdmi.h     | 11 +++
>  drivers/gpu/drm/sun4i/sun8i_hdmi_phy.c    | 83 ++++++++++++++++++++++-
>  include/drm/bridge/dw_hdmi.h              |  2 +
>  5 files changed, 105 insertions(+), 3 deletions(-)
>