Skip to content

drm/tegra: Atomic mode-setting conversion

Thierry Reding dri-devel linux-tegra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest36 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/36clk: Introduce clk_try_parent()drivers/clk/clk.c include/linux/clk.h+50 -011 replies
2/36drm/plane: Make ->atomic_update() mandatorydrivers/gpu/drm/drm_atomic_helper.c+1 -14 replies
3/36drm/plane: Add optional ->atomic_disable() callbackdrivers/gpu/drm/drm_atomic_helper.c drivers/gpu/drm/drm_plane_helper.c include/drm/drm_atomic_helper.h +1 more+57 -23 replies
4/36drm/atomic: Add ->atomic_check() to encoder helpersdrivers/gpu/drm/drm_atomic_helper.c include/drm/drm_crtc_helper.h+22 -71 reply
5/36drm/atomic: Add drm_atomic_plane_get_crtc_state()include/drm/drm_atomic.h+21 -02 replies
6/36drm/tegra: Use tegra_commit_dc() in output driversdrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/dsi.c +3 more+11 -180 replies
7/36drm/tegra: Stop CRTC at CRTC disable timedrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c +2 more+6 -160 replies
8/36drm/tegra: dc: Wait for idle when disableddrivers/gpu/drm/tegra/dc.c+65 -50 replies
9/36drm/tegra: Move tegra_drm_mode_funcs to the coredrivers/gpu/drm/tegra/drm.c drivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/fb.c+23 -210 replies
10/36drm/tegra: dc: No longer disable planes at CRTC disabledrivers/gpu/drm/tegra/dc.c+0 -140 replies
11/36drm/tegra: Convert output midlayer to helpersdrivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/output.c+21 -120 replies
12/36drm/tegra: output: Make ->setup_clock() optionaldrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h+9 -110 replies
13/36drm/tegra: Add tegra_dc_setup_clock() helperdrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h+22 -00 replies
14/36drm/tegra: rgb: Demidlayerdrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/output.c +1 more+161 -1120 replies
15/36drm/tegra: hdmi: Demidlayerdrivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/hdmi.c drivers/gpu/drm/tegra/output.c+147 -1390 replies
16/36drm/tegra: dsi: Demidlayerdrivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/output.c+195 -1690 replies
17/36drm/tegra: sor: Demidlayerdrivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/output.c drivers/gpu/drm/tegra/sor.c+436 -3940 replies
18/36drm/tegra: debugfs cleanup cannot faildrivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c drivers/gpu/drm/tegra/sor.c+9 -270 replies
19/36drm/tegra: Remove remnants of the output midlayerdrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/dsi.c +4 more+32 -2120 replies
20/36drm/tegra: Output cleanup functions cannot faildrivers/gpu/drm/tegra/drm.h drivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c +3 more+13 -320 replies
21/36drm/tegra: dc: Do not needlessly deassert resetdrivers/gpu/drm/tegra/dc.c+0 -40 replies
22/36drm/tegra: Atomic conversion, phase 1drivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.c drivers/gpu/drm/tegra/dsi.c +4 more+223 -1850 replies
23/36drm/tegra: Atomic conversion, phase 2drivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.c drivers/gpu/drm/tegra/dsi.c +3 more+22 -00 replies
24/36drm/tegra: Atomic conversion, phase 3, step 1drivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.c+10 -60 replies
25/36drm/tegra: dc: Store clock setup in atomic statedrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h+77 -30 replies
26/36drm/tegra: rgb: Implement ->atomic_check()drivers/gpu/drm/tegra/rgb.c+42 -00 replies
27/36drm/tegra: dsi: Implement ->atomic_check()drivers/gpu/drm/tegra/dsi.c+196 -730 replies
28/36drm/tegra: hdmi: Implement ->atomic_check()drivers/gpu/drm/tegra/hdmi.c+22 -00 replies
29/36drm/tegra: sor: Implement ->atomic_check()drivers/gpu/drm/tegra/sor.c+22 -00 replies
30/36drm/tegra: dc: Use atomic clock state in modesetdrivers/gpu/drm/tegra/dc.c+37 -00 replies
31/36drm/tegra: Atomic conversion, phase 3, step 2drivers/gpu/drm/tegra/dc.c+1 -10 replies
32/36drm/tegra: Atomic conversion, phase 3, step 3drivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.c drivers/gpu/drm/tegra/drm.h+100 -1190 replies
33/36drm/tegra: Remove unused ->mode_fixup() callbacksdrivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c drivers/gpu/drm/tegra/rgb.c +1 more+0 -1790 replies
34/36drm/tegra: Track active planes in CRTC statedrivers/gpu/drm/tegra/dc.c+44 -283 replies
35/36drm/tegra: Track tiling and format in plane statedrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/drm.h+101 -300 replies
36/36drm/tegra: dc: Unify enabling the display controllerdrivers/gpu/drm/tegra/dc.c drivers/gpu/drm/tegra/dsi.c drivers/gpu/drm/tegra/hdmi.c +2 more+16 -520 replies

