]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdc12e01322848ef9b1d1ea226ef4676a1d0b9a55
treedc2fd1c3722d63aeb84ca336f3830cbe4a348bc5
parent8731064d4e3567291c2bdc794e14902c7a66d6dc
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