linux-at91
linux-at91 copied to clipboard
drm/atmel-hlcdc: use drm component API to access tda998x driver
Add support for the TDA19988 HDMI transmitter and possibly other component based DRM drivers to the atmel-hlcdc driver. The idea is based on the tilcdc driver. Added device tree options to enable required timing changes. Change pixel clock divider settings to resolve incorrect clock output and reduce rounding to prevent clocking out of range.
Please test using DRM panels and bridges as I only have hardware using the TDA19988.
Hm, the component framework is working fine for internal IPs, but for external encoders/bridges please implement a proper bridge interface and the HLCDC driver should detect the bridge and expose it in its display pipeline (see how it's done for the sii902x driver).
Yeah there's basically two options to make it work:
- Add component support to atmel-hlcdc
- Rewrite the tda998x driver to become a DRM bridge
About option 2 I have seen some discussion. It could probably be done, but results in more changes, also in other GPU drivers that use it the way it is now (like tilcdc). Also there are newer versions of the tda998x driver (hdmi audio fixes so far) which could no longer be used. For these reasons I chose option 1, everything should keep working and the changes are limited.
The commit actually contains multiple parts:
- add the component calls to the atmel-hlcdc driver
- add device tree options to the atmel-hlcdc driver
- fix incorrect clock settings in the atmel-hlcdc driver
- a generic update of the tda998x driver (from https://github.com/torvalds/linux)
- minor changes to the tda998x driver from myself (compile fix, set display_info)
It's only the first that could be omitted by rewriting the tda998x driver.
@hupster: can you split the changes in different commits and possibly send them to the dri-devel mailing list?
OK will split and see if I can send it to the list.
I pull push for an "option 2" as described in your previous message @hupster . Thanks, bye
Changes are split in this repo: https://github.com/hupster/linux-at91/tree/linux-4.4-at91-upstream-drm
Message was sent to the dri-devel list.