linux/drivers/gpu/drm
Ville Syrjälä de572edecc drm/i915: Implement WaEdpLinkRateDataReload
commit 672d6ca758 upstream.

A lot of modern laptops use the Parade PS8461E MUX for eDP
switching. The MUX can operate in jitter cleaning mode or
redriver mode, the first one resulting in higher link
quality. The jitter cleaning mode needs to know the link
rate used and the MUX achieves this by snooping the
LINK_BW_SET, LINK_RATE_SELECT and SUPPORTED_LINK_RATES
DPCD accesses.

When the MUX is powered down (seems this can happen whenever
the display is turned off) it loses track of the snooped
link rates so when we do the LINK_RATE_SELECT write it no
longer knowns which link rate we're selecting, and thus it
falls back to the lower quality redriver mode. This results
in unstable high link rates (eg. usually 8.1Gbps link rate
no longer works correctly).

In order to avoid all that let's re-snoop SUPPORTED_LINK_RATES
from the sink at the start of every link training.

Unfortunately we don't have a way to detect the presence of
the MUX. It looks like the set of laptops equipped with this
MUX is fairly large and contains devices from multiple
manufacturers. It may also still be growing with new models.
So a quirk doesn't seem like a very easily maintainable
option, thus we shall attempt to do this unconditionally on
all machines that use LINK_RATE_SELECT. Hopefully this extra
DPCD read doesn't cause issues for any unaffected machine.
If that turns out to be the case we'll need to convert this
into a quirk in the future.

