mirror of
https://github.com/torvalds/linux.git
synced 2026-04-22 16:53:59 -04:00
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>
This commit is contained in:
@@ -59,6 +59,11 @@ struct mdp5_smp_block {
|
||||
|
||||
#define MDP5_INTF_NUM_MAX 5
|
||||
|
||||
struct mdp5_intf_block {
|
||||
uint32_t base[MAX_BASES];
|
||||
u32 connect[MDP5_INTF_NUM_MAX]; /* array of enum mdp5_intf_type */
|
||||
};
|
||||
|
||||
struct mdp5_cfg_hw {
|
||||
char *name;
|
||||
|
||||
@@ -72,9 +77,7 @@ struct mdp5_cfg_hw {
|
||||
struct mdp5_sub_block dspp;
|
||||
struct mdp5_sub_block ad;
|
||||
struct mdp5_sub_block pp;
|
||||
struct mdp5_sub_block intf;
|
||||
|
||||
u32 intfs[MDP5_INTF_NUM_MAX]; /* array of enum mdp5_intf_type */
|
||||
struct mdp5_intf_block intf;
|
||||
|
||||
uint32_t max_clk;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user