acrn-kernel/include/drm
Wayne Lin 00f68f5c1b drm/dp_mst: Clear MSG_RDY flag before sending new message
commit 72f1de49ff upstream.

[Why]
The sequence for collecting down_reply from source perspective should
be:

Request_n->repeat (get partial reply of Request_n->clear message ready
flag to ack DPRX that the message is received) till all partial
replies for Request_n are received->new Request_n+1.

Now there is chance that drm_dp_mst_hpd_irq() will fire new down
request in the tx queue when the down reply is incomplete. Source is
restricted to generate interveleaved message transactions so we should
avoid it.

Also, while assembling partial reply packets, reading out DPCD DOWN_REP
Sideband MSG buffer + clearing DOWN_REP_MSG_RDY flag should be
wrapped up as a complete operation for reading out a reply packet.
Kicking off a new request before clearing DOWN_REP_MSG_RDY flag might
be risky. e.g. If the reply of the new request has overwritten the
DPRX DOWN_REP Sideband MSG buffer before source writing one to clear
DOWN_REP_MSG_RDY flag, source then unintentionally flushes the reply
for the new request. Should handle the up request in the same way.

[How]
Separete drm_dp_mst_hpd_irq() into 2 steps. After acking the MST IRQ
event, driver calls drm_dp_mst_hpd_irq_send_new_request() and might
trigger drm_dp_mst_kick_tx() only when there is no on going message
transaction.

Changes since v1:
* Reworked on review comments received
-> Adjust the fix to let driver explicitly kick off new down request
when mst irq event is handled and acked
-> Adjust the commit message

Changes since v2:
* Adjust the commit message
* Adjust the naming of the divided 2 functions and add a new input
  parameter "ack".
* Adjust code flow as per review comments.

Changes since v3:
* Update the function description of drm_dp_mst_hpd_irq_handle_event

Changes since v4:
* Change ack of drm_dp_mst_hpd_irq_handle_event() to be an array align
  the size of esi[]

