alistair23-linux/drivers/gpu/drm
Oscar Mateo 96606f3beb drm/i915/icl: Deal with GT INT DW correctly
BSpec says:

"Second level interrupt events are stored in the GT INT DW. GT INT DW is
a double buffered structure. A snapshot of events is taken when SW reads
GT INT DW. From the time of read to the time of SW completely clearing
GT INT DW (to indicate end of service), all incoming interrupts are logged
in a secondary storage structure. this guarantees that the record of
interrupts SW is servicing will not change while under service".

We read GT INT DW in several places now:

- The IRQ handler (banks 0 and 1) where, hopefully, it is completely
  cleared (operation now covered with the irq lock).
- The 'reset' interrupts functions for RPS and GuC logs, where we clear
  the bit we are interested in and leave the others for the normal
  interrupt handler.
- The 'enable' interrupts functions for RPS and GuC logs, as a measure
  of precaution. Here we could relax a bit and don't check GT INT DW
  at all or, if we do, at least we should clear the offending bit
  (which is what this patch does).

Note that, if every bit is cleared on reading GT INT DW, the register
won't be locked. Also note that, according to the BSpec, GT INT DW
cannot be cleared without first servicing the Selector & Shared IIR
registers.

v2:
  - Remove some code duplication (Tvrtko)
  - Make sure GT_INTR_DW are protected by the irq spinlock, since it's a
    global resource (Tvrtko)

v3: Optimize the spinlock (Tvrtko)

v4: Rebase.
v5:
  - take spinlock on outer scope to please sparse (Mika)
  - use raw_reg accessors (Mika)
