diff options
author | Rob Clark <robdclark@gmail.com> | 2018-02-19 16:17:06 +0300 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2018-03-19 13:33:37 +0300 |
commit | f9cb8d8d836e155f361c3f1bbe0802ae1f98a17e (patch) | |
tree | 21ebe84591bc219d7a362b4347bab42b228ab709 /drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h | |
parent | 79d57bf6fa3bcc0ec5fc3b8140c4df1d696f593b (diff) | |
download | linux-f9cb8d8d836e155f361c3f1bbe0802ae1f98a17e.tar.xz |
drm/msm/mdp5: rework CTL START signal handling
For DSI cmd-mode and writeback, we need to write the CTL's START
register to kick things off, but we only want to do that once both
the encoder and the crtc have a chance to write their corresponding
flush bits. The difficulty is that when there is a full modeset
(ie. encoder state has changed) we want to defer the start until
encoder->enable(). But if only plane's have changed, we want to do
this from crtc->commit().
The start_mask was a previous attempt to handle this, but it didn't
really do the right thing since atomic conversion.
Instead track in the crtc state that the start should be deferred,
set to try from encoder's (or in future writeback's) atomic_check().
This way the state is part of the atomic state, and rollback can
work properly if an atomic test fails.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h')
-rw-r--r-- | drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h index aeb94aa461b5..425a03d213e5 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h @@ -133,6 +133,14 @@ struct mdp5_crtc_state { u32 pp_done_irqmask; bool cmd_mode; + + /* should we not write CTL[n].START register on flush? If the + * encoder has changed this is set to true, since encoder->enable() + * is called after crtc state is committed, but we only want to + * write the CTL[n].START register once. This lets us defer + * writing CTL[n].START until encoder->enable() + */ + bool defer_start; }; #define to_mdp5_crtc_state(x) \ container_of(x, struct mdp5_crtc_state, base) |