]> asedeno.scripts.mit.edu Git - linux.git/commit
drm/msm/mdp5: Prepare for dynamic assignment of mixers
authorArchit Taneja <architt@codeaurora.org>
Thu, 23 Mar 2017 10:28:02 +0000 (15:58 +0530)
committerRob Clark <robdclark@gmail.com>
Sat, 8 Apr 2017 10:59:34 +0000 (06:59 -0400)
commit894558ec8c4f3e482299905d7f86b7d1c57e1c2f
tree18dbc383d14228c5bd2b4d43dbbe09bdc14131aa
parentc1e2a13090e47ec35539e470dc7f4781662e5219
drm/msm/mdp5: Prepare for dynamic assignment of mixers

Add the stuff needed to allow dynamically assigning a mixer to a CRTC.

Since mixers are a resource that can be shared across multiple CRTCs, we
need to maintain a 'hwmixer_to_crtc' map in the global atomic state,
acquire the mdp5_kms.state_lock modeset lock and so on.

The mixer is assigned in the CRTC's atomic_check() func, a failure will
result in the new state being cleanly rolled back.

The mixer assignment itself is straightforward, and almost identical to
what we do for hwpipes. We don't need to grab the old hwmixer_to_crtc
state like we do in hwpipes since we don't need to compare anything
with the old state at the moment.

The only LM capability we care about at the moment is whether the mixer
instance can be used to display stuff (i.e, connect to an INTF
downstream).

Signed-off-by: Archit Taneja <architt@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h
drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_mixer.h