present: Also flush before using a flip to unflip
PATCH 1/3 present: Also flush before using a flip to unflip
From: Michel Dänzer <[email protected]>
Not doing so might result in intermittently scanning out stale contents of the screen pixmap.
--- src/radeon_present.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/radeon_present.c +2 -1
@@ -374,6 +374,8 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)int old_fb_id;int i; +radeon_cs_flush_indirect (scrn); +if (!radeon_present_check_unflip (scrn)) goto modeset;
@@ -404,7 +406,6 @@ modeset: old_fb_id = info->drmmode.fb_id; info->drmmode.fb_id =0 ; -radeon_cs_flush_indirect (scrn);radeon_bo_wait (info->front_bo);for (i =0 ; i < config->num_crtc; i++) {xf86CrtcPtr crtc = config->crtc[i];
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170228092014.27004-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH 2/3 present: Use async flip for unflip if possible
From: Michel Dänzer <[email protected]>
In that case, unflip operations should finish faster in general.
--- src/radeon_present.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
src/radeon_present.c +6 -1
@@ -48,6 +48,8 @@#include "present.h" +static present_screen_info_rec radeon_present_screen_info; +struct radeon_present_vblank_event {uint64_t event_id;Bool unflip;
@@ -370,6 +372,9 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)xf86CrtcConfigPtr config =XF86_CRTC_CONFIG_PTR (scrn);struct radeon_present_vblank_event *event;PixmapPtr pixmap = screen->GetScreenPixmap (screen); +enum drmmode_flip_sync flip_sync = + (radeon_present_screen_info.capabilities & PresentCapabilityAsync) ? +FLIP_ASYNC :FLIP_VSYNC ;uint32_t handle;int old_fb_id;int i;
@@ -396,7 +401,7 @@ radeon_present_unflip(ScreenPtr screen, uint64_t event_id)if (radeon_do_pageflip (scrn,RADEON_DRM_QUEUE_CLIENT_DEFAULT , handle, event_id, event,-1 , radeon_present_flip_event, - radeon_present_flip_abort,FLIP_VSYNC ,0 )) + radeon_present_flip_abort, flip_sync,0 ))return ; modeset:
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/3 present: Flush before flipping
In reply to a message not in the archiveFrom: Michel Dänzer <[email protected]>
This isn't necessary for DRI clients, but the Present extension can also be used for presenting normal pixmaps rendered to via the X11 protocol.
--- src/radeon_present.c | 2 ++ 1 file changed, 2 insertions(+)
src/radeon_present.c +2 -0
@@ -347,6 +347,8 @@ radeon_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, event->event_id = event_id; +radeon_cs_flush_indirect (scrn); + ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, handle, event_id, event, crtc_id, radeon_present_flip_event,
Signature · 6 lines
2.11.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 20170228092014.27004-3-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Reviewed-byRe: [PATCH xf86-video-ati 3/3] present: Flush before flipping
Quoted 6 lines · Michel Dänzer
From: Michel Dänzer <[email protected]>
This isn't necessary for DRI clients, but the Present extension can also be used for presenting normal pixmaps rendered to via the X11 protocol.
Signed-off-by Michel Dänzer <[email protected]>
Series is:
Quoted 20 lines
--- src/radeon_present.c | 2 ++ 1 file changed, 2 insertions(+)src/radeon_present.c +2
-1@@ -347,6 +347,8 @@ radeon_present_flip(RRCrtcPtr crtc, uint64_t event_id, uint64_t target_msc, event->event_id = event_id; +radeon_cs_flush_indirect (scrn); + ret = radeon_do_pageflip(scrn, RADEON_DRM_QUEUE_CLIENT_DEFAULT, handle, event_id, event, crtc_id, radeon_present_flip_event, --2.11.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx