mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-24 11:02:51 +00:00
It is possible that adev->dm.dc->caps.max_links is greater than AMDGPU_MAX_CRTCS. So, to not potentially access unallocated memory use adev->mode_info.num_crtc to do the bounds check instead of adev->dm.dc->caps.max_links. Fixes:1b11ff764a("drm/amd/display: Implement multiple secure display") Fixes:b8ff7e08ba("drm/amd/display: Fix when disabling secure_display") Reviewed-by: Alan Liu <HaoPing.Liu@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>