mirror_ubuntu-kernels/drivers/gpu/drm
Douglas Anderson bfc12020e6 drm/msm/dp: Return IRQ_NONE for unhandled interrupts
If our interrupt handler gets called and we don't really handle the
interrupt then we should return IRQ_NONE. The current interrupt
handler didn't do this, so let's fix it.

NOTE: for some of the cases it's clear that we should return IRQ_NONE
and some cases it's clear that we should return IRQ_HANDLED. However,
there are a few that fall somewhere in between. Specifically, the
documentation for when to return IRQ_NONE vs. IRQ_HANDLED is probably
best spelled out in the commit message of commit d9e4ad5bad ("Document
that IRQ_NONE should be returned when IRQ not actually handled"). That
commit makes it clear that we should return IRQ_HANDLED if we've done
something to make the interrupt stop happening.

The case where it's unclear is, for instance, in dp_aux_isr() after
we've read the interrupt using dp_catalog_aux_get_irq() and confirmed
that "isr" is non-zero. The function dp_catalog_aux_get_irq() not only
reads the interrupts but it also "ack"s all the interrupts that are
returned. For an "unknown" interrupt this has a very good chance of
actually stopping the interrupt from happening. That would mean we've
identified that it's our device and done something to stop them from
happening and should return IRQ_HANDLED. Specifically, it should be
noted that most interrupts that need "ack"ing are ones that are
one-time events and doing an "ack" is enough to clear them. However,
since these interrupts are unknown then, by definition, it's unknown
if "ack"ing them is truly enough to clear them. It's possible that we
also need to remove the original source of the interrupt. In this
case, IRQ_NONE would be a better choice.

Given that returning an occasional IRQ_NONE isn't the absolute end of
the world, however, let's choose that course of action. The IRQ
framework will forgive a few IRQ_NONE returns now and again (and it
won't even log them, which is why we have to log them ourselves). This
means that if we _do_ end hitting an interrupt where "ack"ing isn't
enough the kernel will eventually detect the problem and shut our
device down.

Signed-off-by: Douglas Anderson <dianders@chromium.org>
Tested-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Reviewed-by: Kuogee Hsieh <quic_khsieh@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/520660/
Link: https://lore.kernel.org/r/20230126170745.v2.2.I2d7aec2fadb9c237cd0090a47d6a8ba2054bf0f8@changeid
[DB: reformatted commit message to make checkpatch happy]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2023-04-06 20:29:44 +03:00
..
amd Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
arm drm/arm/malidp: use sysfs_emit in show function callback 2023-02-03 13:05:33 +00:00
armada drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini() 2023-02-21 13:26:18 +01:00
aspeed drm/aspeed: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
ast Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
atmel-hlcdc drm: atmel-hlcdc: Remove #ifdef guards for PM related functions 2022-12-12 12:30:56 +00:00
bridge Merge remote-tracking branch 'drm/drm-next' into msm-next 2023-03-20 10:31:25 -07:00
display drm/display: Don't block HDR_OUTPUT_METADATA on unknown EOTF 2023-03-07 15:54:18 -05:00
etnaviv - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
exynos - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
fsl-dcu hardening updates for v6.2-rc1 2022-12-14 12:20:00 -08:00
gma500 - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
gud drm/gud: use new debugfs device-centered functions 2023-01-06 16:15:08 -03:00
hisilicon drm: Only select I2C_ALGOBIT for drivers that actually need it 2023-01-10 11:15:44 +01:00
hyperv Drivers: hv: Make remove callback of hyperv driver void returned 2023-01-17 13:41:27 +00:00
i2c drm-misc-next for $kernel-version: 2023-01-24 17:36:29 +01:00
i915 Cross-subsystem Changes: 2023-03-15 14:59:31 +10:00
imx drm/imx/dcss: Don't call dev_set_drvdata(..., NULL); 2023-01-10 16:26:06 +02:00
ingenic drm/ingenic: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
kmb drm/kmb: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
lib
lima Revert "drm/shmem-helper: Switch to reservation lock" 2023-02-28 16:41:32 +01:00
logicvc drm/logicvc: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:31 +01:00
mcde drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
mediatek - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
meson drm/meson/meson_venc: Relax the supported mode checks 2023-03-06 09:44:08 +01:00
mgag200 drm/mgag200: Implement struct drm_plane_helper_funcs.atomic_enable 2023-02-20 15:20:41 +01:00
msm drm/msm/dp: Return IRQ_NONE for unhandled interrupts 2023-04-06 20:29:44 +03:00
mxsfb drm/mxsfb: improve clk handling for axi clk 2023-01-10 11:04:56 +01:00
nouveau Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
omapdrm drm-next-fixes for 6.3-rc1 2023-03-02 15:08:54 -08:00
panel Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
panfrost Revert "drm/shmem-helper: Switch to reservation lock" 2023-02-28 16:41:32 +01:00
pl111 drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
qxl drm/qxl: handle NULL bo->resource in move callback 2023-02-23 10:29:14 +01:00
radeon Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
rcar-du Renesas R-Car DU fixes and improvements 2023-01-30 13:49:56 +10:00
rockchip Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
scheduler Merge tag 'dma-fence-deadline' into HEAD 2023-03-28 15:45:53 -07:00
shmobile drm/shmobile: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
solomon drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
sprd drm/sprd: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
sti hardening updates for v6.2-rc1 2022-12-14 12:20:00 -08:00
stm drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
sun4i drm/sun4i: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
tegra IOMMU Updates for Linux v6.3: 2023-02-24 13:40:13 -08:00
tests drm/format-helper: Use KUNIT_EXPECT_MEMEQ macro 2023-02-02 07:40:15 -03:00
tidss drm/tidss: Implement struct drm_plane_helper_funcs.atomic_enable 2023-02-20 15:20:45 +01:00
tilcdc drm: tilcdc: Remove #ifdef guards for PM related functions 2022-12-12 13:07:02 +00:00
tiny Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
ttm Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
tve200 drm/fb-helper: Move generic fbdev emulation into separate source file 2022-11-05 17:12:04 +01:00
udl drm/udl: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
v3d drm/v3d: Use drm_sched_job_add_syncobj_dependency() 2023-02-24 17:23:43 -03:00
vboxvideo drm/vboxvideo: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:32 +01:00
vc4 Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
vgem drm/vgem: add missing mutex_destroy 2023-02-10 08:21:04 -03:00
virtio Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
vkms drm/vkms: reintroduce prepare_fb and cleanup_fb functions 2023-01-12 09:46:19 -01:00
vmwgfx Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
xen mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
xlnx drm-misc-next for 6.2: 2022-11-16 07:17:32 +10:00
drm_agpsupport.c
drm_aperture.c
drm_atomic_helper.c Merge tag 'dma-fence-deadline' into HEAD 2023-03-28 15:45:53 -07:00
drm_atomic_state_helper.c drm/atomic-helper: fix kernel-doc problems 2023-01-19 09:16:04 +01:00
drm_atomic_uapi.c drm/connector: Add TV standard property 2022-11-24 12:42:39 +01:00
drm_atomic.c Merge remote-tracking branch 'drm/drm-next' into msm-next 2023-03-20 10:31:25 -07:00
drm_auth.c
drm_blend.c drm/drm_blend: Remove usage of deprecated DRM_DEBUG_ATOMIC 2023-01-10 16:14:13 +01:00
drm_bridge_connector.c drm/bridge_connector: drop drm_bridge_connector_en/disable_hpd() 2023-01-05 15:08:10 +01:00
drm_bridge.c drm/bridge: Document the expected behaviour of DSI host controllers 2022-12-08 09:56:57 +01:00
drm_buddy.c drm: Optimize drm buddy top-down allocation method 2023-01-12 13:50:28 +01:00
drm_bufs.c drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_cache.c
drm_client_modeset.c drm/client: Remove match on mode name 2022-11-24 12:42:40 +01:00
drm_client.c drm next for 6.3-rc1 2023-02-22 18:28:03 -08:00
drm_color_mgmt.c
drm_connector.c drm: remove outdated doc TODO for subconnector property 2023-03-05 11:27:30 +01:00
drm_context.c drm/nouveau: Remove support for legacy contexts/buffers 2023-01-13 09:22:02 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c drm/fb-helper: Remove unnecessary include statements 2022-11-05 17:12:04 +01:00
drm_crtc_internal.h drm/edid: move edid load declarations to internal header 2022-10-26 09:53:56 +03:00
drm_crtc.c
drm_damage_helper.c
drm_debugfs_crc.c
drm_debugfs.c drm/debugfs: use octal permissions instead of symbolic permissions 2023-01-10 09:57:05 -03:00
drm_displayid.c drm/displayid: provide access to DisplayID version and primary use case 2023-02-27 02:58:38 +03:00
drm_dma.c
drm_drv.c drm-misc-next for v6.3: 2023-01-04 14:59:25 +01:00
drm_dumb_buffers.c drm: remove dumb_destroy callback 2023-02-10 12:19:27 +01:00
drm_edid_load.c drm/edid/firmware: stop using a throwaway platform device 2022-11-16 14:54:44 +02:00
drm_edid.c drm/edid: Fix csync detailed mode parsing 2023-03-01 14:33:15 +02:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_dma_helper.c
drm_fb_helper.c drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini() 2023-02-21 13:26:18 +01:00
drm_fbdev_generic.c drm/fb-helper: Remove drm_fb_helper_unprepare() from drm_fb_helper_fini() 2023-02-21 13:26:18 +01:00
drm_file.c drm-misc-next for v6.3: 2023-01-16 15:33:28 +10:00
drm_flip_work.c
drm_format_helper.c drm/format-helper: Support the AB24/XB24 formats 2023-01-23 15:02:41 +01:00
drm_fourcc.c drm/fourcc: Add missing big-endian XRGB1555 and RGB565 formats 2022-11-23 20:34:46 +01:00
drm_framebuffer.c drm: use new debugfs device-centered functions on DRM core files 2022-12-22 14:58:21 -03:00
drm_gem_atomic_helper.c drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_gem_dma_helper.c - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
drm_gem_framebuffer_helper.c drm/fb-helper: Remove unnecessary include statements 2022-11-05 17:12:04 +01:00
drm_gem_shmem_helper.c Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
drm_gem_ttm_helper.c drm/ttm: merge ttm_bo_api.h and ttm_bo_driver.h v2 2022-12-06 12:54:14 +01:00
drm_gem_vram_helper.c drm/gem-vram: handle NULL bo->resource in move callback 2023-02-23 10:29:00 +01:00
drm_gem.c drm/gem: Export drm_gem_lru_move_tail_locked() 2023-03-25 16:31:44 -07:00
drm_hashtab.c
drm_internal.h drm: remove dumb_destroy callback 2023-02-10 12:19:27 +01:00
drm_ioc32.c drm: Replace DRM_DEBUG with drm_dbg_core in file and ioctl handling 2023-01-03 18:20:57 +01:00
drm_ioctl.c drm: Replace DRM_DEBUG with drm_dbg_core in file and ioctl handling 2023-01-03 18:20:57 +01:00
drm_irq.c
drm_kms_helper_common.c
drm_lease.c drm: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:30 +01:00
drm_legacy_misc.c
drm_legacy.h
drm_lock.c
drm_managed.c
drm_memory.c
drm_mipi_dbi.c drm/mipi-dbi: Support separate I/O regulator 2022-12-14 14:57:09 +01:00
drm_mipi_dsi.c Driver core changes for 6.3-rc1 2023-02-24 12:58:55 -08:00
drm_mm.c
drm_mode_config.c drm/debugfs: create debugfs late register functions 2022-12-22 14:58:55 -03:00
drm_mode_object.c
drm_modes.c drm: Fix comment on mode parsing 2023-02-20 14:56:52 +01:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c drm: of: Add drm_of_get_dsi_bus helper function 2023-01-27 09:39:21 +01:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for Lenovo IdeaPad Duet 3 10IGL5 2023-02-15 10:46:05 +01:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm: Remove unnecessary include statements for drm_crtc_helper.h 2023-01-18 09:25:30 +01:00
drm_plane.c drm/docs: Explicitly document default CRTC background behavior 2023-01-04 16:12:15 +00:00
drm_prime.c drm: Assert held reservation lock for dma-buf mmapping 2022-11-11 23:49:47 +03:00
drm_print.c
drm_privacy_screen_x86.c
drm_privacy_screen.c
drm_probe_helper.c drm/probe-helper: Cancel previous job before starting new one 2023-02-27 16:19:14 +01:00
drm_property.c
drm_rect.c gpu/drm: fix repeated words in comments 2022-10-24 09:27:04 +02:00
drm_scatter.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c drm/simple-kms: Remove drm_gem_simple_display_pipe_prepare_fb() 2022-12-05 13:35:37 +01:00
drm_suballoc.c drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper 2023-03-01 17:18:19 +01:00
drm_syncobj.c
drm_sysfs.c Driver Core changes for 6.2-rc1 2022-12-16 03:54:54 -08:00
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c drm/vblank: Add helper to get next vblank time 2023-03-28 14:52:59 -07:00
drm_vm.c mm: replace vma->vm_flags direct modifications with modifier calls 2023-02-09 16:51:39 -08:00
drm_vma_manager.c drm/drm_vma_manager: Add drm_vma_node_allow_once() 2023-01-19 14:16:55 +01:00
drm_writeback.c
Kconfig Merge tag 'drm-misc-next-2023-03-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next 2023-03-14 12:18:54 +10:00
Makefile drm/suballoc: Extract amdgpu_sa.c as generic suballocation helper 2023-03-01 17:18:19 +01:00