Retry get_fb_ptr in get_fb
PATCH 1/1 Retry get_fb_ptr in get_fb
From: Michel Dänzer <[email protected]>
If get_fb_ptr returns NULL, try again after pixmap_get_handle, it should work then.
Fixes spurious Present page flipping failures using "normal" pixmaps which aren't shared with direct rendering clients, e.g. with a compositor using the RENDER extension.
Bugzilla: https://bugs.freedesktop.org/110417
(Ported from amdgpu commit bf61e6d7ac1a5754b1026d7f80acf25ef622c491)
--- src/radeon.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
src/radeon.h +16 -15
@@ -877,21 +877,22 @@ static inline struct drmmode_fb* radeon_pixmap_get_fb(PixmapPtr pix) {struct drmmode_fb **fb_ptr =radeon_pixmap_get_fb_ptr (pix); - -if (!fb_ptr) -return NULL ; - -if (!*fb_ptr) { -uint32_t handle; - -if (radeon_get_pixmap_handle (pix, &handle)) { -ScrnInfoPtr scrn =xf86ScreenToScrn (pix->drawable.pScreen); -RADEONEntPtr pRADEONEnt =RADEONEntPriv (scrn); - - *fb_ptr =radeon_fb_create (scrn, pRADEONEnt->fd, pix->drawable.width, - pix->drawable.height, pix->devKind, - handle); - } +uint32_t handle; + +if (fb_ptr && *fb_ptr) +return *fb_ptr; + +if (radeon_get_pixmap_handle (pix, &handle)) { +ScrnInfoPtr scrn =xf86ScreenToScrn (pix->drawable.pScreen); +RADEONEntPtr pRADEONEnt =RADEONEntPriv (scrn); + +if (!fb_ptr) + fb_ptr =radeon_pixmap_get_fb_ptr (pix); + + *fb_ptr =radeon_fb_create (scrn, pRADEONEnt->fd, + pix->drawable.width, + pix->drawable.height, pix->devKind, + handle); }return *fb_ptr;
Signature · 6 lines
2.20.1 _______________________________________________ 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): 20190424103230.20174-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Reviewed-by________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Michel Dänzer <[email protected]>
Sent: Wednesday, April 24, 2019 6:32 AM
To: [email protected]
Subject: [PATCH xf86-video-ati] Retry get_fb_ptr in get_fb
From: Michel Dänzer <[email protected]>
If get_fb_ptr returns NULL, try again after pixmap_get_handle, it should work then.
Fixes spurious Present page flipping failures using "normal" pixmaps which aren't shared with direct rendering clients, e.g. with a compositor using the RENDER extension.
Bugzilla: https://bugs.freedesktop.org/110417
(Ported from amdgpu commit bf61e6d7ac1a5754b1026d7f80acf25ef622c491)
--- src/radeon.h | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
src/radeon.h +16 -15
@@ -877,21 +877,22 @@ static inline struct drmmode_fb* radeon_pixmap_get_fb(PixmapPtr pix) {struct drmmode_fb **fb_ptr =radeon_pixmap_get_fb_ptr (pix); - -if (!fb_ptr) -return NULL ; - -if (!*fb_ptr) { -uint32_t handle; - -if (radeon_get_pixmap_handle (pix, &handle)) { -ScrnInfoPtr scrn =xf86ScreenToScrn (pix->drawable.pScreen); -RADEONEntPtr pRADEONEnt =RADEONEntPriv (scrn); - - *fb_ptr =radeon_fb_create (scrn, pRADEONEnt->fd, pix->drawable.width, - pix->drawable.height, pix->devKind, - handle); - } +uint32_t handle; + +if (fb_ptr && *fb_ptr) +return *fb_ptr; + +if (radeon_get_pixmap_handle (pix, &handle)) { +ScrnInfoPtr scrn =xf86ScreenToScrn (pix->drawable.pScreen); +RADEONEntPtr pRADEONEnt =RADEONEntPriv (scrn); + +if (!fb_ptr) + fb_ptr =radeon_pixmap_get_fb_ptr (pix); + + *fb_ptr =radeon_fb_create (scrn, pRADEONEnt->fd, + pix->drawable.width, + pix->drawable.height, pix->devKind, + handle); }return *fb_ptr;
--
2.20.1
_______________________________________________
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