All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/20] drm: sun4i: Add support for the HDMI controller
@ 2017-05-03 11:59 ` Maxime Ripard
  0 siblings, 0 replies; 125+ messages in thread
From: Maxime Ripard @ 2017-05-03 11:59 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd, Chen-Yu Tsai, Maxime Ripard
  Cc: Daniel Vetter, David Airlie, dri-devel, Mark Rutland,
	Rob Herring, devicetree, linux-arm-kernel, linux-clk,
	linux-kernel, linux-sunxi

Hi,

Here is an attempt at getting the HDMI controller running.

This HDMI controller is found on a number of old Allwinner SoCs (A10, A10s,
A20, A31).

This driver only supports for now the A10s because it was an easy target,
being very close to the A13 that is already supported by our DRM driver.

There's nothing out of the extraordinary there, except maybe the clock
setup. All the internal clocks (TMDS, DDC) have been modeled using the
common clock framework, the TMDS clock being the parent of the DDC one.

While this might sound overkill, other SoC have a different, external
source for the DDC clock, which will be easier to support through the clock
framework.

The IP also supports audio (through an already supported i2s controller,
and some missing configuration in the HDMI controller) and CEC. Both will
come eventually.

Let me know what you think!
Maxime

Changes from v1:
  - Fixed typos in the CCU header and the HDMI code
  - Reintroduced the comment for the backporch timings
  - Renamed the hdmi node to hdmi, instead of hdmi0
  - Added support for hdmi-connector
  - Added a separate Kconfig option for the HDMI support
  - Changed the TCON muxing configuration for an explicit call in the
    TCON's "clients"
  - Fixed the initialisation sequence that was clearing the clocks bits
  - Constified the HDMI's structures and removed whitespaces errors
  - Fixed an issue in the sunxi-ng code that was not reporting the proper
    parent clock rate if it was modified
  - Removed unused headers
  - Removed CLK_SET_RATE_PARENT for the DDC clock
  - Used the DDC address defines
  - Removed the interlace flag that wasn't supported at the moment
  - Moved most of the HDMI encoder init to the bind function like we do for
    the other encoders
  - Switched to drm_of_find_possible_crtcs
  - Removed the extra printk that were still in my code
  - Rebased on top of linux-next
  - Removed the patch changing the divider_round_rate prototype to
    introduce a new function instead that takes the parent clock to
    evaluate
  - Added a clk_set_rate for the hdmi module clock
  - Fixed the V_TOTAL TCON ch0 calculation to be consistent with ch1's
  - Defined all registers, and remove the TODOs
  - Fixed the EDID issues by increasing the timeout.
  - Added an atomic_check to prevent the DBLCLK modes to be used, as it is
    not supported yet
  - Updated the binding to add the interrupts and DMA channels

Maxime Ripard (20):
  clk: divider: Make divider_round_rate take the parent clock
  clk: sunxi-ng: Pass the parent and a pointer to the clocks round rate
  clk: sunxi-ng: div: Switch to divider_round_rate
  clk: sunxi-ng: mux: Don't just rely on the parent for CLK_SET_RATE_PARENT
  clk: sunxi-ng: mux: split out the pre-divider computation code
  clk: sunxi-ng: mux: Change pre-divider application function prototype
  clk: sunxi-ng: mux: Re-adjust parent rate
  clk: sunxi-ng: sun5i: Export video PLLs
  drm/sun4i: tcon: Add channel debug
  drm/sun4i: tcon: Move the muxing out of the mode set function
  drm/sun4i: tcon: Switch mux on only for composite
  drm/sun4i: tcon: Fix tcon channel 1 backporch calculation
  drm/sun4i: tcon: Change vertical total size computation inconsistency
  drm/sun4i: tcon: multiply the vtotal when not in interlace
  drm/sun4i: Ignore the generic connectors for components
  dt-bindings: display: sun4i: Add HDMI display bindings
  dt-bindings: display: sun4i: Add allwinner,tcon-channel property
  drm/sun4i: Add HDMI support
  ARM: sun5i: a10s: Add the HDMI controller node
  ARM: sun5i: a10s-olinuxino: Enable HDMI

 Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt |  90 +-
 arch/arm/boot/dts/sun5i-a10s-olinuxino-micro.dts              |  29 +-
 arch/arm/boot/dts/sun5i-a10s.dtsi                             |  50 +-
 arch/arm/boot/dts/sun5i.dtsi                                  |   1 +-
 drivers/clk/clk-divider.c                                     |  26 +-
 drivers/clk/sunxi-ng/ccu-sun5i.h                              |   6 +-
 drivers/clk/sunxi-ng/ccu_div.c                                |  38 +-
 drivers/clk/sunxi-ng/ccu_mp.c                                 |  15 +-
 drivers/clk/sunxi-ng/ccu_mult.c                               |  19 +-
 drivers/clk/sunxi-ng/ccu_mux.c                                |  90 +-
 drivers/clk/sunxi-ng/ccu_mux.h                                |  11 +-
 drivers/clk/sunxi-ng/ccu_nkm.c                                |   7 +-
 drivers/gpu/drm/sun4i/Kconfig                                 |   9 +-
 drivers/gpu/drm/sun4i/Makefile                                |   6 +-
 drivers/gpu/drm/sun4i/sun4i_drv.c                             |   8 +-
 drivers/gpu/drm/sun4i/sun4i_hdmi.h                            | 157 ++-
 drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c                    | 127 ++-
 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c                        | 493 +++++++-
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c                   | 225 +++-
 drivers/gpu/drm/sun4i/sun4i_rgb.c                             |   1 +-
 drivers/gpu/drm/sun4i/sun4i_tcon.c                            |  43 +-
 drivers/gpu/drm/sun4i/sun4i_tcon.h                            |   4 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c                              |   1 +-
 include/dt-bindings/clock/sun5i-ccu.h                         |   3 +-
 include/linux/clk-provider.h                                  |   4 +-
 25 files changed, 1347 insertions(+), 116 deletions(-)
 create mode 100644 drivers/gpu/drm/sun4i/sun4i_hdmi.h
 create mode 100644 drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
 create mode 100644 drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c
 create mode 100644 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c

base-commit: ee91aaf669ac4fbb09283958f69d57dcad5c4963
-- 
git-series 0.8.11

^ permalink raw reply	[flat|nested] 125+ messages in thread

end of thread, other threads:[~2017-05-12  6:50 UTC | newest]

Thread overview: 125+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-03 11:59 [PATCH v2 0/20] drm: sun4i: Add support for the HDMI controller Maxime Ripard
2017-05-03 11:59 ` Maxime Ripard
2017-05-03 11:59 ` Maxime Ripard
2017-05-03 11:59 ` [PATCH v2 1/20] clk: divider: Make divider_round_rate take the parent clock Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 12:53   ` Chen-Yu Tsai
2017-05-03 12:53     ` Chen-Yu Tsai
2017-05-03 12:53     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 2/20] clk: sunxi-ng: Pass the parent and a pointer to the clocks round rate Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:19   ` Chen-Yu Tsai
2017-05-04  3:19     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 3/20] clk: sunxi-ng: div: Switch to divider_round_rate Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:20   ` Chen-Yu Tsai
2017-05-04  3:20     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 4/20] clk: sunxi-ng: mux: Don't just rely on the parent for CLK_SET_RATE_PARENT Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:23   ` Chen-Yu Tsai
2017-05-04  3:23     ` Chen-Yu Tsai
2017-05-04  3:23     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 5/20] clk: sunxi-ng: mux: split out the pre-divider computation code Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:25   ` Chen-Yu Tsai
2017-05-04  3:25     ` Chen-Yu Tsai
2017-05-04  3:25     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 6/20] clk: sunxi-ng: mux: Change pre-divider application function prototype Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:27   ` Chen-Yu Tsai
2017-05-04  3:27     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 7/20] clk: sunxi-ng: mux: Re-adjust parent rate Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:28   ` Chen-Yu Tsai
2017-05-04  3:28     ` Chen-Yu Tsai
2017-05-04  3:28     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 8/20] clk: sunxi-ng: sun5i: Export video PLLs Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:28   ` Chen-Yu Tsai
2017-05-04  3:28     ` Chen-Yu Tsai
2017-05-04  3:28     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 9/20] drm/sun4i: tcon: Add channel debug Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59 ` [PATCH v2 10/20] drm/sun4i: tcon: Move the muxing out of the mode set function Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:54   ` Chen-Yu Tsai
2017-05-04  3:54     ` Chen-Yu Tsai
2017-05-04  3:54     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 11/20] drm/sun4i: tcon: Switch mux on only for composite Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:57   ` Chen-Yu Tsai
2017-05-04  3:57     ` Chen-Yu Tsai
2017-05-04  3:57     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 12/20] drm/sun4i: tcon: Fix tcon channel 1 backporch calculation Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59 ` [PATCH v2 13/20] drm/sun4i: tcon: Change vertical total size computation inconsistency Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  3:58   ` Chen-Yu Tsai
2017-05-04  3:58     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 14/20] drm/sun4i: tcon: multiply the vtotal when not in interlace Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  4:07   ` Chen-Yu Tsai
2017-05-04  4:07     ` Chen-Yu Tsai
2017-05-04  4:07     ` Chen-Yu Tsai
2017-05-05  8:16   ` icenowy
2017-05-05  8:16     ` icenowy at aosc.io
2017-05-05  8:16     ` icenowy-h8G6r0blFSE
2017-05-03 11:59 ` [PATCH v2 15/20] drm/sun4i: Ignore the generic connectors for components Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  4:11   ` Chen-Yu Tsai
2017-05-04  4:11     ` Chen-Yu Tsai
2017-05-04  4:11     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 16/20] dt-bindings: display: sun4i: Add HDMI display bindings Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-08 16:20   ` Rob Herring
2017-05-08 16:20     ` Rob Herring
2017-05-08 16:20     ` Rob Herring
2017-05-03 11:59 ` [PATCH v2 17/20] dt-bindings: display: sun4i: Add allwinner,tcon-channel property Maxime Ripard
2017-05-03 11:59   ` [PATCH v2 17/20] dt-bindings: display: sun4i: Add allwinner, tcon-channel property Maxime Ripard
2017-05-03 11:59   ` [PATCH v2 17/20] dt-bindings: display: sun4i: Add allwinner,tcon-channel property Maxime Ripard
2017-05-08 16:24   ` Rob Herring
2017-05-08 16:24     ` Rob Herring
2017-05-08 16:24     ` Rob Herring
2017-05-03 11:59 ` [PATCH v2 18/20] drm/sun4i: Add HDMI support Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  7:55   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04  7:55     ` Chen-Yu Tsai
2017-05-04  7:55     ` Chen-Yu Tsai
2017-05-12  6:50     ` [linux-sunxi] " Chen-Yu Tsai
2017-05-12  6:50       ` Chen-Yu Tsai
2017-05-12  6:50       ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 19/20] ARM: sun5i: a10s: Add the HDMI controller node Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  8:04   ` Chen-Yu Tsai
2017-05-04  8:04     ` Chen-Yu Tsai
2017-05-04  8:04     ` Chen-Yu Tsai
2017-05-03 11:59 ` [PATCH v2 20/20] ARM: sun5i: a10s-olinuxino: Enable HDMI Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-03 11:59   ` Maxime Ripard
2017-05-04  8:05   ` [linux-sunxi] " Chen-Yu Tsai
2017-05-04  8:05     ` Chen-Yu Tsai
2017-05-04  8:05     ` Chen-Yu Tsai
2017-05-10 19:23     ` [linux-sunxi] " Maxime Ripard
2017-05-10 19:23       ` Maxime Ripard
2017-05-10 19:23       ` Maxime Ripard
2017-05-11  6:25       ` icenowy
2017-05-11  6:25         ` icenowy at aosc.io
2017-05-11  6:25         ` icenowy-h8G6r0blFSE

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.