Reviews trailers per patch

4 of 36 patches have a Reviewed-by or Acked-by.

PatchDaniel VetterStephen BoydGustavo Padovan
1/36R-b
2/36R-b R-b
3/36R-b R-b R-b R-b
4/36R-b
5/36
6/36
7/36
8/36
9/36
10/36
11/36
12/36
13/36
14/36
15/36
16/36
17/36
18/36
19/36
20/36
21/36
22/36
23/36
24/36
25/36
26/36
27/36
28/36
29/36
30/36
31/36
32/36
33/36
34/36
35/36
36/36

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 00/36] drm/tegra: Atomic mode-setting conversion

From: Thierry Reding <[email protected]>

This series converts the Tegra DRM driver to atomic mode-setting. The size of the is somewhat misleading, because a bunch of preparatory work is included.

The first patch adds a new function to the clk API that allows checking that setting a parent clock can succeed. This is needed to make sure an atomic state can be applied before actually making any changes to the hardware.

Patch 2 makes the plane's ->atomic_update() callback mandatory because there is no use-case in which it makes sense to omit it.

Patches 3 and 4 add additional callbacks for planes and encoders, which are needed by subsequent patches.

Patch 5 adds a helper to obtain the state of the CRTC that a plane is being attached to. This is non-trivial, so a new helper is warranted.

Patches 6 to 21 are preparatory work and cleanup needed to simplify the atomic mode-setting transition.

Patches 22 to 32 are the actual conversion to atomic mode-setting. This is followed-up by patch 33 removing now unused code. Patches 34 and 35 use the ->atomic_check() callbacks to store data that can be reused at the commit stage to avoid having to recompute it. Finally patch 36 can now move some duplicate code from the output drivers to the display controller.

Thierry

Thierry Reding (36):
clk: Introduce clk_try_parent()
drm/plane: Make ->atomic_update() mandatory drm/plane: Add optional ->atomic_disable() callback drm/atomic: Add ->atomic_check() to encoder helpers drm/atomic: Add drm_atomic_plane_get_crtc_state() drm/tegra: Use tegra_commit_dc() in output drivers drm/tegra: Stop CRTC at CRTC disable time drm/tegra: dc: Wait for idle when disabled drm/tegra: Move tegra_drm_mode_funcs to the core drm/tegra: dc: No longer disable planes at CRTC disable drm/tegra: Convert output midlayer to helpers drm/tegra: output: Make ->setup_clock() optional drm/tegra: Add tegra_dc_setup_clock() helper drm/tegra: rgb: Demidlayer
drm/tegra: hdmi: Demidlayer
drm/tegra: dsi: Demidlayer
drm/tegra: sor: Demidlayer
drm/tegra: debugfs cleanup cannot fail drm/tegra: Remove remnants of the output midlayer drm/tegra: Output cleanup functions cannot fail drm/tegra: dc: Do not needlessly deassert reset drm/tegra: Atomic conversion, phase 1 drm/tegra: Atomic conversion, phase 2 drm/tegra: Atomic conversion, phase 3, step 1 drm/tegra: dc: Store clock setup in atomic state drm/tegra: rgb: Implement ->atomic_check() drm/tegra: dsi: Implement ->atomic_check() drm/tegra: hdmi: Implement ->atomic_check() drm/tegra: sor: Implement ->atomic_check() drm/tegra: dc: Use atomic clock state in modeset drm/tegra: Atomic conversion, phase 3, step 2 drm/tegra: Atomic conversion, phase 3, step 3 drm/tegra: Remove unused ->mode_fixup() callbacks drm/tegra: Track active planes in CRTC state drm/tegra: Track tiling and format in plane state drm/tegra: dc: Unify enabling the display controller

 drivers/clk/clk.c                   |   36 ++
 drivers/gpu/drm/drm_atomic_helper.c |   34 +-
 drivers/gpu/drm/drm_plane_helper.c  |   10 +-
 drivers/gpu/drm/tegra/dc.c          |  916 +++++++++++++++++------------
 drivers/gpu/drm/tegra/drm.c         |  105 +++-
 drivers/gpu/drm/tegra/drm.h         |   91 +--
 drivers/gpu/drm/tegra/dsi.c         |  516 ++++++++--------
 drivers/gpu/drm/tegra/fb.c          |   25 +-
 drivers/gpu/drm/tegra/hdmi.c        |  291 +++++----
 drivers/gpu/drm/tegra/output.c      |  156 +----
 drivers/gpu/drm/tegra/rgb.c         |  218 +++----
 drivers/gpu/drm/tegra/sor.c         | 1105 ++++++++++++++++++-----------------
 include/drm/drm_atomic.h            |   21 +
 include/drm/drm_atomic_helper.h     |   37 ++
 include/drm/drm_crtc_helper.h       |    6 +
 include/drm/drm_plane_helper.h      |    3 +
 include/linux/clk.h                 |   14 +
 17 files changed, 1963 insertions(+), 1621 deletions(-)
Signature · 1 line
2.1.3