Cc: stable@vger.kernel.org
Cc: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/6205
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220902070319.15395-1-ville.syrjala@linux.intel.com
Tested-by: Aaron Ma <aaron.ma@canonical.com>
Tested-by: Jason A. Donenfeld <Jason@zx2c4.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
(cherry picked from commit 25899c590c)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-15 11:32:03 +02:00
..
amd drm/amdgpu: mmVM_L2_CNTL3 register not initialized correctly 2022-09-15 11:32:03 +02:00
arc
arm drm: mali-dp: potential dereference of null pointer 2022-06-09 10:21:01 +02:00
armada drm-misc-next for 5.10: 2020-09-23 09:52:24 +10:00
aspeed drm/aspeed: Fix Kconfig warning & subsequent build errors 2020-12-30 11:52:56 +01:00
ast drm/ast: potential dereference of null pointer 2021-12-22 09:30:54 +01:00
atmel-hlcdc
bochs
bridge drm/bridge: tc358767: Fix (e)DP bridge endpoint parsing in dedicated function 2022-08-21 15:16:25 +02:00
etnaviv drm/etnaviv: check for reaped mapping in etnaviv_iommu_unmap_gem 2022-06-09 10:21:24 +02:00
exynos drm/exynos/exynos7_drm_decon: free resources when clk_set_parent() failed. 2022-08-21 15:15:46 +02:00
fsl-dcu Linux 5.9-rc4 2020-09-08 14:41:40 +10:00
gma500 gma500: fix an incorrect NULL check on list iterator 2022-06-09 10:21:28 +02:00
hisilicon drm/hisilicon: Fix use-after-free 2021-03-07 12:34:11 +01:00
i2c
i810 drm/i810: make i810_flush_queue() return void 2020-09-11 10:54:17 +02:00
i915 drm/i915: Implement WaEdpLinkRateDataReload 2022-09-15 11:32:03 +02:00
imx drm/imx/dcss: fix unused but set variable warnings 2022-07-29 17:19:24 +02:00
ingenic drm/ingenic: Reset pixclock rate when parent clock rate changes 2022-06-09 10:21:00 +02:00
lib
lima drm/lima: fix warning when CONFIG_DEBUG_SG=y & CONFIG_DMA_API_DEBUG=y 2022-01-27 10:54:10 +01:00
mcde drm/mcde: Fix refcount leak in mcde_dsi_bind 2022-08-21 15:15:41 +02:00
mediatek drm/mediatek: Keep dsi as LP00 before dcs cmds transfer 2022-08-21 15:16:15 +02:00
meson drm/meson: Fix overflow implicit truncation warnings 2022-08-25 11:38:12 +02:00
mga
mgag200 mgag200 fix memmapsl configuration in GCTL6 register 2022-04-08 14:39:56 +02:00
msm drm/msm/dsi: Fix number of regulators for SDM660 2022-09-08 11:11:36 +02:00
mxsfb drm: mxsfb: Fix NULL pointer dereference crash on unload 2021-10-27 09:56:54 +02:00
nouveau drm/nouveau/acpi: Don't print error when we get -EINPROGRESS from pm_runtime 2022-08-21 15:15:24 +02:00
omapdrm drm/omap: dmm_tiler: fix return error code in omap_dmm_probe() 2020-12-30 11:53:13 +01:00
panel drm/panel: panel-simple: Fix proper bpc for AM-1280800N3TZQW-T00H 2022-06-09 10:21:05 +02:00
panfrost drm/panfrost: Fix shrinker list corruption by madvise IOCTL 2022-07-21 21:20:01 +02:00
pl111 amba: Make the remove callback return void 2022-04-08 14:40:02 +02:00
qxl drm: qxl: ensure surf.data is ininitialized 2021-07-14 16:56:20 +02:00
r128
radeon drm/radeon: add a force flush to delay work when radeon 2022-09-15 11:32:03 +02:00
rcar-du drm: rcar-du: Fix CRTC timings when CMM is used 2022-01-27 10:54:14 +01:00
rockchip drm/rockchip: Fix an error handling path rockchip_dp_probe() 2022-08-21 15:15:44 +02:00
savage treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
scheduler drm/sched: Avoid data corruptions 2021-07-19 09:44:40 +02:00
selftests drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST sideband message 2020-09-01 13:02:33 +05:30
shmobile
sis
sti Linux 5.9-rc4 2020-09-08 14:41:40 +10:00
stm stm: ltdc: fix two incorrect NULL checks on list iterator 2022-06-09 10:21:27 +02:00
sun4i drm/sun4i: dsi: Prevent underflow when computing packet sizes 2022-08-25 11:38:11 +02:00
tdfx
tegra drm/tegra: Fix reference leak in tegra_dsi_ganged_probe 2022-04-08 14:40:18 +02:00
tidss drm/tidss: implement WA for AM65xx erratum i2000 2020-08-21 15:17:05 +03:00
tilcdc tilcdc: tilcdc_external: fix an incorrect NULL check on list iterator 2022-06-09 10:21:28 +02:00
tiny drm/st7735r: Fix module autoloading for Okaya RH128128T 2022-08-21 15:15:38 +02:00
ttm drm/ttm: Put BO in its memory manager's lru list 2022-01-27 10:53:44 +01:00
tve200 drm/tve200: Fix handling of platform_get_irq() error 2020-12-30 11:52:56 +01:00
udl drm/udl: fix control-message timeout 2021-11-26 10:39:20 +01:00
v3d drm/v3d: fix wait for TMU write combiner flush 2021-11-18 14:04:02 +01:00
vboxvideo drm/vboxvideo: fix a NULL vs IS_ERR() check 2022-01-27 10:53:49 +01:00
vc4 drm/vc4: change vc4_dma_range_matches from a global to static 2022-08-21 15:16:25 +02:00
vgem drm/vgem: Use devm_drm_dev_alloc 2020-09-11 10:47:19 +02:00
via treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
virtio virtio-gpu: fix a missing check to avoid NULL dereference 2022-08-21 15:15:39 +02:00
vkms drm/vkms: fix misuse of WARN_ON 2021-05-11 14:47:26 +02:00
vmwgfx drm/vmwgfx: Initialize drm_mode_fb_cmd2 2022-05-18 10:23:47 +02:00
xen gpu/xen: Fix a use after free in xen_drm_drv_init 2021-04-21 13:00:52 +02:00
xlnx drm: xlnx: zynqmp: release reset to DP controller before accessing DP registers 2021-09-18 13:40:27 +02:00
zte drm/zte: Don't select DRM_KMS_FB_HELPER 2021-07-19 09:44:36 +02:00
drm_agpsupport.c
drm_atomic_helper.c drm/atomic: Force bridge self-refresh-exit on CRTC switch 2022-06-14 18:32:46 +02:00
drm_atomic_state_helper.c
drm_atomic_uapi.c
drm_atomic.c
drm_auth.c drm: protect drm_master pointers in drm_lease.c 2021-09-18 13:40:19 +02:00
drm_blend.c
drm_bridge_connector.c drm/bridge_connector: Set default status connected for eDP connectors 2020-08-26 19:11:41 +02:00
drm_bridge.c drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable() 2021-07-14 16:56:15 +02:00
drm_bufs.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
drm_cache.c drm: core: fix common struct sg_table related issues 2020-09-10 08:17:48 +02:00
drm_client_modeset.c
drm_client.c
drm_color_mgmt.c
drm_connector.c drm/vrr: Set VRR capable prop only if it is attached to connector 2022-03-19 13:44:45 +01:00
drm_context.c
drm_crtc_helper_internal.h drm: remove drm_fb_helper_modinit 2022-07-02 16:39:23 +02:00
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c Linux 5.9-rc2 2020-08-25 11:00:02 +02:00
drm_damage_helper.c
drm_debugfs_crc.c drm/crc-debugfs: Fix memleak in crc_control_write 2020-09-01 09:45:44 +02:00
drm_debugfs.c drm: avoid blocking in drm_clients_info's rcu section 2021-09-18 13:40:19 +02:00
drm_dma.c
drm_dp_aux_dev.c drm/dp_aux_dev: check aux_dev before use in drm_dp_aux_dev_get_by_minor() 2020-12-30 11:54:19 +01:00
drm_dp_cec.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/dp: Handle zeroed port counts in drm_dp_read_downstream_info() 2021-07-19 09:44:57 +02:00
drm_dp_mst_topology_internal.h
drm_dp_mst_topology.c drm/dp/mst: fix a possible memory leak in fetch_monitor_name() 2022-05-25 09:17:56 +02:00
drm_drv.c drm: fix null-ptr-deref in drm_dev_init_release() 2022-01-27 10:53:44 +01:00
drm_dsc.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: fix invalid EDID extension block filtering 2022-06-09 10:20:59 +02:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c
drm_fb_helper.c drm: remove drm_fb_helper_modinit 2022-07-02 16:39:23 +02:00
drm_file.c drm: serialize drm_file.master with a new spinlock 2021-09-18 13:40:19 +02:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c gpu/drm: cleanup coding style a bit 2020-09-09 11:45:18 +02:00
drm_gem_cma_helper.c drm: prime: add common helper to check scatterlist contiguity 2020-09-10 08:17:48 +02:00
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c drm/shmem-helpers: vunmap: Don't put pages for dma-buf 2021-03-17 17:06:19 +01:00
drm_gem_ttm_helper.c drm/ttm: merge offset and base in ttm_bus_placement 2020-09-08 10:43:30 +02:00
drm_gem_vram_helper.c drm/vram-helper: Fix use of top-down placement 2020-11-20 05:20:48 +10:00
drm_gem.c drm/gem: Fix GEM handle release errors 2022-09-15 11:32:02 +02:00
drm_hashtab.c
drm_hdcp.c
drm_internal.h drm/gem: Fix GEM handle release errors 2022-09-15 11:32:02 +02:00
drm_ioc32.c drm: Copy drm_wait_vblank to user before returning 2021-09-03 10:09:27 +02:00
drm_ioctl.c drm: Return -ENOTTY for non-drm ioctls 2021-07-28 14:35:47 +02:00
drm_irq.c
drm_kms_helper_common.c drm: remove drm_fb_helper_modinit 2022-07-02 16:39:23 +02:00
drm_lease.c drm: protect drm_master pointers in drm_lease.c 2021-09-18 13:40:19 +02:00
drm_legacy_misc.c
drm_legacy.h
drm_lock.c
drm_managed.c drm/dev: Remove drm_dev_init 2020-09-21 10:45:08 +02:00
drm_memory.c
drm_mipi_dbi.c drm/mipi-dbi: align max_chunk to 2 in spi_transfer 2022-08-21 15:15:38 +02:00
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c treewide: Change list_sort to use const pointers 2021-09-30 10:11:04 +02:00
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c drm/of: free the iterator object on failure 2021-09-15 09:50:32 +02:00
drm_panel_orientation_quirks.c drm: Add orientation quirk for GPD Win Max 2022-04-13 21:00:54 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm/plane-helper: fix uninitialized variable reference 2021-11-18 14:04:22 +01:00
drm_plane.c drm/plane: Move range check for format_count earlier 2022-06-09 10:20:52 +02:00
drm_prime.c drm/gem: Fix GEM handle release errors 2022-09-15 11:32:02 +02:00
drm_print.c
drm_probe_helper.c drm/probe-helper: Check epoch counter in output_poll_execute() 2021-05-14 09:50:23 +02:00
drm_property.c
drm_rect.c
drm_scatter.c
drm_scdc_helper.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_syncobj.c drm/syncobj: Deal with signalled fences in drm_syncobj_find_fence. 2021-12-14 11:32:39 +01:00
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vblank_work.c
drm_vblank.c drm/atomic-helper: Remove the timestamping constant update from drm_atomic_helper_update_legacy_modeset_state() 2020-09-14 22:37:31 +03:00
drm_vm.c
drm_vma_manager.c
drm_writeback.c
Kconfig drm/radeon: fix AGP dependency 2021-03-30 14:31:51 +02:00
Makefile drm/imx: compile imx directory by default 2020-09-09 16:39:48 +02:00