OSDN Git Service

drm/amd/display: Cap pflip irqs per max otg number
authorRoman Li <Roman.Li@amd.com>
Wed, 2 Feb 2022 19:30:09 +0000 (14:30 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 9 Feb 2022 20:09:42 +0000 (15:09 -0500)
commit328e34a5ad227399391891d454043e5d73e598d2
treed97ca4cf0e6809e19ab3ddc77bbb81bede5bb9c7
parenta072312f43c33ea02ad88bff3375f650684a6f24
drm/amd/display: Cap pflip irqs per max otg number

[Why]
pflip interrupt order are mapped 1 to 1 to otg id.
e.g. if irq_src=26 corresponds to otg0 then 27->otg1, 28->otg2...

Linux DM registers pflip interrupts per number of crtcs.
In fused pipe case crtc numbers can be less than otg id.

e.g. if one pipe out of 3(otg#0-2) is fused adev->mode_info.num_crtc=2
so DM only registers irq_src 26,27.
This is a bug since if pipe#2 remains unfused DM never gets
otg2 pflip interrupt (irq_src=28)
That may results in gfx failure due to pflip timeout.

[How]
Register pflip interrupts per max num of otg instead of num_crtc

Signed-off-by: Roman Li <Roman.Li@amd.com>
Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h