linux/drivers/gpu/drm
Lyude Paul cfe9f90358 drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs
Up until now, freeing payloads on remote MST hubs that just had ports
removed has almost never worked because we've been relying on port
validation in order to stop us from accessing ports that have already
been freed from memory, but ports which need their payloads released due
to being removed will never be a valid part of the topology after
they've been removed.

Since we've introduced malloc refs, we can replace all of the validation
logic in payload helpers which are used for deallocation with some
well-placed malloc krefs. This ensures that regardless of whether or not
the ports are still valid and in the topology, any port which has an
allocated payload will remain allocated in memory until it's payloads
have been removed - finally allowing us to actually release said
payloads correctly.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Cc: David Airlie <airlied@redhat.com>
Cc: Jerry Zuo <Jerry.Zuo@amd.com>
Cc: Juston Li <juston.li@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190111005343.17443-10-lyude@redhat.com
2019-01-10 20:12:23 -05:00
..
amd drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
arc drm/arc: do not rely on drmP.h from drm_gem_cma_helper.h 2019-01-09 22:48:51 +01:00
arm drm: mali-dp: Enable Mali-DP tiled buffer formats 2018-11-02 09:57:27 +00:00
armada
ast drm/ast: Remove set but not used variable 'bo' 2018-12-10 11:26:41 +01:00
atmel-hlcdc drm/atmel-hlcdc: Use drm_fbdev_generic_setup() 2018-11-01 15:24:22 +01:00
bochs drm/bochs: add edid present check 2018-12-20 13:25:28 +01:00
bridge drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
cirrus drm-misc-next for v4.21, part 2: 2018-11-22 12:54:38 +10:00
etnaviv drm/etnaviv: fix for 64bit seqno change 2018-12-11 17:31:52 +01:00
exynos drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
fsl-dcu drm/fsl-dcu: Use drm_fbdev_generic_setup() 2018-11-01 15:23:58 +01:00
gma500
hisilicon drm/ttm: initialize globals during device init (v2) 2018-11-05 14:21:21 -05:00
i2c drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
i810
i915 drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02:00
imx drm/imx: fix build failure without CONFIG_DRM_FBDEV_EMULATION 2018-10-05 12:09:20 +02:00
lib
mediatek drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
meson drm: meson: Cleanup on drm_display_mode print str 2019-01-09 22:07:15 +01:00
mga
mgag200 drm/ttm: initialize globals during device init (v2) 2018-11-05 14:21:21 -05:00
msm drm: msm: Cleanup drm_display_mode print str 2019-01-10 21:05:39 +01:00
mxsfb drm: replace "drm_dev_unref" function with "drm_dev_put" 2018-11-24 22:12:54 +01:00
nouveau drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
omapdrm drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
panel drm/panel: simple: Add AUO G101EVN010 panel support 2018-12-03 17:04:48 +01:00
pl111 drm/pl111: add of_node_put() 2018-11-28 09:31:07 -08:00
qxl qxl: Use struct_size() in kzalloc() 2019-01-09 09:38:49 +01:00
r128 drm/ati_pcigart: Fix error code in drm_ati_pcigart_init() 2018-12-17 10:47:17 +01:00
radeon drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02:00
rcar-du drm: remove include of drmP.h from bridge/dw_hdmi.h 2019-01-09 22:27:44 +01:00
rockchip drm/rockchip: Add reflection properties 2019-01-11 00:44:10 +01:00
savage
scheduler drm/scheduler: Add drm_sched_job_cleanup 2018-11-05 14:21:27 -05:00
selftests drm/selftests: Fix build warning -Wframe-larger-than 2018-11-02 14:25:32 +01:00
shmobile drm: replace "drm_dev_unref" function with "drm_dev_put" 2018-11-24 22:12:54 +01:00
sis
sti drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
stm drm/stm: Use drm_fbdev_generic_setup() 2018-10-25 17:00:28 +02:00
sun4i drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
tdfx
tegra drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
tilcdc drm/tilcdc: Use drm_fbdev_generic_setup() 2018-11-01 15:25:41 +01:00
tinydrm drm/tinydrm: do not reply on drmP.h from drm_gem_cma_helper.h 2019-01-09 22:48:56 +01:00
ttm Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next 2018-11-19 11:07:52 +10:00
tve200 drm: replace "drm_dev_unref" function with "drm_dev_put" 2018-11-24 22:12:54 +01:00
udl DRM: UDL: get rid of useless vblank initialization 2018-10-23 15:59:01 +02:00
v3d drm/v3d: Invalidate the caches from the outside in. 2018-12-07 10:56:51 -08:00
vc4 drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02:00
vgem dma-buf: make fence sequence numbers 64 bit v2 2018-12-07 12:44:16 +01:00
via
virtio drm/virtio: Drop deprecated load/unload initialization 2019-01-09 09:38:49 +01:00
vkms drm/vkms: set preferred depth to 24 2018-12-17 10:51:20 +01:00
vmwgfx Merge branch 'drm-next-4.21' of git://people.freedesktop.org/~agd5f/linux into drm-next 2018-11-19 11:07:52 +10:00
xen drm/xen: Don't set the dpms hook 2018-12-12 11:56:45 +01:00
zte drm/edid: Pass connector to AVI infoframe functions 2019-01-10 19:01:06 +02:00
ati_pcigart.c drm/ati_pcigart: Fix error code in drm_ati_pcigart_init() 2018-12-17 10:47:17 +01:00
drm_agpsupport.c
drm_atomic_helper.c drm: Fix up drm_atomic_state_helper.[hc] extraction 2018-11-30 16:37:52 +01:00
drm_atomic_state_helper.c drm: Fix up drm_atomic_state_helper.[hc] extraction 2018-11-30 16:37:52 +01:00
drm_atomic_uapi.c drm: Add connector property to limit max bpc 2018-11-02 09:15:58 -07:00
drm_atomic.c drm/atomic: integrate modeset lock with private objects 2018-12-11 15:24:30 +01: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: un-inline drm_legacy_findmap() 2019-01-02 11:37:11 +02:00
drm_cache.c
drm_client.c drm/gem: Add drm_gem_object_funcs 2018-11-20 14:56:18 +01:00
drm_color_mgmt.c drm: Add DRM_MODESET_LOCK_BEGIN/END helpers 2018-11-29 10:48:31 -05:00
drm_connector.c drm/connector: Allow creation of margin props alone 2018-12-19 14:47:58 +01:00
drm_context.c drm: Fix error handling in drm_legacy_addctx 2019-01-07 11:26:31 +01:00
drm_crtc_helper_internal.h
drm_crtc_helper.c drm/crtc-helpers: WARN when used with atomic drivers 2019-01-10 13:00:21 +01:00
drm_crtc_internal.h
drm_crtc.c drm: Add DRM_MODESET_LOCK_BEGIN/END helpers 2018-11-29 10:48:31 -05:00
drm_debugfs_crc.c
drm_debugfs.c drm: Merge drm_info.c into drm_debugfs.c 2018-11-22 09:52:27 +01:00
drm_dma.c
drm_dp_aux_dev.c
drm_dp_cec.c drm: Do not call drm_dp_cec_set_edid() while registering DP connectors 2018-10-11 10:52:35 +02:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c drm/dp: DRM DP helper/macros to get DP sink DSC parameters 2018-10-31 14:08:32 -07:00
drm_dp_mst_topology.c drm/dp_mst: Fix payload deallocation on hotplugs using malloc refs 2019-01-10 20:12:23 -05:00
drm_drv.c drm/drm_drv.c: Remove duplicate header 2018-12-27 12:46:49 +01:00
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: Add display_info.rgb_quant_range_selectable 2019-01-10 19:01:06 +02: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-misc-next for v4.21, part 1: 2018-11-19 10:40:33 +10:00
drm_fb_helper.c drm/fb-helper: Scale back depth to supported maximum 2019-01-10 20:54:42 +01:00
drm_file.c
drm_flip_work.c
drm_fourcc.c drm: Introduce new DRM_FORMAT_XYUV 2018-11-20 16:20:13 +02:00
drm_framebuffer.c drm: Add macro to export functions only when CONFIG_DRM_DEBUG_SELFTEST is enabled 2018-11-02 09:58:10 +00:00
drm_gem_cma_helper.c drm/cma-helper: Add DRM_GEM_CMA_VMAP_DRIVER_OPS 2018-11-20 14:57:25 +01:00
drm_gem_framebuffer_helper.c drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info 2018-11-02 09:55:27 +00:00
drm_gem.c drm/gem: Mark pinned pages as unevictable 2019-01-09 21:24:50 +00:00
drm_hashtab.c
drm_internal.h drm: move DRM_IF_VERSION to drm_internal.h 2018-12-27 13:08:58 +01: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: Rename crtc_idr as object_idr to KMS cleanups 2018-12-13 22:44:57 +01: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: Shift * to be adjacent to pointer name 2018-10-16 14:39:25 +02:00
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c drm: Rename crtc_idr as object_idr to KMS cleanups 2018-12-13 22:44:57 +01:00
drm_mode_object.c drm: Reorder set_property_atomic to avoid returning with an active ww_ctx 2019-01-03 09:54:26 +00:00
drm_modes.c drm: Convert to using %pOFn instead of device_node.name 2018-10-01 10:16:39 +02:00
drm_modeset_helper.c drm: Unexport primary plane helpers 2018-10-05 18:06:49 +02:00
drm_modeset_lock.c drm/atomic: integrate modeset lock with private objects 2018-12-11 15:24:30 +01:00
drm_of.c
drm_panel_orientation_quirks.c drm: panel-orientation-quirks: Do rotation quirk for new GPD Win2 FW 2018-11-15 10:55:30 +01:00
drm_panel.c This is the 4.19-rc6 release 2018-10-04 11:03:34 +10:00
drm_pci.c drm/drm_pci.c: Use dma_zalloc_coherent 2018-10-23 15:59:01 +02:00
drm_plane_helper.c drm: Unexport drm_plane_helper_check_update 2018-10-05 22:45:19 +02:00
drm_plane.c drm: Add DRM_MODESET_LOCK_BEGIN/END helpers 2018-11-29 10:48:31 -05:00
drm_prime.c drm/prime: Fix drm_gem_prime_mmap() stack use 2018-11-22 15:44:05 +01:00
drm_print.c
drm_probe_helper.c
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/tinydrm: Advertise that we can do only DRM_FORMAT_MOD_LINEAR. 2018-10-30 13:01:50 -07:00
drm_syncobj.c drm/syncobj: remove drm_syncobj_cb and cleanup 2018-12-11 17:38:38 +01: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_writeback.c
Kconfig drm/fb_helper: Allow leaking fbdev smem_start 2018-10-03 21:08:21 +02:00
Makefile drm-misc-next for v4.21: 2018-11-29 10:28:49 +10:00