Destroy all dedicated scanout buffers during CloseScreen
PATCH 1/4 Destroy all dedicated scanout buffers during CloseScreen
From: Michel Dänzer <[email protected]>
Fixes leaking active scanout buffers across a server reset, which also fixes server reset with glamor and active scanout buffers.
(Ported from amdgpu commit d96dabc71b1b32dc4b422a9633cdd4e0e95da052)
--- src/drmmode_display.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
src/drmmode_display.c +10 -0
@@ -2386,8 +2386,10 @@ void drmmode_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode)void drmmode_fini (ScrnInfoPtr pScrn,drmmode_ptr drmmode) { +xf86CrtcConfigPtr config =XF86_CRTC_CONFIG_PTR (pScrn);RADEONEntPtr pRADEONEnt =RADEONEntPriv (pScrn);RADEONInfoPtr info =RADEONPTR (pScrn); +int c;if (info->dri2.pKernelDRMVersion->version_minor <4 || !info->drmmode_inited)return ;
@@ -2402,6 +2404,14 @@ void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode) drm_wakeup_handler, drmmode);#endif } + +for (c =0 ; c < config->num_crtc; c++) { +xf86CrtcPtr crtc = config->crtc[c]; +drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + +drmmode_crtc_scanout_destroy (&info->drmmode, &drmmode_crtc->scanout[0 ]); +drmmode_crtc_scanout_destroy (&info->drmmode, &drmmode_crtc->scanout[1 ]); + } }
Signature · 6 lines
2.9.3 _______________________________________________ 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): 20160914081447.7221-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
PATCH 2/4 Fix radeon_mode_hotplug crash on multi GPU platform.
From: Qiang Yu <[email protected]>
On multi GPU platform, some screen is created by other GPU DDX.
(Ported from amdgpu commit 978242977e5dc905e1d5a46b1b0d34b356c7af26)
--- src/drmmode_display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
src/drmmode_display.c +2 -1
@@ -2647,7 +2647,8 @@ restart_destroy:xf86CrtcConfigPtr loop_config =XF86_CRTC_CONFIG_PTR (loop_scrn); -if (RADEONEntPriv (loop_scrn) != pRADEONEnt) +if (strcmp (loop_scrn->driverName, scrn->driverName) || +RADEONEntPriv (loop_scrn) != pRADEONEnt)continue ;for (j =0 ; !found && j < loop_config->num_output; j++) {
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 3/4 DRI2: Add interpolated_vblanks in radeon_dri2_get_crtc_msc
In reply to a message not in the archiveFrom: Michel Dänzer <[email protected]>
We need that in radeon_dri2_drawable_crtc as well for priv->vblank_delta to work as intended.
radeon_dri2_get_msc was already doing this.
Fixes hangs in some cases when using VDPAU via DRI2 and moving the window between CRTCs.
(Ported from amdgpu commit abd1a7901c95e4bc78415cf1b7923623b9177152)
--- src/radeon_dri2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
src/radeon_dri2.c +6 -2
@@ -516,10 +516,11 @@ static uint32_t radeon_get_msc_delta(DrawablePtr pDraw, xf86CrtcPtr crtc)*/ static Bool radeon_dri2_get_crtc_msc (xf86CrtcPtr crtc,CARD64 *ust,CARD64 *msc) { +drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; +if (!radeon_crtc_is_enabled (crtc) ||drmmode_crtc_get_ust_msc (crtc, ust, msc) != Success) {/* CRTC is not running, extrapolate MSC and timestamp */ -drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;ScrnInfoPtr scrn = crtc->scrn;RADEONInfoPtr info =RADEONPTR (scrn);CARD64 now, delta_t, delta_seq;
@@ -544,6 +545,8 @@ static Bool radeon_dri2_get_crtc_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc) *msc += delta_seq; } + *msc += drmmode_crtc->interpolated_vblanks; +return TRUE; }
@@ -991,7 +994,8 @@ static int radeon_dri2_get_msc(DrawablePtr draw, CARD64 *ust, CARD64 *msc)if (!radeon_dri2_get_crtc_msc (crtc, ust, msc))return FALSE; - *msc +=radeon_get_msc_delta (draw, crtc); +if (draw && draw->type ==DRAWABLE_WINDOW ) + *msc +=get_dri2_window_priv ((WindowPtr )draw)->vblank_delta; *msc &=0xffffffff ;return TRUE; }
Signature · 6 lines
2.9.3 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
PATCH 4/4 DRI2: Fix radeon_dri2_exchange_buffers width/height copy'n'paste error
In reply to a message not in the archiveFrom: Qiang Yu <[email protected]>
(Ported from amdgpu commit 73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7)
--- src/radeon_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
src/radeon_dri2.c +1 -1
@@ -775,7 +775,7 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt region.extents.x1 = region.extents.y1 =0 ; region.extents.x2 = front_priv->pixmap->drawable.width; - region.extents.y2 = front_priv->pixmap->drawable.width; + region.extents.y2 = front_priv->pixmap->drawable.height; region.data =NULL ;DamageRegionAppend (&front_priv->pixmap->drawable, ®ion);
Signature · 6 lines
2.9.3 _______________________________________________ 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): 20160914081447.7221-4-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Alex Deucher
Reviewed-byRe: [PATCH xf86-video-ati 4/4] DRI2: Fix radeon_dri2_exchange_buffers width/height copy'n'paste error
Quoted 6 lines · Michel Dänzer
From: Qiang Yu <[email protected]>
Signed-off-by Qiang Yu <[email protected]>(Ported from amdgpu commit
73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7)Signed-off-by Michel Dänzer <[email protected]>
For the series:
Quoted 20 lines
--- src/radeon_dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)src/radeon_dri2.c +1
-2@@ -775,7 +775,7 @@ radeon_dri2_exchange_buffers(DrawablePtr draw, DRI2BufferPtr front, DRI2BufferPt region.extents.x1 = region.extents.y1 =0 ; region.extents.x2 = front_priv->pixmap->drawable.width; - region.extents.y2 = front_priv->pixmap->drawable.width; + region.extents.y2 = front_priv->pixmap->drawable.height; region.data =NULL ;DamageRegionAppend (&front_priv->pixmap->drawable, ®ion); --2.9.3
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