drm/amd/display: add null check for invalid opps
authorSamson Tam <samson.tam@amd.com>
Fri, 6 Oct 2023 21:36:16 +0000 (17:36 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Oct 2023 23:00:31 +0000 (19:00 -0400)
commit8d0f4cd2ae44ebe50ff85a49fb248e64f28b6d66
treebe5c48cb48d4415852c6a2571011c1c1069f8a3e
parentf583db812bc9a97384303761932768e44d1d92a3
drm/amd/display: add null check for invalid opps

[Why]
In cases where number of pipes available is less
 than num_opp, there will opp instances that are
 null

[How]
Add null check to skip over these opp instances

Fixes: 40de8403b998 ("drm/amd/display: Update OPP counter from new interface")
Reviewed-by: Alvin Lee <alvin.lee2@amd.com>
Acked-by: Roman Li <roman.li@amd.com>
Signed-off-by: Samson Tam <samson.tam@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c