mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6
[ Upstream commit 84723eb6068c50610c5c0893980d230d7afa2105 ] [Why] Coverity reports OVERRUN warning. Should abort amdgpu_dm initialize. [How] Return failure to amdgpu_dm_init. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Acked-by: Tom Chung <chiahsuan.chung@amd.com> Signed-off-by: Hersen Wu <hersenxs.wu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
276e3fd93e
commit
28b515c458
@@ -4359,7 +4359,10 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
|
|||||||
|
|
||||||
/* There is one primary plane per CRTC */
|
/* There is one primary plane per CRTC */
|
||||||
primary_planes = dm->dc->caps.max_streams;
|
primary_planes = dm->dc->caps.max_streams;
|
||||||
ASSERT(primary_planes <= AMDGPU_MAX_PLANES);
|
if (primary_planes > AMDGPU_MAX_PLANES) {
|
||||||
|
DRM_ERROR("DM: Plane nums out of 6 planes\n");
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize primary planes, implicit planes for legacy IOCTLS.
|
* Initialize primary planes, implicit planes for legacy IOCTLS.
|
||||||
|
|||||||
Reference in New Issue
Block a user