xf86-video-ati: Branch 'master' - 2 commits
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Mar 4 16:07:45 UTC 2019
src/radeon_dri2.c | 19 +++++++++++++++----
src/radeon_present.c | 8 ++++++--
2 files changed, 21 insertions(+), 6 deletions(-)
New commits:
commit c301b8af25d2c2cd49035a4395ebe6c3612df366
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Mar 1 18:28:11 2019 +0100
dri2: Call drm_queue_handle_deferred in dri2_deferred_event
drm_queue_handler just puts the event on the signalled list; without
calling drm_queue_handle_deferred, actual processing of the event may be
delayed indefinitely, e.g. until another event arrives from the kernel.
This could result in DRI2 clients hanging during DPMS off.
Fixes: ba83a866af5a "Add radeon_drm_handle_event wrapper for
drmHandleEvent"
(Ported from amdgpu commit 09be74a3d1dd9604336d9a27f98d132b262dcbaf)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index b5d6835c..a9f14e8d 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -979,12 +979,18 @@ CARD32 radeon_dri2_deferred_event(OsTimerPtr timer, CARD32 now, pointer data)
if (ret) {
xf86DrvMsg(scrn->scrnIndex, X_ERROR,
"%s cannot get current time\n", __func__);
- if (event_info->drm_queue_seq)
+
+ if (event_info->drm_queue_seq) {
drmmode_crtc->drmmode->event_context.
vblank_handler(pRADEONEnt->fd, 0, 0, 0,
(void*)event_info->drm_queue_seq);
- else
+ drmmode_crtc->wait_flip_nesting_level++;
+ radeon_drm_queue_handle_deferred(crtc);
+
+ } else {
radeon_dri2_frame_event_handler(crtc, 0, 0, data);
+ }
+
return 0;
}
/*
@@ -995,13 +1001,18 @@ CARD32 radeon_dri2_deferred_event(OsTimerPtr timer, CARD32 now, pointer data)
delta_seq = delta_t * drmmode_crtc->dpms_last_fps;
delta_seq /= 1000000;
frame = (CARD64)drmmode_crtc->dpms_last_seq + delta_seq;
- if (event_info->drm_queue_seq)
+
+ if (event_info->drm_queue_seq) {
drmmode_crtc->drmmode->event_context.
vblank_handler(pRADEONEnt->fd, frame, drm_now / 1000000,
drm_now % 1000000,
(void*)event_info->drm_queue_seq);
- else
+ drmmode_crtc->wait_flip_nesting_level++;
+ radeon_drm_queue_handle_deferred(crtc);
+ } else {
radeon_dri2_frame_event_handler(crtc, frame, drm_now, data);
+ }
+
return 0;
}
commit 705020b6247eaa062edc9c88e6ad52f8c5468051
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Mar 1 18:23:30 2019 +0100
present: Check that flip and screen pixmap pitches match
If they don't, flipping will result in corrupted display.
Test case:
* Run Xorg at 1920x1080 with no window manager
* glxgears -geometry 2048x1080
The Present extension code in xserver 1.21 will check for this.
(Ported from amdgpu commit a636f42b496b0604ca00a144690ece61d1a88a27)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/radeon_present.c b/src/radeon_present.c
index 0b55117e..38a9a6b7 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -256,7 +256,7 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
ScrnInfoPtr scrn = xf86_crtc->scrn;
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
RADEONInfoPtr info = RADEONPTR(scrn);
- PixmapPtr screen_pixmap;
+ PixmapPtr screen_pixmap = screen->GetScreenPixmap(screen);
int num_crtcs_on;
int i;
@@ -272,10 +272,14 @@ radeon_present_check_flip(RRCrtcPtr crtc, WindowPtr window, PixmapPtr pixmap,
if (info->drmmode.dri2_flipping)
return FALSE;
+#if XORG_VERSION_CURRENT <= XORG_VERSION_NUMERIC(1, 20, 99, 1, 0)
+ if (pixmap->devKind != screen_pixmap->devKind)
+ return FALSE;
+#endif
+
/* The kernel driver doesn't handle flipping between BOs with different
* tiling parameters correctly yet
*/
- screen_pixmap = screen->GetScreenPixmap(screen);
if (radeon_present_get_pixmap_tiling_flags(info, pixmap) !=
radeon_present_get_pixmap_tiling_flags(info, screen_pixmap))
return FALSE;
More information about the xorg-commit
mailing list