Re: [PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip

2018-06-08 Thread Roman Gilg
On Thu, Jun 7, 2018 at 6:27 PM Michel Dänzer  wrote:
>
> From: Michel Dänzer 
>
> The incorrect values could result in the new pixmap's contents
> getting corrupted down the line.
>
> Bugzilla: https://bugs.freedesktop.org/106841
> Fixes: 029608dd8020 "present: Add window flip mode"

Thank you for patching this difficult to find issue. That's a
behavioral change to screen flips, that I missed.

Reviewed-by: Roman Gilg 
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip

2018-06-08 Thread Olivier Fourdan
Hi Michel,

On Thu, Jun 7, 2018 at 6:27 PM, Michel Dänzer  wrote:
> From: Michel Dänzer 
>
> The incorrect values could result in the new pixmap's contents
> getting corrupted down the line.
>
> Bugzilla: https://bugs.freedesktop.org/106841
> Fixes: 029608dd8020 "present: Add window flip mode"
> Signed-off-by: Michel Dänzer 
> ---
>  present/present_wnmd.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/present/present_wnmd.c b/present/present_wnmd.c
> index 80ffb014e..1e3958bfc 100644
> --- a/present/present_wnmd.c
> +++ b/present/present_wnmd.c
> @@ -469,6 +469,8 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t 
> ust, uint64_t crtc_msc)
>  PixmapPtr old_pixmap = screen->GetWindowPixmap(window);
>
>  /* Replace window pixmap with flip pixmap */
> +vblank->pixmap->screen_x = old_pixmap->screen_x;
> +vblank->pixmap->screen_y = old_pixmap->screen_y;
>  present_set_tree_pixmap(toplvl_window, old_pixmap, 
> vblank->pixmap);
>  vblank->pixmap->refcnt++;
>  dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id);
> --
> 2.17.1
>
> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel

Yeap, works for me! That  one was starting to give me headaches...

Tested-by: Olivier Fourdan 

Thanks
Olivier
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip

2018-06-07 Thread Keith Packard
Michel Dänzer  writes:

> From: Michel Dänzer 
>
> The incorrect values could result in the new pixmap's contents
> getting corrupted down the line.
>
> Bugzilla: https://bugs.freedesktop.org/106841
> Fixes: 029608dd8020 "present: Add window flip mode"

Ah. Makes sense. Screen flips are always at 0,0...

Reviewed-by: Keith Packard 

-- 
-keith


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip

2018-06-07 Thread Adam Jackson
On Thu, 2018-06-07 at 18:27 +0200, Michel Dänzer wrote:
> From: Michel Dänzer 
> 
> The incorrect values could result in the new pixmap's contents
> getting corrupted down the line.
> 
> Bugzilla: https://bugs.freedesktop.org/106841
> Fixes: 029608dd8020 "present: Add window flip mode"
> Signed-off-by: Michel Dänzer 

Reviewed-by: Adam Jackson 

- ajax
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

[PATCH xserver] present/wnmd: Preserve window pixmap's screen_x/y on flip

2018-06-07 Thread Michel Dänzer
From: Michel Dänzer 

The incorrect values could result in the new pixmap's contents
getting corrupted down the line.

Bugzilla: https://bugs.freedesktop.org/106841
Fixes: 029608dd8020 "present: Add window flip mode"
Signed-off-by: Michel Dänzer 
---
 present/present_wnmd.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/present/present_wnmd.c b/present/present_wnmd.c
index 80ffb014e..1e3958bfc 100644
--- a/present/present_wnmd.c
+++ b/present/present_wnmd.c
@@ -469,6 +469,8 @@ present_wnmd_execute(present_vblank_ptr vblank, uint64_t 
ust, uint64_t crtc_msc)
 PixmapPtr old_pixmap = screen->GetWindowPixmap(window);
 
 /* Replace window pixmap with flip pixmap */
+vblank->pixmap->screen_x = old_pixmap->screen_x;
+vblank->pixmap->screen_y = old_pixmap->screen_y;
 present_set_tree_pixmap(toplvl_window, old_pixmap, 
vblank->pixmap);
 vblank->pixmap->refcnt++;
 dixDestroyPixmap(old_pixmap, old_pixmap->drawable.id);
-- 
2.17.1

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel