Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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.