summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong Gan <yong.gan@nxp.com>2017-11-21 03:31:44 +0300
committerYong Gan <yong.gan@nxp.com>2017-11-21 05:20:33 +0300
commit30163df36c62b3375dfd77adb18e46fb5fbc0c77 (patch)
treeb1aeef62d0c08d23479a8230481ec51cb35594c0
parent74c20b88b01356843d10cf3a055dacb44596844c (diff)
downloadxf86-video-imx-vivante-imx_4.9.51_imx8_beta1.tar.xz
MGS-3426 [#ccc] x11 server down when run sdk app multi times in backgroundrel_imx_4.9.51_8qm_beta1imx_4.9.51_imx8_beta1
Return -1 if G2d surface alloc failed, because the client only check the ruturn value < 0. Date: Nov 20, 2017 Signed-off-by Yong Gan <yong.gan@nxp.com> Reviewed-by: Mingming Meng <mingming.meng@nxp.com> Reviewed-by: Xianzhong <xianzhong.li@nxp.com>
-rw-r--r--EXA/src/imx_drm/imx_g2d_dri3.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/EXA/src/imx_drm/imx_g2d_dri3.c b/EXA/src/imx_drm/imx_g2d_dri3.c
index e46cf8b..349b1b4 100644
--- a/EXA/src/imx_drm/imx_g2d_dri3.c
+++ b/EXA/src/imx_drm/imx_g2d_dri3.c
@@ -124,7 +124,7 @@ static int imx_g2d_dri3_fd_from_pixmap(ScreenPtr pScreen, PixmapPtr pPixmap,
Viv2DPixmapPtr pVivPix = exaGetPixmapDriverPrivate(pPixmap);
if (!pVivPix || !pVivPix->mVidMemInfo ) {
- return BadMatch;
+ return -1;
}
surf = (GenericSurfacePtr)pVivPix->mVidMemInfo;
@@ -133,7 +133,7 @@ static int imx_g2d_dri3_fd_from_pixmap(ScreenPtr pScreen, PixmapPtr pPixmap,
fd = g2d_buf_export_fd(surf->g2dbuf);
if( fd < 0) {
- return BadMatch;
+ return -1;
}
*stride = pPixmap->devKind;
*size = surf->g2dbuf->buf_size;
@@ -158,4 +158,4 @@ Bool imx_g2d_dri3_creenInit(ScreenPtr pScreen){
return dri3_screen_init(pScreen, &imx_g2d_dri3_info);
}
-#endif \ No newline at end of file
+#endif