drm/msm/mdp5: Create only as many CRTCs as we need
authorArchit Taneja <architt@codeaurora.org>
Tue, 6 Dec 2016 06:45:54 +0000 (12:15 +0530)
committerRob Clark <robdclark@gmail.com>
Mon, 6 Feb 2017 16:28:43 +0000 (11:28 -0500)
commite5366ffe50cc1fff906d7bb45a670861a2174395
treebf681b93f089213be5acabdab960f07e047cea70
parent710a651fdd6958c8530c72c62970b785179fce9f
drm/msm/mdp5: Create only as many CRTCs as we need

We currently create CRTCs equaling to the # of Layer Mixer blocks we
have on the MDP5 HW. This number is generally more than the # of encoders
(INTFs) we have in the MDSS HW. The number of encoders connected to
displays on the platform (as described by DT) would be even lesser.

Create only N drm_crtcs, where N is the number of drm_encoders
successfully registered. To do this, we call modeset_init_intf() before
we init the drm_crtcs and drm_planes.

Because of this change, setting encoder->possible_crtcs needs to be moved
from construct_encoder() to a later point when we know how many CRTCs we
have.

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