From b5ee127dd0585e2a2aa2da8e407d0723542fa16b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 18 Jul 2022 22:35:50 +0200 Subject: [PATCH] drop drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch from 5.10 and 5.15 --- ...nt-timestamp-for-cursor-only-commits.patch | 111 ------------------ queue-5.10/series | 1 - ...nt-timestamp-for-cursor-only-commits.patch | 111 ------------------ queue-5.15/series | 1 - 4 files changed, 224 deletions(-) delete mode 100644 queue-5.10/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch delete mode 100644 queue-5.15/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch diff --git a/queue-5.10/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch b/queue-5.10/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch deleted file mode 100644 index f4bf2e8d054..00000000000 --- a/queue-5.10/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 3283c83eb6fcfbda8ea03d7149d8e42e71c5d45e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michel=20D=C3=A4nzer?= -Date: Mon, 11 Jul 2022 16:51:31 +0200 -Subject: drm/amd/display: Ensure valid event timestamp for cursor-only commits -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michel Dänzer - -commit 3283c83eb6fcfbda8ea03d7149d8e42e71c5d45e upstream. - -Requires enabling the vblank machinery for them. - -Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2030 -Signed-off-by: Michel Dänzer -Signed-off-by: Alex Deucher -Cc: stable@vger.kernel.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 43 ++++++++++++++++++++-- - 1 file changed, 40 insertions(+), 3 deletions(-) - ---- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -@@ -439,6 +439,26 @@ static void dm_pflip_high_irq(void *inte - vrr_active, (int) !e); - } - -+static void dm_crtc_handle_vblank(struct amdgpu_crtc *acrtc) -+{ -+ struct drm_crtc *crtc = &acrtc->base; -+ struct drm_device *dev = crtc->dev; -+ unsigned long flags; -+ -+ drm_crtc_handle_vblank(crtc); -+ -+ spin_lock_irqsave(&dev->event_lock, flags); -+ -+ /* Send completion event for cursor-only commits */ -+ if (acrtc->event && acrtc->pflip_status != AMDGPU_FLIP_SUBMITTED) { -+ drm_crtc_send_vblank_event(crtc, acrtc->event); -+ drm_crtc_vblank_put(crtc); -+ acrtc->event = NULL; -+ } -+ -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+} -+ - static void dm_vupdate_high_irq(void *interrupt_params) - { - struct common_irq_params *irq_params = interrupt_params; -@@ -463,7 +483,7 @@ static void dm_vupdate_high_irq(void *in - * if a pageflip happened inside front-porch. - */ - if (vrr_active) { -- drm_crtc_handle_vblank(&acrtc->base); -+ dm_crtc_handle_vblank(acrtc); - - /* BTR processing for pre-DCE12 ASICs */ - if (acrtc->dm_irq_params.stream && -@@ -515,7 +535,7 @@ static void dm_crtc_high_irq(void *inter - * to dm_vupdate_high_irq after end of front-porch. - */ - if (!vrr_active) -- drm_crtc_handle_vblank(&acrtc->base); -+ dm_crtc_handle_vblank(acrtc); - - /** - * Following stuff must happen at start of vblank, for crc -@@ -7169,6 +7189,7 @@ static void amdgpu_dm_commit_planes(stru - struct amdgpu_bo *abo; - uint32_t target_vblank, last_flip_vblank; - bool vrr_active = amdgpu_dm_vrr_active(acrtc_state); -+ bool cursor_update = false; - bool pflip_present = false; - struct { - struct dc_surface_update surface_updates[MAX_SURFACES]; -@@ -7203,8 +7224,13 @@ static void amdgpu_dm_commit_planes(stru - struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state); - - /* Cursor plane is handled after stream updates */ -- if (plane->type == DRM_PLANE_TYPE_CURSOR) -+ if (plane->type == DRM_PLANE_TYPE_CURSOR) { -+ if ((fb && crtc == pcrtc) || -+ (old_plane_state->fb && old_plane_state->crtc == pcrtc)) -+ cursor_update = true; -+ - continue; -+ } - - if (!fb || !crtc || pcrtc != crtc) - continue; -@@ -7366,6 +7392,17 @@ static void amdgpu_dm_commit_planes(stru - bundle->stream_update.vrr_infopacket = - &acrtc_state->stream->vrr_infopacket; - } -+ } else if (cursor_update && acrtc_state->active_planes > 0 && -+ !acrtc_state->force_dpms_off && -+ acrtc_attach->base.state->event) { -+ drm_crtc_vblank_get(pcrtc); -+ -+ spin_lock_irqsave(&pcrtc->dev->event_lock, flags); -+ -+ acrtc_attach->event = acrtc_attach->base.state->event; -+ acrtc_attach->base.state->event = NULL; -+ -+ spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags); - } - - /* Update the planes if changed or disable if we don't have any. */ diff --git a/queue-5.10/series b/queue-5.10/series index 7a19a765b07..f4e82d24a3e 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -105,7 +105,6 @@ usb-typec-add-missing-uevent-when-partner-support-pd.patch usb-dwc3-gadget-fix-event-pending-check.patch tty-serial-samsung_tty-set-dma-burst_size-to-1.patch vt-fix-memory-overlapping-when-deleting-chars-in-the-buffer.patch -drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch serial-8250-fix-return-error-code-in-serial8250_request_std_resource.patch serial-stm32-clear-prev-values-before-setting-rts-delays.patch serial-pl011-upstat_autorts-requires-.throttle-unthrottle.patch diff --git a/queue-5.15/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch b/queue-5.15/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch deleted file mode 100644 index 3d7f58a9feb..00000000000 --- a/queue-5.15/drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch +++ /dev/null @@ -1,111 +0,0 @@ -From 3283c83eb6fcfbda8ea03d7149d8e42e71c5d45e Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michel=20D=C3=A4nzer?= -Date: Mon, 11 Jul 2022 16:51:31 +0200 -Subject: drm/amd/display: Ensure valid event timestamp for cursor-only commits -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -From: Michel Dänzer - -commit 3283c83eb6fcfbda8ea03d7149d8e42e71c5d45e upstream. - -Requires enabling the vblank machinery for them. - -Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2030 -Signed-off-by: Michel Dänzer -Signed-off-by: Alex Deucher -Cc: stable@vger.kernel.org -Signed-off-by: Greg Kroah-Hartman ---- - drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 43 ++++++++++++++++++++-- - 1 file changed, 40 insertions(+), 3 deletions(-) - ---- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c -@@ -454,6 +454,26 @@ static void dm_pflip_high_irq(void *inte - vrr_active, (int) !e); - } - -+static void dm_crtc_handle_vblank(struct amdgpu_crtc *acrtc) -+{ -+ struct drm_crtc *crtc = &acrtc->base; -+ struct drm_device *dev = crtc->dev; -+ unsigned long flags; -+ -+ drm_crtc_handle_vblank(crtc); -+ -+ spin_lock_irqsave(&dev->event_lock, flags); -+ -+ /* Send completion event for cursor-only commits */ -+ if (acrtc->event && acrtc->pflip_status != AMDGPU_FLIP_SUBMITTED) { -+ drm_crtc_send_vblank_event(crtc, acrtc->event); -+ drm_crtc_vblank_put(crtc); -+ acrtc->event = NULL; -+ } -+ -+ spin_unlock_irqrestore(&dev->event_lock, flags); -+} -+ - static void dm_vupdate_high_irq(void *interrupt_params) - { - struct common_irq_params *irq_params = interrupt_params; -@@ -492,7 +512,7 @@ static void dm_vupdate_high_irq(void *in - * if a pageflip happened inside front-porch. - */ - if (vrr_active) { -- drm_crtc_handle_vblank(&acrtc->base); -+ dm_crtc_handle_vblank(acrtc); - - /* BTR processing for pre-DCE12 ASICs */ - if (acrtc->dm_irq_params.stream && -@@ -544,7 +564,7 @@ static void dm_crtc_high_irq(void *inter - * to dm_vupdate_high_irq after end of front-porch. - */ - if (!vrr_active) -- drm_crtc_handle_vblank(&acrtc->base); -+ dm_crtc_handle_vblank(acrtc); - - /** - * Following stuff must happen at start of vblank, for crc -@@ -8553,6 +8573,7 @@ static void amdgpu_dm_commit_planes(stru - struct amdgpu_bo *abo; - uint32_t target_vblank, last_flip_vblank; - bool vrr_active = amdgpu_dm_vrr_active(acrtc_state); -+ bool cursor_update = false; - bool pflip_present = false; - struct { - struct dc_surface_update surface_updates[MAX_SURFACES]; -@@ -8588,8 +8609,13 @@ static void amdgpu_dm_commit_planes(stru - struct dm_plane_state *dm_new_plane_state = to_dm_plane_state(new_plane_state); - - /* Cursor plane is handled after stream updates */ -- if (plane->type == DRM_PLANE_TYPE_CURSOR) -+ if (plane->type == DRM_PLANE_TYPE_CURSOR) { -+ if ((fb && crtc == pcrtc) || -+ (old_plane_state->fb && old_plane_state->crtc == pcrtc)) -+ cursor_update = true; -+ - continue; -+ } - - if (!fb || !crtc || pcrtc != crtc) - continue; -@@ -8750,6 +8776,17 @@ static void amdgpu_dm_commit_planes(stru - bundle->stream_update.vrr_infopacket = - &acrtc_state->stream->vrr_infopacket; - } -+ } else if (cursor_update && acrtc_state->active_planes > 0 && -+ !acrtc_state->force_dpms_off && -+ acrtc_attach->base.state->event) { -+ drm_crtc_vblank_get(pcrtc); -+ -+ spin_lock_irqsave(&pcrtc->dev->event_lock, flags); -+ -+ acrtc_attach->event = acrtc_attach->base.state->event; -+ acrtc_attach->base.state->event = NULL; -+ -+ spin_unlock_irqrestore(&pcrtc->dev->event_lock, flags); - } - - /* Update the planes if changed or disable if we don't have any. */ diff --git a/queue-5.15/series b/queue-5.15/series index 8a1709aaf12..7e9e00845cf 100644 --- a/queue-5.15/series +++ b/queue-5.15/series @@ -160,7 +160,6 @@ usb-typec-add-missing-uevent-when-partner-support-pd.patch usb-dwc3-gadget-fix-event-pending-check.patch tty-serial-samsung_tty-set-dma-burst_size-to-1.patch vt-fix-memory-overlapping-when-deleting-chars-in-the-buffer.patch -drm-amd-display-ensure-valid-event-timestamp-for-cursor-only-commits.patch serial-8250-fix-return-error-code-in-serial8250_request_std_resource.patch serial-stm32-clear-prev-values-before-setting-rts-delays.patch serial-pl011-upstat_autorts-requires-.throttle-unthrottle.patch -- 2.47.3