drm/msm/mdp5: Fix iteration on INTF config array
authorStephane Viau <sviau@codeaurora.org>
Thu, 30 Apr 2015 17:45:52 +0000 (13:45 -0400)
committerRob Clark <robdclark@gmail.com>
Thu, 14 May 2015 15:29:20 +0000 (11:29 -0400)
commitfe34464df5e8bd4b09db170477f32db4eade0444
treedc2fd1c3722d63aeb84ca336f3830cbe4a348bc5
parent651ad3f52b9d0b11b8ebe94c3810ac89f9f75653
drm/msm/mdp5: Fix iteration on INTF config array

The current iteration in get_dsi_id_from_intf() is wrong:
instead of iterating until hw_cfg->intf.count, we need to iterate
until MDP5_INTF_NUM_MAX here.

Let's take the example of msm8x16:

 hw_cfg->intf.count = 1
 intfs[0] = INTF_Disabled
 intfs[1] = INTF_DSI

If we stop iterating once i reaches hw_cfg->intf.count (== 1),
we will miss the test for intfs[1].

Actually, this hw_cfg->intf.count entry is quite confusing and is not
(or *should not be*) used anywhere else; let's remove it.

Signed-off-by: Stephane Viau <sviau@codeaurora.org>
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.c
drivers/gpu/drm/msm/mdp/mdp5/mdp5_cfg.h
drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c