Re: [PATCH xserver] Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

2017-03-22 Thread Peter Hutterer
On Thu, Mar 23, 2017 at 12:10:24AM -0400, Alex Deucher wrote:
> On Wed, Mar 22, 2017 at 11:42 PM, Michel Dänzer  wrote:
> > From: Michel Dänzer 
> >
> > There is no pixmap associated with source-only pictures.
> >
> > Fixes Xephyr -fakexa crashing on startup.
> >
> > Signed-off-by: Michel Dänzer 
> 
> Reviewed-by: Alex Deucher 

remote: Updating patchwork state for 
https://patchwork.freedesktop.org/project/Xorg/list/
remote: I: patch #145879 updated using rev 
eb2cf11724df5cbe0be3cce1ad4c61ba61e8ec6b.
remote: I: 1 patch(es) updated to state Accepted.

Cheers,
   Peter
> 
> > ---
> >  hw/kdrive/ephyr/ephyr_draw.c | 6 --
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
> > index 5b8a1d504..66371334a 100644
> > --- a/hw/kdrive/ephyr/ephyr_draw.c
> > +++ b/hw/kdrive/ephyr/ephyr_draw.c
> > @@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, 
> > PicturePtr pMaskPicture,
> >  EphyrFakexaPriv *fakexa = scrpriv->fakexa;
> >
> >  ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
> > -ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
> > +if (pSrc != NULL)
> > +ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
> >  if (pMask != NULL)
> >  ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
> >
> > @@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
> >
> >  if (fakexa->pMask != NULL)
> >  ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
> > -ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
> > +if (fakexa->pSrc != NULL)
> > +ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
> >  ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
> >  }
> >
> > --
> > 2.11.0
> >
> > ___
> > 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
> ___
> 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
> 
___
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] Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

2017-03-22 Thread Alex Deucher
On Wed, Mar 22, 2017 at 11:42 PM, Michel Dänzer  wrote:
> From: Michel Dänzer 
>
> There is no pixmap associated with source-only pictures.
>
> Fixes Xephyr -fakexa crashing on startup.
>
> Signed-off-by: Michel Dänzer 

Reviewed-by: Alex Deucher 

> ---
>  hw/kdrive/ephyr/ephyr_draw.c | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
> index 5b8a1d504..66371334a 100644
> --- a/hw/kdrive/ephyr/ephyr_draw.c
> +++ b/hw/kdrive/ephyr/ephyr_draw.c
> @@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, 
> PicturePtr pMaskPicture,
>  EphyrFakexaPriv *fakexa = scrpriv->fakexa;
>
>  ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
> -ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
> +if (pSrc != NULL)
> +ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
>  if (pMask != NULL)
>  ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
>
> @@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
>
>  if (fakexa->pMask != NULL)
>  ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
> -ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
> +if (fakexa->pSrc != NULL)
> +ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
>  ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
>  }
>
> --
> 2.11.0
>
> ___
> 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
___
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] Xephyr: Handle source-only pictures in ephyrPrepare/DoneComposite

2017-03-22 Thread Michel Dänzer
From: Michel Dänzer 

There is no pixmap associated with source-only pictures.

Fixes Xephyr -fakexa crashing on startup.

Signed-off-by: Michel Dänzer 
---
 hw/kdrive/ephyr/ephyr_draw.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/hw/kdrive/ephyr/ephyr_draw.c b/hw/kdrive/ephyr/ephyr_draw.c
index 5b8a1d504..66371334a 100644
--- a/hw/kdrive/ephyr/ephyr_draw.c
+++ b/hw/kdrive/ephyr/ephyr_draw.c
@@ -254,7 +254,8 @@ ephyrPrepareComposite(int op, PicturePtr pSrcPicture, 
PicturePtr pMaskPicture,
 EphyrFakexaPriv *fakexa = scrpriv->fakexa;
 
 ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST);
-ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
+if (pSrc != NULL)
+ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC);
 if (pMask != NULL)
 ephyrPreparePipelinedAccess(pMask, EXA_PREPARE_MASK);
 
@@ -298,7 +299,8 @@ ephyrDoneComposite(PixmapPtr pDst)
 
 if (fakexa->pMask != NULL)
 ephyrFinishPipelinedAccess(fakexa->pMask, EXA_PREPARE_MASK);
-ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
+if (fakexa->pSrc != NULL)
+ephyrFinishPipelinedAccess(fakexa->pSrc, EXA_PREPARE_SRC);
 ephyrFinishPipelinedAccess(fakexa->pDst, EXA_PREPARE_DEST);
 }
 
-- 
2.11.0

___
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