diff options
author | Nicholas Kazlauskas <[email protected]> | 2019-03-05 12:24:08 -0500 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2019-03-19 15:36:48 -0500 |
commit | b5dcec9c90fdb3287cd465ee8d3fb00d33e1133d (patch) | |
tree | 3bbb08db32e454d2b349525fe94f1cfd935676c9 | |
parent | c33f53341790a130e68aafc70cc93916b061a709 (diff) |
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 <[email protected]>
Signed-off-by: Nicholas Kazlauskas <[email protected]>
Reported-by: Michel Dänzer <[email protected]>
Reviewed-by: Michel Dänzer <[email protected]>
Tested-by: Michel Dänzer <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
-rw-r--r-- | drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 279cd6e52c90..8571163cd08f 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -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. |