Signed-off-by: Wayne Lin <Wayne.Lin@amd.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-07-27 08:50:52 +02:00
..
bridge drm: bridge: dw_hdmi: Audio: Add General Parallel Audio (GPA) driver 2022-04-19 18:23:48 +02:00
display drm/dp_mst: Clear MSG_RDY flag before sending new message 2023-07-27 08:50:52 +02:00
i2c
ttm drm/ttm: fix undefined behavior in bit shift for TTM_TT_FLAG_PRIV_POPULATED 2022-12-31 13:32:06 +01:00
amd_asic_type.h
drm_aperture.h
drm_atomic.h drm/atomic: fix warning of unused variable 2022-06-09 16:09:46 +02:00
drm_atomic_helper.h drm: drm_atomic_helper: Add a new helper to deal with the writeback connector validation 2022-09-05 20:12:16 -01:00
drm_atomic_state_helper.h
drm_atomic_uapi.h drm: handle kernel fences in drm_gem_plane_helper_prepare_fb v2 2022-05-02 09:01:51 +02:00
drm_audio_component.h
drm_auth.h
drm_blend.h
drm_bridge.h drm/bridge: Introduce pre_enable_prev_first to alter bridge init order 2023-07-19 16:21:23 +02:00
drm_bridge_connector.h
drm_buddy.h drm/selftests: add drm buddy alloc range testcase 2022-02-23 10:44:43 +01:00
drm_cache.h LoongArch: Add writecombine support for drm 2022-06-03 20:09:27 +08:00
drm_client.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_color_mgmt.h
drm_connector.h drm/edid: add a quirk for two LG monitors to get them to work on 10bpc 2022-12-31 13:32:59 +01:00
drm_crtc.h drm/crtc: Introduce drmm_crtc_init_with_planes 2022-07-13 10:46:05 +02:00
drm_crtc_helper.h
drm_damage_helper.h
drm_debugfs.h
drm_debugfs_crc.h
drm_device.h drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_displayid.h drm/displayid: convert to drm_edid 2022-05-13 18:55:13 +03:00
drm_drv.h drm: Return error codes from struct drm_driver.gem_create_object 2021-12-02 11:12:39 +01:00
drm_edid.h drm/edid: Handle EDID 1.4 range descriptor h/vfreq offsets 2022-09-02 16:38:51 +03:00
drm_encoder.h drm/encoder: Introduce drmm_encoder_init 2022-07-13 10:46:05 +02:00
drm_encoder_slave.h drm: Remove linux/i2c.h from drm_crtc.h 2022-07-05 21:15:23 +03:00
drm_fb_dma_helper.h drm/gem: rename GEM CMA helpers to GEM DMA helpers 2022-08-03 18:31:49 +02:00
drm_fb_helper.h drm: Remove linux/fb.h from drm_crtc.h 2022-07-05 21:14:02 +03:00
drm_file.h drm: Remove the drm_get_unmapped_area() helper 2022-08-04 11:39:27 -04:00
drm_fixed.h drm: Add fixed-point helper to get rounded integer values 2023-07-19 16:21:18 +02:00
drm_flip_work.h
drm_format_helper.h drm/format-helper: Add drm_fb_build_fourcc_list() helper 2022-09-12 09:15:49 +02:00
drm_fourcc.h drm/fourcc: Add drm_format_info.is_color_indexed flag 2022-07-09 15:00:08 +02:00
drm_framebuffer.h drm/fb: Improve drm_framebuffer.offsets documentation 2022-07-09 15:58:52 +02:00
drm_gem.h drm/msm/gem: Prevent blocking within shrinker loop 2023-03-22 13:33:39 +01:00
drm_gem_atomic_helper.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_gem_dma_helper.h drm/gem: rename struct drm_gem_dma_object.{paddr => dma_addr} 2022-08-03 18:32:27 +02:00
drm_gem_framebuffer_helper.h drm/gem: Ignore color planes that are unused by framebuffer format 2022-05-19 19:25:02 +02:00
drm_gem_shmem_helper.h drm: correct comments 2022-07-21 12:16:10 +02:00
drm_gem_ttm_helper.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_gem_vram_helper.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_ioctl.h
drm_lease.h
drm_legacy.h drm: Declare hashtable as legacy 2021-11-30 09:41:28 +01:00
drm_managed.h drm: fix drmm_mutex_init() 2023-05-30 14:03:20 +01:00
drm_mipi_dbi.h drm/probe-helper: Add drm_crtc_helper_mode_valid_fixed() 2022-09-12 09:14:26 +02:00
drm_mipi_dsi.h drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness 2023-03-10 09:33:14 +01:00
drm_mm.h drm: Replace kernel.h with the necessary inclusions 2021-12-09 13:46:13 +01:00
drm_mode_config.h drm: remove allow_fb_modifiers 2022-01-31 21:45:24 +01:00
drm_mode_object.h drm/object: Add drm_object_property_get_default_value() function 2022-02-25 17:55:42 +01:00
drm_modes.h drm/modes: Add initializer macro DRM_MODE_INIT() 2022-09-12 09:14:59 +02:00
drm_modeset_helper.h
drm_modeset_helper_vtables.h drm/drm_modeset_helper_vtables.h: fix a typo 2022-04-06 15:23:08 +02:00
drm_modeset_lock.h drm/locking: fix drm_modeset_acquire_ctx kernel-doc 2022-01-20 14:41:25 +02:00
drm_module.h drm: Provide platform module-init macro 2022-01-19 18:40:18 +01:00
drm_of.h drm: of: Mark empty drm_of_get_data_lanes_count and drm_of_get_data_lanes_ep static 2022-06-12 16:07:05 +02:00
drm_panel.h drm/panel: drop DSC pps pointer 2022-09-18 09:38:06 -07:00
drm_pciids.h
drm_plane.h drm/plane: Allocate planes with drm_universal_plane_alloc() 2022-09-20 09:41:06 +02:00
drm_plane_helper.h drm/plane-helper: Add the missing declaration of drm_atomic_state 2023-01-12 12:02:52 +01:00
drm_prime.h dma-buf-map: Rename to iosys-map 2022-02-07 16:35:35 -08:00
drm_print.h drm/drm_print: correct format problem 2023-03-10 09:33:57 +01:00
drm_privacy_screen_consumer.h
drm_privacy_screen_driver.h drm/privacy_screen: Add drvdata in drm_privacy_screen 2022-01-10 12:17:37 +01:00
drm_privacy_screen_machine.h
drm_probe_helper.h drm/probe-helper: Add drm_crtc_helper_mode_valid_fixed() 2022-09-12 09:14:26 +02:00
drm_property.h
drm_rect.h drm/rect: Add DRM_RECT_INIT() macro 2022-06-27 13:45:48 +02:00
drm_self_refresh_helper.h
drm_simple_kms_helper.h
drm_syncobj.h
drm_sysfs.h
drm_util.h
drm_utils.h
drm_vblank.h
drm_vblank_work.h
drm_vma_manager.h drm/drm_vma_manager: Add drm_vma_node_allow_once() 2023-02-01 08:34:42 +01:00
drm_writeback.h drm: introduce drm_writeback_connector_init_with_encoder() API 2022-05-02 02:12:59 +03:00
gma_drm.h
gpu_scheduler.h Merge drm/drm-fixes into drm-misc-fixes 2022-10-20 09:09:00 +02:00
gud.h
i915_component.h
i915_drm.h drm/i915: include uapi/drm/i915_drm.h directly where needed 2022-03-17 20:06:04 +02:00
i915_mei_hdcp_interface.h drm/display: Move HDCP helpers into display-helper module 2022-04-25 11:19:36 +02:00
i915_pciids.h drm/i915/dg2: Drop one PCI ID 2023-05-11 23:03:07 +09:00
i915_pxp_tee_interface.h
intel-gtt.h agp/intel: Rename intel-gtt symbols 2022-06-22 15:52:55 -07:00
intel_lpe_audio.h
spsc_queue.h
task_barrier.h