]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Use pipe_count for num of opps
authorNoah Abradjian <noah.abradjian@amd.com>
Fri, 22 Nov 2019 16:47:52 +0000 (11:47 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2019 21:09:08 +0000 (16:09 -0500)
commitd44ebd00428060d2fc954df084839a0e7cd23374
tree3d223eeb7c4a87ac2c0a205ceca712b6b825101f
parentff6953fe45f1c2dc831242970db66b01d39dd56e
drm/amd/display: Use pipe_count for num of opps

[Why]
There is one opp per pipe. For certain RN parts, the fourth pipe is disabled, so there is no opp for it.
res_cap->num_opp is hardcoded to 4, so if we use that to iterate over opps we will crash.

[How]
Use the pipe_count value instead, which is not hardcoded and so will have the correct number.

Signed-off-by: Noah Abradjian <noah.abradjian@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c