1 From 2d076ce73e849eae5c47941b6950efb65db498d2 Mon Sep 17 00:00:00 2001
2 From: Prabhu <prabhu.sundararaj@freescale.com>
3 Date: Wed, 29 Jul 2015 15:32:01 -0500
4 Subject: [PATCH] MGS-907: X11 EXA: Warnings causes GCC5.2 build to fail
6 VIV2DGPUSurfaceReAllocNonCached and imxRefreshModes were not
7 declared causing compiler warning.
9 Upstream Status: Pending
12 Signed-off-by: Prabhu <prabhu.sundararaj@freescale.com>
14 EXA/src/vivante_extension/vivante_ext.c | 4 ++--
15 EXA/src/vivante_fbdev/imx_display.c | 4 +++-
16 EXA/src/vivante_fbdev/vivante_fbdev_driver.c | 2 ++
17 EXA/src/vivante_gal/vivante_gal.h | 1 +
18 EXA/src/vivante_gal/vivante_gal_surface.c | 3 ++-
19 5 files changed, 10 insertions(+), 4 deletions(-)
20 mode change 100755 => 100644 EXA/src/vivante_extension/vivante_ext.c
21 mode change 100755 => 100644 EXA/src/vivante_gal/vivante_gal_surface.c
23 diff --git a/EXA/src/vivante_extension/vivante_ext.c b/EXA/src/vivante_extension/vivante_ext.c
26 index 3015d57..df6fb61
27 --- a/EXA/src/vivante_extension/vivante_ext.c
28 +++ b/EXA/src/vivante_extension/vivante_ext.c
31 #include "vivante_priv.h"
32 #include "vivante_common.h"
33 +#include "imx_display.h"
35 static unsigned char VIVEXTReqCode = 0;
36 static int VIVEXTErrorBase;
37 @@ -162,8 +163,7 @@ static int ProcVIVEXTDrawableSetFlag(register ClientPtr client)
38 VivPtr pViv = VIVPTR_FROM_SCREEN(pScreen);
41 - VIVGPUPtr gpuctx = (VIVGPUPtr) pViv->mGrCtx.mGpu;
42 - VIV2DGPUSurfaceReAllocNonCached(gpuctx, ppriv);
43 + VIV2DGPUSurfaceReAllocNonCached(&pViv->mGrCtx, ppriv);
47 diff --git a/EXA/src/vivante_fbdev/imx_display.c b/EXA/src/vivante_fbdev/imx_display.c
48 index d5303f9..43e9432 100644
49 --- a/EXA/src/vivante_fbdev/imx_display.c
50 +++ b/EXA/src/vivante_fbdev/imx_display.c
56 +#include <sys/ioctl.h>
60 @@ -83,7 +85,7 @@ GCD(int a, int b)
67 return (a * b) / GCD(a, b);
69 diff --git a/EXA/src/vivante_fbdev/vivante_fbdev_driver.c b/EXA/src/vivante_fbdev/vivante_fbdev_driver.c
70 index 3e289ce..88de4e0 100644
71 --- a/EXA/src/vivante_fbdev/vivante_fbdev_driver.c
72 +++ b/EXA/src/vivante_fbdev/vivante_fbdev_driver.c
75 #include "vivante_exa.h"
76 #include "vivante_ext.h"
77 +#include "vivante_dri.h"
78 #include "imx_display.h"
80 +#include <sys/ioctl.h>
82 #include <xorg/shmint.h>
84 diff --git a/EXA/src/vivante_gal/vivante_gal.h b/EXA/src/vivante_gal/vivante_gal.h
85 index 1fccbfd..46f0479 100644
86 --- a/EXA/src/vivante_gal/vivante_gal.h
87 +++ b/EXA/src/vivante_gal/vivante_gal.h
88 @@ -258,6 +258,7 @@ extern "C" {
89 Bool VIV2DCacheOperation(GALINFOPTR galInfo, Viv2DPixmapPtr ppix, VIVFLUSHTYPE flush_type);
90 Bool VIV2DGPUUserMemMap(char* logical, unsigned int physical, unsigned int size, void ** mappingInfo, unsigned int * gpuAddress);
91 Bool VIV2DGPUUserMemUnMap(char* logical, unsigned int size, void * mappingInfo, unsigned int gpuAddress);
92 + Bool VIV2DGPUSurfaceReAllocNonCached(GALINFOPTR galInfo, Viv2DPixmapPtr ppriv);
93 Bool MapUserMemToGPU(GALINFOPTR galInfo, MemMapInfoPtr mmInfo);
94 void UnmapUserMem(GALINFOPTR galInfo, MemMapInfoPtr mmInfo);
95 /************************************************************************
96 diff --git a/EXA/src/vivante_gal/vivante_gal_surface.c b/EXA/src/vivante_gal/vivante_gal_surface.c
99 index 0ea67f6..f3b998d
100 --- a/EXA/src/vivante_gal/vivante_gal_surface.c
101 +++ b/EXA/src/vivante_gal/vivante_gal_surface.c
102 @@ -584,7 +584,8 @@ static gctBOOL VIV2DGPUSurfaceAlloc(VIVGPUPtr gpuctx, gctUINT alignedWidth, gctU
103 return VIV2DGPUSurfaceAllocEx(gpuctx, alignedWidth, alignedHeight, bytesPerPixel, surface, getPixmapCachePolicy());
106 -gctBOOL VIV2DGPUSurfaceReAllocNonCached(VIVGPUPtr gpuctx, Viv2DPixmapPtr ppriv) {
107 +Bool VIV2DGPUSurfaceReAllocNonCached(GALINFOPTR galInfo, Viv2DPixmapPtr ppriv) {
108 + VIVGPUPtr gpuctx = (VIVGPUPtr)galInfo->mGpu;
109 GenericSurfacePtr oldSurf = gcvNULL;
110 GenericSurfacePtr newSurf = gcvNULL;
111 gctUINT32 alignedWidth;