Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: Register VUPDATE_NO_LOCK interrupts for DCN2

[Why]
These are needed to send back DRM vblank events in the case where VRR
is on. Without the interrupt enabled we're deferring the events into the
vblank queue and userspace is left waiting forever to get back the
events they need.

Found using igt@kms_vrr - the test fails immediately due to vblank
timeout.

[How]
Register them the same way we're handling it for DCN1.

This fixes igt@kms_vrr for DCN2.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: David Francis <David.Francis@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Nicholas Kazlauskas and committed by
Alex Deucher
e40837af 54461859

+18 -10
+18 -10
drivers/gpu/drm/amd/display/dc/irq/dcn20/irq_service_dcn20.c
··· 167 167 .ack = NULL 168 168 }; 169 169 170 + static const struct irq_source_info_funcs vupdate_no_lock_irq_info_funcs = { 171 + .set = NULL, 172 + .ack = NULL 173 + }; 174 + 170 175 #undef BASE_INNER 171 176 #define BASE_INNER(seg) DCN_BASE__INST0_SEG ## seg 172 177 ··· 226 221 .funcs = &pflip_irq_info_funcs\ 227 222 } 228 223 229 - #define vupdate_int_entry(reg_num)\ 224 + /* vupdate_no_lock_int_entry maps to DC_IRQ_SOURCE_VUPDATEx, to match semantic 225 + * of DCE's DC_IRQ_SOURCE_VUPDATEx. 226 + */ 227 + #define vupdate_no_lock_int_entry(reg_num)\ 230 228 [DC_IRQ_SOURCE_VUPDATE1 + reg_num] = {\ 231 229 IRQ_REG_ENTRY(OTG, reg_num,\ 232 - OTG_GLOBAL_SYNC_STATUS, VUPDATE_INT_EN,\ 233 - OTG_GLOBAL_SYNC_STATUS, VUPDATE_EVENT_CLEAR),\ 234 - .funcs = &vblank_irq_info_funcs\ 230 + OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_INT_EN,\ 231 + OTG_GLOBAL_SYNC_STATUS, VUPDATE_NO_LOCK_EVENT_CLEAR),\ 232 + .funcs = &vupdate_no_lock_irq_info_funcs\ 235 233 } 236 234 237 235 #define vblank_int_entry(reg_num)\ ··· 341 333 dc_underflow_int_entry(6), 342 334 [DC_IRQ_SOURCE_DMCU_SCP] = dummy_irq_entry(), 343 335 [DC_IRQ_SOURCE_VBIOS_SW] = dummy_irq_entry(), 344 - vupdate_int_entry(0), 345 - vupdate_int_entry(1), 346 - vupdate_int_entry(2), 347 - vupdate_int_entry(3), 348 - vupdate_int_entry(4), 349 - vupdate_int_entry(5), 336 + vupdate_no_lock_int_entry(0), 337 + vupdate_no_lock_int_entry(1), 338 + vupdate_no_lock_int_entry(2), 339 + vupdate_no_lock_int_entry(3), 340 + vupdate_no_lock_int_entry(4), 341 + vupdate_no_lock_int_entry(5), 350 342 vblank_int_entry(0), 351 343 vblank_int_entry(1), 352 344 vblank_int_entry(2),