mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 20:10:23 +09:00
drm/amd/display: Fix a bug when searching for insert_above_mpcc
commit 3d028d5d60 upstream.
[WHY]
Currently, when insert_plane is called with insert_above_mpcc
parameter that is equal to tree->opp_list, the function returns NULL.
[HOW]
Instead, the function should insert the plane at the top of the tree.
Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Jun Lei <jun.lei@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Wesley Chalmers <wesley.chalmers@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0b8e09b39e
commit
893978f1b4
@@ -207,8 +207,9 @@ struct mpcc *mpc1_insert_plane(
|
||||
/* check insert_above_mpcc exist in tree->opp_list */
|
||||
struct mpcc *temp_mpcc = tree->opp_list;
|
||||
|
||||
while (temp_mpcc && temp_mpcc->mpcc_bot != insert_above_mpcc)
|
||||
temp_mpcc = temp_mpcc->mpcc_bot;
|
||||
if (temp_mpcc != insert_above_mpcc)
|
||||
while (temp_mpcc && temp_mpcc->mpcc_bot != insert_above_mpcc)
|
||||
temp_mpcc = temp_mpcc->mpcc_bot;
|
||||
if (temp_mpcc == NULL)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user