Commit b5dcec9c authored by Nicholas Kazlauskas's avatar Nicholas Kazlauskas Committed by Alex Deucher

drm/amd/display: Don't ASSERT when total_planes == AMDGPU_MAX_PLANES

[Why]
Can happen on ASICs with 6 planes, but this isn't a bug since we haven't
written outside the array.

[How]
Use <= instead of <.

Cc: Leo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reported-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Reviewed-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Tested-by: default avatarMichel Dänzer <michel.daenzer@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent c33f5334
......@@ -1915,7 +1915,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
primary_planes = dm->dc->caps.max_streams;
total_planes = primary_planes + overlay_planes;
ASSERT(total_planes < AMDGPU_MAX_PLANES);
ASSERT(total_planes <= AMDGPU_MAX_PLANES);
/*
* Initialize primary planes, implicit planes for legacy IOCTLS.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment