Use correct ScrnInfoPtr in redisplay_dirty
PATCH 1/1 Use correct ScrnInfoPtr in redisplay_dirty
From: Michel Dänzer <[email protected]>
We used the destination pixmap's screen for flushing glamor. But when we are the master screen, the destination pixmap is from the slave screen.
Fixes crash when the slave screen isn't using glamor as well.
Bugzilla: https://bugs.freedesktop.org/103613
DrawablePtr")
--- src/amdgpu_kms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
src/amdgpu_kms.c +6 -2
@@ -479,7 +479,11 @@ dirty_region(PixmapDirtyUpdatePtr dirty)static void redisplay_dirty (PixmapDirtyUpdatePtr dirty,RegionPtr region) { -ScrnInfoPtr scrn =xf86ScreenToScrn (dirty->slave_dst->drawable.pScreen); +#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC +ScrnInfoPtr src_scrn =xf86ScreenToScrn (dirty->src->pScreen); +#else +ScrnInfoPtr src_scrn =xf86ScreenToScrn (dirty->src->drawable.pScreen); +#endif if (RegionNil (region)) goto out;
@@ -493,7 +497,7 @@ redisplay_dirty(PixmapDirtyUpdatePtr dirty, RegionPtr region)PixmapSyncDirtyHelper (dirty, region);#endif -amdgpu_glamor_flush (scrn); +amdgpu_glamor_flush (src_scrn);if (dirty->slave_dst->master_pixmap)DamageRegionProcessPending (&dirty->slave_dst->drawable);
Signature · 6 lines
2.15.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): 20171108174725.20180-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 14 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Wednesday, November 08, 2017 12:47 PM
To: [email protected]
Subject: [PATCH xf86-video-amdgpu] Use correct ScrnInfoPtr inredisplay_dirtyFrom: Michel Dänzer <[email protected]>
We used the destination pixmap's screen for flushing glamor. But when we are the master screen, the destination pixmap is from the slave screen.
Quoted 6 lines
Fixes crash when the slave screen isn't using glamor as well.
Bugzilla: https://bugs.freedesktop.org/103613
Fixes e15b23663cd1 ("Adapt to PixmapDirtyUpdateRec::src being aDrawablePtr")
Signed-off-by Michel Dänzer <[email protected]>
Quoted 34 lines
--- src/amdgpu_kms.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)src/amdgpu_kms.c +5
-1@@ -479,7 +479,11 @@ dirty_region(PixmapDirtyUpdatePtr dirty)static void redisplay_dirty (PixmapDirtyUpdatePtr dirty,RegionPtr region) { -ScrnInfoPtr scrn =xf86ScreenToScrn (dirty->slave_dst- >drawable.pScreen); +#ifdef HAS_DIRTYTRACKING_DRAWABLE_SRC +ScrnInfoPtr src_scrn =xf86ScreenToScrn (dirty->src->pScreen); +#else +ScrnInfoPtr src_scrn =xf86ScreenToScrn (dirty->src- >drawable.pScreen); +#endif src/amdgpu_kms.c +1
-1if (RegionNil (region)) goto out;@@ -493,7 +497,7 @@ redisplay_dirty(PixmapDirtyUpdatePtr dirty, RegionPtr region)PixmapSyncDirtyHelper (dirty ,region );#endif -amdgpu_glamor_flush (scrn); +amdgpu_glamor_flush (src_scrn);if (dirty->slave_dst->master_pixmap) DamageRegionProcessPending(&dirty->slave_dst-Quoted 1 line
drawable);
Quoted 7 lines
--
2.15.0_______________________________________________
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