linux/drivers/gpu/drm
Ville Syrjälä 21556350ad drm/i915: Disable LP3 watermarks on all SNB machines
I have a Thinkpad X220 Tablet in my hands that is losing vblank
interrupts whenever LP3 watermarks are used.

If I nudge the latency value written to the WM3 register just
by one in either direction the problem disappears. That to me
suggests that the punit will not enter the corrsponding
powersave mode (MPLL shutdown IIRC) unless the latency value
in the register matches exactly what we read from SSKPD. Ie.
it's not really a latency value but rather just a cookie
by which the punit can identify the desired power saving state.
On HSW/BDW this was changed such that we actually just write
the WM level number into those bits, which makes much more
sense given the observed behaviour.

We could try to handle this by disallowing LP3 watermarks
only when vblank interrupts are enabled but we'd first have
to prove that only vblank interrupts are affected, which
seems unlikely. Also we can't grab the wm mutex from the
vblank enable/disable hooks because those are called with
various spinlocks held. Thus we'd have to redesigne the
watermark locking. So to play it safe and keep the code
simple we simply disable LP3 watermarks on all SNB machines.

To do that we simply zero out the latency values for
watermark level 3, and we adjust the watermark computation
to check for that. The behaviour now matches that of the
g4x/vlv/skl wm code in the presence of a zeroed latency
value.

v2: s/USHRT_MAX/U32_MAX/ for consistency with the types (Chris)

