All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jim Qu <Jim.Qu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Jim Qu <Jim.Qu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH] sync amdgpu scanout update event before mode setting
Date: Tue, 17 Apr 2018 19:11:16 +0800	[thread overview]
Message-ID: <1523963476-17769-1-git-send-email-Jim.Qu@amd.com> (raw)

There is a case that when set screen from reverse to normal, the old
scanout damage is freed in modesetting before sanout update handler,
so it causes segment fault issue.

Change-Id: I0fc6282688054d1e0f23d1ba66d4227553de53f3
Signed-off-by: Jim Qu <Jim.Qu@amd.com>
---
 src/drmmode_display.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 85970d1..ea38e29 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -902,6 +902,9 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
 		drmmode_crtc_wait_pending_event(drmmode_crtc, pAMDGPUEnt->fd,
 						drmmode_crtc->flip_pending);
 
+		drmmode_crtc_wait_pending_event(drmmode_crtc, pAMDGPUEnt->fd,
+						drmmode_crtc->scanout_update_pending);
+
 		if (!drmmode_set_mode(crtc, fb, mode, x, y))
 			goto done;
 
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2018-04-17 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-17 11:11 Jim Qu [this message]
     [not found] ` <1523963476-17769-1-git-send-email-Jim.Qu-5C7GfCeVMHo@public.gmane.org>
2018-04-18  2:22   ` 答复: [PATCH] sync amdgpu scanout update event before mode setting Qu, Jim
2018-04-18  8:55   ` Michel Dänzer
     [not found]     ` <6c324f68-e642-fdc9-3fe7-86f956f23a9e-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-18  9:00       ` 答复: " Qu, Jim
     [not found]         ` <DM3PR12MB087344C174A5B88C5D55AFB899B60-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-18  9:12           ` Qu, Jim
     [not found]             ` <DM3PR12MB087326EF8F4A655E0DBE16FF99B60-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-18  9:29               ` Michel Dänzer
     [not found]                 ` <558e5cc3-2ff1-5116-fb67-2a1ce927cc52-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-18  9:44                   ` 答复: " Qu, Jim
     [not found]                     ` <DM3PR12MB087312990AC89B251353463299B60-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-18  9:54                       ` Michel Dänzer
     [not found]                         ` <13cab810-0bb7-b6fc-3e8a-7b1f0835b303-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-04-18  9:57                           ` 答复: " Qu, Jim
     [not found]                             ` <DM3PR12MB0873E5ADB6D637077BEADAEB99B60-4hRkV8tDpBiYEITDcfEJ8AdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-04-18 10:12                               ` Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1523963476-17769-1-git-send-email-Jim.Qu@amd.com \
    --to=jim.qu-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.