v6: omit the continue in looping banks (Michel)

Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v4)
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180406093237.14548-1-mika.kuoppala@linux.intel.com
2018-04-06 15:33:25 +03:00
..
amd Merge tag 'drm-amdkfd-next-2018-03-27' of git://people.freedesktop.org/~gabbayo/linux into drm-next 2018-03-28 14:49:19 +10:00
arc
arm drm: mali-dp: Add YUV->RGB conversion support for video layers 2018-03-14 11:41:01 +00:00
armada drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
ast Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
atmel-hlcdc
bochs drm/ttm: add bo as parameter to the ttm_tt_create callback 2018-03-14 14:38:27 -05:00
bridge drm/bridge: dw-hdmi: Remove unused hdmi_enable_overflow_interrupts() 2018-03-15 09:45:11 +01:00
cirrus Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
etnaviv drm/etnaviv: bump HW job limit to 4 2018-03-22 11:08:48 +01:00
exynos Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
fsl-dcu
gma500
hisilicon drm/ttm: add bo as parameter to the ttm_tt_create callback 2018-03-14 14:38:27 -05:00
i2c
i810
i915 drm/i915/icl: Deal with GT INT DW correctly 2018-04-06 15:33:25 +03:00
imx Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
lib
mediatek drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
meson Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
mga
mgag200 drm/ttm: add bo as parameter to the ttm_tt_create callback 2018-03-14 14:38:27 -05:00
msm Merge tag 'drm-msm-next-2018-03-20' of git://people.freedesktop.org/~robclark/linux into drm-next 2018-03-21 14:06:00 +10:00
mxsfb
nouveau Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
omapdrm drm/omap: fix compile error when DPI is disabled 2018-03-14 10:39:50 +02:00
panel drm/panel: rm68200: Add backlight dependency 2018-03-14 11:51:24 +01:00
pl111 drm/pl111: Use max memory bandwidth for resolution 2018-03-07 23:14:24 +01:00
qxl Merge airlied/drm-next into drm-misc-next 2018-03-21 09:40:55 -04:00
r128
radeon Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
rcar-du drm-misc-next for 4.17: 2018-03-14 10:59:16 +10:00
rockchip drm/rockchip: cdn-dp: remove the DP phy switch 2018-03-16 11:51:11 +01:00
savage
scheduler
selftests
shmobile
sis
sti
stm
sun4i Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
tdfx
tegra Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
tilcdc drm/tilcdc: tilcdc_panel: Rename device from "panel" to "tilcdc-panel" 2018-02-28 11:48:25 +02:00
tinydrm tinydrm: add backlight dependency 2018-02-28 15:08:56 -05:00
ttm drm/ttm: Export the ttm_k[un]map_atomic_prot API. 2018-03-22 11:10:06 +01:00
tve200
udl drm: udl: Properly check framebuffer mmap offsets 2018-03-22 07:59:01 +01:00
vc4 drm/vc4_validate: Remove VLA usage 2018-03-16 15:51:52 -07:00
vgem
via
virtio Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
vmwgfx Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
zte drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic.c drm: Verify gamma/degamma LUT size 2018-03-16 15:44:01 +02:00
drm_atomic_helper.c drm: Remove now pointelss blob->data casts 2018-03-16 15:44:01 +02:00
drm_auth.c
drm_blend.c
drm_bridge.c
drm_bufs.c drm: dma_bufs: Fixed checkpatch issues 2018-03-19 09:31:20 -04:00
drm_cache.c
drm_color_mgmt.c drm/atomic: Include color encoding/range in plane state dump 2018-03-02 14:41:21 +02:00
drm_connector.c
drm_context.c
drm_crtc.c drm: Check that the plane supports the request format+modifier combo 2018-02-26 16:29:47 +02:00
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h drm/atomic: Include color encoding/range in plane state dump 2018-03-02 14:41:21 +02:00
drm_debugfs.c
drm_debugfs_crc.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c
drm_drv.c drm: NULL pointer dereference [null-pointer-deref] (CWE 476) problem 2018-03-06 08:14:16 +01:00
drm_dumb_buffers.c
drm_edid.c Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm: Remove now pointelss blob->data casts 2018-03-16 15:44:01 +02:00
drm_file.c
drm_flip_work.c
drm_fourcc.c
drm_framebuffer.c Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
drm_gem.c
drm_gem_cma_helper.c
drm_gem_framebuffer_helper.c
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c
drm_kms_helper_common.c
drm_lease.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
drm_mode_config.c
drm_mode_object.c
drm_modes.c drm: Fix uabi regression by allowing garbage mode->type from userspace 2018-03-23 13:51:12 +02:00
drm_modeset_helper.c
drm_modeset_lock.c drm/atomic: Call ww_acquire_done after drm_modeset_lock_all 2018-03-05 10:35:32 +01:00
drm_of.c drm: of: simplify component probe code 2018-03-06 14:05:00 +05:30
drm_panel.c
drm_panel_orientation_quirks.c drm: Include the header with the prototype for drm_get_panel_orientation_quirk() 2018-02-26 17:39:59 +02:00
drm_pci.c
drm_plane.c Merge airlied/drm-next into drm-misc-next 2018-03-21 09:40:55 -04:00
drm_plane_helper.c drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
drm_prime.c drm/prime: make the pages array optional for drm_prime_sg_to_page_addr_arrays 2018-03-06 12:24:52 -05:00
drm_print.c drm: Reduce object size of DRM_DEV_<LEVEL> uses 2018-03-19 15:15:42 +01:00
drm_probe_helper.c Linux 4.16-rc7 2018-03-28 14:30:41 +10:00
drm_property.c Revert "drm: Use a flexible array member for blob property data" 2018-03-16 15:44:01 +02:00
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_simple_kms_helper.c drm: Don't pass clip to drm_atomic_helper_check_plane_state() 2018-03-05 20:48:25 +02:00
drm_syncobj.c
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c Merge tag 'drm-intel-next-2018-03-08' of git://anongit.freedesktop.org/drm/drm-intel into drm-next 2018-03-14 14:53:01 +10:00
drm_vm.c
drm_vma_manager.c
Kconfig
Makefile