Cc: stable@vger.kernel.org
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101269
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103713
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114173440.6730-1-ville.syrjala@linux.intel.com
(cherry picked from commit 03981c6ebe)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2018-11-19 13:44:31 +02:00
..
amd drm/amdgpu: fix huge page handling on Vega10 2018-11-13 10:21:00 -05:00
arc drm: drop _mode_ from drm_mode_connector_attach_encoder 2018-07-13 18:40:27 +02:00
arm drm: malidp: Add the size of the superblocks when calculating total 2018-10-05 15:39:51 +01:00
armada drm: extract drm_atomic_uapi.c 2018-09-09 14:19:18 +02:00
ast drm: drop _mode_ from drm_mode_connector_attach_encoder 2018-07-13 18:40:27 +02:00
atmel-hlcdc drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes 2018-08-27 21:22:52 +02:00
bochs drm/bochs: support changing byteorder at mode set time 2018-09-25 14:49:49 +02:00
bridge drm/bridge: ti-sn65dsi86: Remove the mystery delay 2018-10-29 11:53:27 -04:00
cirrus drm/cirrus: use simpler remove_conflicting_pci_framebuffers() 2018-09-03 18:16:47 +02:00
etnaviv Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes 2018-11-07 09:32:30 +10:00
exynos drm/exynos/fbdev: do not skip fbdev init if there are no connectors 2018-11-05 16:37:24 +09:00
fsl-dcu drm/fsl-dcu: Replace drm_dev_unref with drm_dev_put 2018-09-26 22:20:16 +02:00
gma500 Merge drm/drm-next into drm-misc-next 2018-08-27 10:00:03 -04:00
hisilicon drm/hisilicon: Replace ttm_bo_unref with ttm_bo_put 2018-09-26 11:42:12 +08:00
i2c Merge branch 'drm-tda9950-fixes' of git://git.armlinux.org.uk/~rmk/linux-arm into drm-fixes 2018-10-04 10:32:14 +10:00
i810 drm/i810: off by one in i810_dma_vertex() 2018-07-03 15:00:42 +02:00
i915 drm/i915: Disable LP3 watermarks on all SNB machines 2018-11-19 13:44:31 +02:00
imx drm/imx: fix build failure without CONFIG_DRM_FBDEV_EMULATION 2018-10-05 12:09:20 +02:00
lib
mediatek drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
meson drm/meson: venc: dmt mode must use encp 2018-11-13 10:52:33 +01:00
mga
mgag200 drm/mgag200: use simpler remove_conflicting_pci_framebuffers() 2018-09-03 18:17:32 +02:00
msm drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
mxsfb drm/mxsfb: Switch to drm_atomic_helper_commit_tail_rpm 2018-09-26 22:07:40 +02:00
nouveau drm, i915, amdgpu, bridge + core quirk 2018-11-02 10:58:20 -07:00
omapdrm drm/omap: dsi: Fix missing of_platform_depopulate() 2018-11-12 11:50:13 +02:00
panel drm/panel: simple: Innolux TV123WAM is actually P120ZDG-BF1 2018-10-29 11:53:28 -04:00
pl111 Merge drm/drm-next into drm-misc-next 2018-09-27 02:54:54 -04:00
qxl qxl: refactor to use drm_fb_helper_fbdev_setup 2018-09-12 09:01:18 +02:00
r128
radeon drm/radeon: change SPDX identifier to MIT 2018-10-15 16:16:12 -05:00
rcar-du drm: rcar-du: Add r8a77990 and r8a77995 device support 2018-09-25 00:41:05 +03:00
rockchip drm/rockchip: Allow driver to be shutdown on reboot/kexec 2018-09-10 10:52:27 +02:00
savage drm/savage: off by one in savage_bci_cmdbuf() 2018-07-04 14:27:01 +02:00
scheduler drm/sched: fix timeout handling v2 2018-10-12 12:52:32 -05:00
selftests drm-misc-next for 4.19: 2018-06-22 12:58:08 +10:00
shmobile drm: shmobile: convert to SPDX identifiers 2018-09-14 13:54:02 +03:00
sis
sti drm/sti: Use drm_fbdev_generic_setup() 2018-09-25 11:33:51 +02:00
stm drm/stm: Replace drm_dev_unref with drm_dev_put 2018-07-13 10:11:02 +02:00
sun4i drm/sun4i: tcon: prevent tcon->panel dereference if NULL 2018-11-06 16:55:29 +01:00
tdfx
tegra drm/tegra: Changes for v4.20-rc1 2018-09-28 09:47:31 +10:00
tilcdc drm/tilcdc: Convert drm_atomic_helper_suspend/resume() 2018-10-01 15:52:29 +03:00
tinydrm drm/tinydrm: Replace drm_dev_unref with drm_dev_put 2018-08-07 17:09:15 +02:00
ttm list: introduce list_bulk_move_tail helper 2018-10-10 15:20:54 -05:00
tve200 drm/tve200: Use drm_fbdev_generic_setup() 2018-09-25 11:34:24 +02:00
udl Merge drm/drm-next into drm-misc-next 2018-09-27 02:54:54 -04:00
v3d drm/scheduler: remove timeout work_struct from drm_sched_job (v3) 2018-09-27 09:55:45 -05:00
vc4 Merge drm/drm-next into drm-misc-next 2018-09-27 02:54:54 -04:00
vgem drm/vgem: Remove unecessary dma_fence_ops 2018-08-17 11:22:58 +02:00
via
virtio virtio: Support prime objects vmap/vunmap 2018-09-26 08:05:07 +02:00
vkms drm/vkms: Fix possible memory leak in _vkms_get_crc() 2018-09-21 10:50:45 +02:00
vmwgfx Merge branch 'vmwgfx-next' of git://people.freedesktop.org/~thomash/linux into drm-next 2018-10-04 10:19:33 +10:00
xen drm: Replace NULL with error value in drm_prime_pages_to_sg 2018-07-23 11:47:35 +03:00
zte drm/zte: Use drm_fbdev_generic_setup() 2018-09-25 11:35:33 +02:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm, i915, amdgpu, bridge + core quirk 2018-11-02 10:58:20 -07:00
drm_atomic_uapi.c drm/atomic_helper: Stop modesets on unregistered connectors harder 2018-10-19 11:46:46 +03:00
drm_atomic.c drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
drm_auth.c
drm_blend.c drm: Clarify DRM_MODE_REFLECT_X/Y documentation 2018-09-11 11:21:30 +01:00
drm_bridge.c drm: bridge: document bridge attach/detach imbalance 2018-09-13 11:28:12 +02:00
drm_bufs.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_cache.c
drm_client.c drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
drm_color_mgmt.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_connector.c drm/atomic_helper: Stop modesets on unregistered connectors harder 2018-10-19 11:46:46 +03:00
drm_context.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c drm: extract drm_atomic_uapi.c 2018-09-09 14:19:18 +02:00
drm_crtc_internal.h drm: refuse ADDFB2 ioctl for broken bigendian drivers 2018-09-10 07:10:36 +02:00
drm_crtc.c drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
drm_debugfs_crc.c Revert "drm: crc: Wait for a frame before returning from open()" 2018-08-22 09:50:16 -07:00
drm_debugfs.c drm/atomic: Use drm_drv_uses_atomic_modeset() for debugfs creation 2018-09-17 19:24:37 -04:00
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c drm_dp_cec: add note about good MegaChips 2900 CEC support 2018-08-31 10:20:38 +02:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm: add LG eDP panel to quirk database 2018-09-19 16:44:12 +03:00
drm_dp_mst_topology.c drm/dp_mst: Check if primary mstb is null 2018-11-09 12:27:25 -05:00
drm_drv.c drm: Introduce per-device driver_features 2018-09-13 18:44:06 +03:00
drm_dumb_buffers.c drm-misc-next for 4.19: 2018-06-28 13:29:07 +10:00
drm_edid_load.c
drm_edid.c drm, i915, amdgpu, bridge + core quirk 2018-11-02 10:58:20 -07:00
drm_encoder_slave.c
drm_encoder.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_fb_cma_helper.c drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
drm_fb_helper.c drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
drm_file.c drm: Begin an API for in-kernel clients 2018-07-10 14:51:37 +02:00
drm_flip_work.c
drm_fourcc.c drm: Fix htmldocs warnings in drm_fourcc.c 2018-11-07 16:16:27 -05:00
drm_framebuffer.c drm: move quirk_addfb_prefer_xbgr_30bpp handling to drm_driver_legacy_fb_format too 2018-09-25 14:49:50 +02:00
drm_gem_cma_helper.c drm: Replace NULL with error value in drm_prime_pages_to_sg 2018-07-23 11:47:35 +03:00
drm_gem_framebuffer_helper.c drm: use drm_driver_legacy_fb_format in drm_gem_fbdev_fb_create 2018-09-25 14:49:49 +02:00
drm_gem.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_global.c drm: add SPDX identifier and clarify license 2018-06-29 15:28:47 -05:00
drm_hashtab.c
drm_info.c
drm_internal.h drm: Drop drmP.h from drm_connector.c 2018-09-09 14:19:17 +02:00
drm_ioc32.c
drm_ioctl.c drm: Return -EOPNOTSUPP in drm_setclientcap() when driver do not support KMS 2018-09-21 11:19:40 +02:00
drm_irq.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_kms_helper_common.c
drm_lease.c drm pull for 4.20-rc1 2018-10-28 17:49:53 -07:00
drm_legacy.h
drm_lock.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_memory.c
drm_mipi_dsi.c drm: Add support for pps and compression mode command packet 2018-07-25 07:51:05 -04:00
drm_mm.c
drm_mode_config.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_mode_object.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_modes.c drm: drop _mode_ from remaining connector functions 2018-07-13 18:40:27 +02:00
drm_modeset_helper.c
drm_modeset_lock.c drm: Change deadlock-avoidance algorithm for the modeset locks. 2018-07-03 09:46:05 +02:00
drm_of.c drm/doc: Include drm_of.c helpers 2018-07-13 18:40:28 +02:00
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Add quirk for Acer One 10 (S1003) 2018-10-17 14:17:38 +02:00
drm_panel.c This is the 4.19-rc6 release 2018-10-04 11:03:34 +10:00
drm_pci.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_plane_helper.c drm: extract drm_atomic_uapi.c 2018-09-09 14:19:18 +02:00
drm_plane.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_prime.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_print.c drm: Add puts callback for the coredump printer 2018-07-30 08:49:41 -04:00
drm_probe_helper.c drm: drop _mode_ from remaining connector functions 2018-07-13 18:40:27 +02:00
drm_property.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_rect.c
drm_scatter.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_scdc_helper.c
drm_simple_kms_helper.c drm: drop _mode_ from drm_mode_connector_attach_encoder 2018-07-13 18:40:27 +02:00
drm_syncobj.c This is the 4.19-rc6 release 2018-10-04 11:03:34 +10:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank.c drm: Differentiate the lack of an interface from invalid parameter 2018-09-14 17:29:47 +01:00
drm_vm.c
drm_vma_manager.c drm: Remove "protection" around drm_vma_offset_manager_destroy() 2018-09-04 19:00:32 +01:00
drm_writeback.c drm: writeback: Fix doc that says connector should be disconnected 2018-07-16 16:35:27 +01:00
Kconfig drm/fb_helper: Allow leaking fbdev smem_start 2018-10-03 21:08:21 +02:00
Makefile drm: extract drm_atomic_uapi.c 2018-09-09 14:19:18 +02:00