mirror_ubuntu-kernels/drivers/gpu/drm/nouveau
Lyude Paul a5c2c0d164 drm/display/dp_mst: Add nonblocking helpers for DP MST
As Daniel Vetter pointed out, if we only use the atomic modesetting locks
with MST it's technically possible for a driver with non-blocking modesets
to race when it comes to MST displays - as we make the mistake of not doing
our own CRTC commit tracking in the topology_state object.

This could potentially cause problems if something like this happens:

* User starts non-blocking commit to disable CRTC-1 on MST topology 1
* User starts non-blocking commit to enable CRTC-2 on MST topology 1

There's no guarantee here that the commit for disabling CRTC-2 will only
occur after CRTC-1 has finished, since neither commit shares a CRTC - only
the private modesetting object for MST. Keep in mind this likely isn't a
problem for blocking modesets, only non-blocking.

So, begin fixing this by keeping track of which CRTCs on a topology have
changed by keeping track of which CRTCs we release or allocate timeslots
on. As well, add some helpers for:

* Setting up the drm_crtc_commit structs in the ->commit_setup hook
* Waiting for any CRTC dependencies from the previous topology state

v2:
* Use drm_dp_mst_atomic_setup_commit() directly - Jani

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: Wayne Lin <Wayne.Lin@amd.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Fangzhi Zuo <Jerry.Zuo@amd.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Imre Deak <imre.deak@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <sean@poorly.run>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220817193847.557945-9-lyude@redhat.com
2022-08-23 16:53:37 -04:00
..
dispnv04 drm/plane-helper: Export individual helpers 2022-07-26 18:42:07 +02:00
dispnv50 drm/display/dp_mst: Add nonblocking helpers for DP MST 2022-08-23 16:53:37 -04:00
include drm/nouveau/disp: move DAC load detection method 2022-07-27 09:05:49 +10:00
nvif drm/nouveau/disp: move DAC load detection method 2022-07-27 09:05:49 +10:00
nvkm subdev/clk: fix repeated words in comments 2022-08-23 18:02:10 +02:00
Kbuild
Kconfig drm/nouveau/Kconfig: Drop duplicate "select ACPI_VIDEO" 2022-06-23 12:15:04 +02:00
nouveau_abi16.c drm/nouveau: remove double WFI when destroying channels 2022-07-13 13:57:06 +10:00
nouveau_abi16.h drm/nouveau/ce/gv100-: move method buffer to ce ctx 2022-07-13 13:56:50 +10:00
nouveau_acpi.c nouveau: ACPI: Use the ACPI_COMPANION() macro directly 2021-10-26 15:48:49 +02:00
nouveau_acpi.h
nouveau_backlight.c drm/nouveau: Fix a potential theorical leak in nouveau_get_backlight_name() 2022-05-06 17:35:00 -04:00
nouveau_bios.c drm/nouveau/disp: add output class 2022-07-27 09:05:49 +10:00
nouveau_bios.h
nouveau_bo74c1.c
nouveau_bo85b5.c
nouveau_bo90b5.c
nouveau_bo0039.c
nouveau_bo5039.c
nouveau_bo9039.c
nouveau_bo.c drm/nouveau: audit bo->resource usage 2022-07-11 10:59:27 +02:00
nouveau_bo.h
nouveau_boa0b5.c
nouveau_chan.c drm/nouveau/fifo: remove rd32/wr32 accessors from channels 2022-07-13 13:56:42 +10:00
nouveau_chan.h
nouveau_connector.c drm/nouveau/kms/nv140-: Disable interlacing 2022-08-16 15:39:48 -04:00
nouveau_connector.h drm/nouveau/disp: add connector class 2022-07-27 09:05:48 +10:00
nouveau_crtc.h
nouveau_debugfs.c drm/nouveau: simplify the return expression of nouveau_debugfs_init() 2022-04-29 15:44:54 -04:00
nouveau_debugfs.h
nouveau_display.c drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend() 2022-07-14 16:42:00 -04:00
nouveau_display.h
nouveau_dma.c
nouveau_dma.h
nouveau_dmem.c mm: remove the extra ZONE_DEVICE struct page refcount 2022-03-03 12:47:33 -05:00
nouveau_dmem.h
nouveau_dp.c drm/nouveau/disp: add conn method to query HPD pin status 2022-07-27 09:05:48 +10:00
nouveau_drm.c drm: Move nomodeset kernel parameter to the DRM subsystem 2021-11-27 13:52:22 +01:00
nouveau_drv.h drm/nouveau/nvkm: rip out event uapi 2022-07-13 13:55:33 +10:00
nouveau_encoder.h drm/nouveau/disp: add output class 2022-07-27 09:05:49 +10:00
nouveau_fbcon.c drm/nouveau: Don't pm_runtime_put_sync(), only pm_runtime_put_autosuspend() 2022-07-14 16:42:00 -04:00
nouveau_fbcon.h
nouveau_fence.c drm/nouveau: remove trace_dma_fence_emit 2022-05-04 15:15:56 -04:00
nouveau_fence.h
nouveau_gem.c dma-buf: add enum dma_resv_usage v4 2022-04-07 12:53:53 +02:00
nouveau_gem.h
nouveau_hwmon.c drm/nouveau/hwmon: use simplified HWMON_CHANNEL_INFO macro 2022-08-22 22:50:57 -04:00
nouveau_hwmon.h
nouveau_ioc32.c
nouveau_ioctl.h
nouveau_led.c
nouveau_led.h
nouveau_mem.c drm/nouveau: Implement intersect/compatible functions 2022-08-22 15:36:11 +02:00
nouveau_mem.h drm/nouveau: Implement intersect/compatible functions 2022-08-22 15:36:11 +02:00
nouveau_nvif.c drm/nouveau/nvkm: rip out event uapi 2022-07-13 13:55:33 +10:00
nouveau_platform.c
nouveau_platform.h
nouveau_prime.c drm/nouveau: fix a use-after-free in nouveau_gem_prime_import_sg_table() 2022-07-07 15:53:28 -04:00
nouveau_reg.h
nouveau_sgdma.c
nouveau_svm.c drm for 5.18-rc1 2022-03-24 16:19:43 -07:00
nouveau_svm.h
nouveau_ttm.c drm/nouveau: Implement intersect/compatible functions 2022-08-22 15:36:11 +02:00
nouveau_ttm.h
nouveau_usif.c drm/nouveau/nvkm: rip out event uapi 2022-07-13 13:55:33 +10:00
nouveau_usif.h
nouveau_vga.c
nouveau_vga.h
nouveau_vmm.c
nouveau_vmm.h
nv04_fbcon.c
nv04_fence.c
nv10_fence.c
nv10_fence.h
nv17_fence.c
nv50_display.h
nv50_fbcon.c
nv50_fence.c
nv84_fence.c
nvc0_fbcon.c
nvc0_fence.c