aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/fpga/tests/fpga-mgr-test.c
diff options
context:
space:
mode:
authorJanne Grunau <[email protected]>2025-04-28 11:37:14 +0000
committerAlyssa Rosenzweig <[email protected]>2025-04-28 18:17:52 +0000
commit7a7d6681d5adde7dc7e648dcc6b9e9be6ca93d5d (patch)
treecdd512f22609ca7c1110853bdad995813ebc73a3 /drivers/fpga/tests/fpga-mgr-test.c
parentdrm: adp: Use spin_lock_irqsave for drm device event_lock (diff)
downloadkernel-7a7d6681d5adde7dc7e648dcc6b9e9be6ca93d5d.tar.gz
kernel-7a7d6681d5adde7dc7e648dcc6b9e9be6ca93d5d.zip
drm: adp: Handle drm_crtc_vblank_get() errors
drm_crtc_vblank_get() may fail when it's called before drm_crtc_vblank_on() on a resetted CRTC. This occurs in drm_crtc_helper_funcs' atomic_flush() calls after drm_atomic_helper_crtc_reset() for example directly after probe. Send the vblank event directly in such cases. Avoids following warning in the subsequent drm_crtc_vblank_put() call from the vblank irq handler as below: adp 228200000.display-pipe: [drm] drm_WARN_ON(atomic_read(&vblank->refcount) == 0) WARNING: CPU: 5 PID: 1206 at drivers/gpu/drm/drm_vblank.c:1247 drm_vblank_put+0x158/0x170 ... Call trace: drm_vblank_put+0x158/0x170 (P) drm_crtc_vblank_put+0x24/0x38 adp_fe_irq+0xd8/0xe8 [adpdrm] __handle_irq_event_percpu+0x94/0x318 handle_irq_event+0x54/0xd0 handle_fasteoi_irq+0xa8/0x240 handle_irq_desc+0x3c/0x68 generic_handle_domain_irq+0x24/0x40 Modifying `crtc->state->event` here is fine as crtc->mutex is locked by the non-async atomic commit. In retrospect this looks so obvious that it doesn't warrant a comment in the file. Signed-off-by: Janne Grunau <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'drivers/fpga/tests/fpga-mgr-test.c')
0 files changed, 0 insertions, 0 deletions