]> code.ossystems Code Review - meta-freescale.git/blob
cb7e432772cafff551961ee7eb9142ad729abe23
[meta-freescale.git] /
1 From 194e357faf3d7433ad4f1f2cf46f79d314ea5b38 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
5
6 VIV2DGPUSurfaceReAllocNonCached and imxRefreshModes were not
7 declared causing compiler warning.
8
9 Upstream Status: Pending
10
11 Date: July 29, 2015
12 Signed-off-by: Prabhu <prabhu.sundararaj@freescale.com>
13 ---
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  EXA/src/vivante_gal/vivante_priv.h           | 4 ++++
20  6 files changed, 14 insertions(+), 4 deletions(-)
21  mode change 100755 => 100644 EXA/src/vivante_extension/vivante_ext.c
22  mode change 100755 => 100644 EXA/src/vivante_gal/vivante_gal_surface.c
23
24 diff --git a/EXA/src/vivante_extension/vivante_ext.c b/EXA/src/vivante_extension/vivante_ext.c
25 old mode 100755
26 new mode 100644
27 index 4bcc5ba..0d1085b
28 --- a/EXA/src/vivante_extension/vivante_ext.c
29 +++ b/EXA/src/vivante_extension/vivante_ext.c
30 @@ -54,6 +54,7 @@
31  #include "vivante.h"
32  #include "vivante_priv.h"
33  #include "vivante_common.h"
34 +#include "imx_display.h"
35  
36  static unsigned char VIVEXTReqCode = 0;
37  static int VIVEXTErrorBase;
38 @@ -162,8 +163,7 @@ static int ProcVIVEXTDrawableSetFlag(register ClientPtr client)
39              VivPtr pViv = VIVPTR_FROM_SCREEN(pScreen);
40              if(pViv)
41              {
42 -                VIVGPUPtr gpuctx = (VIVGPUPtr) pViv->mGrCtx.mGpu;
43 -                VIV2DGPUSurfaceReAllocNonCached(gpuctx, ppriv);
44 +                VIV2DGPUSurfaceReAllocNonCached(&pViv->mGrCtx, ppriv);
45                  // set tiled if asked
46                  if(stuff->flag & VIVPIXMAP_FLAG_SHARED_TILED)
47                  {
48 diff --git a/EXA/src/vivante_fbdev/imx_display.c b/EXA/src/vivante_fbdev/imx_display.c
49 index 876d37e..8d4eaa0 100644
50 --- a/EXA/src/vivante_fbdev/imx_display.c
51 +++ b/EXA/src/vivante_fbdev/imx_display.c
52 @@ -27,6 +27,8 @@
53  
54  #include <fcntl.h>
55  #include <errno.h>
56 +#include <unistd.h>
57 +#include <sys/ioctl.h>
58   
59  #include <linux/fb.h>
60  #include "xf86DDC.h"
61 @@ -83,7 +85,7 @@ GCD(int a, int b)
62  }
63  
64  static int
65 -LCM(a, b)
66 +LCM(int a, int b)
67  {
68         return (a * b) / GCD(a, b);
69  }
70 diff --git a/EXA/src/vivante_fbdev/vivante_fbdev_driver.c b/EXA/src/vivante_fbdev/vivante_fbdev_driver.c
71 index ec407df..d35912a 100644
72 --- a/EXA/src/vivante_fbdev/vivante_fbdev_driver.c
73 +++ b/EXA/src/vivante_fbdev/vivante_fbdev_driver.c
74 @@ -29,8 +29,10 @@
75  #include "vivante.h"
76  #include "vivante_exa.h"
77  #include "vivante_ext.h"
78 +#include "vivante_dri.h"
79  #include "imx_display.h"
80  #include <errno.h>
81 +#include <sys/ioctl.h>
82  #include <linux/fb.h>
83  #include <xorg/shmint.h>
84  
85 diff --git a/EXA/src/vivante_gal/vivante_gal.h b/EXA/src/vivante_gal/vivante_gal.h
86 index e186eda..332c773 100644
87 --- a/EXA/src/vivante_gal/vivante_gal.h
88 +++ b/EXA/src/vivante_gal/vivante_gal.h
89 @@ -260,6 +260,7 @@ extern "C" {
90      Bool VIV2DCacheOperation(GALINFOPTR galInfo, Viv2DPixmapPtr ppix, VIVFLUSHTYPE flush_type, int onLinearBuffer);
91      Bool VIV2DGPUUserMemMap(char* logical, unsigned int physical, unsigned int size, void ** mappingInfo, unsigned int * gpuAddress);
92      Bool VIV2DGPUUserMemUnMap(char* logical, unsigned int size, void * mappingInfo, unsigned int gpuAddress);
93 +    Bool VIV2DGPUSurfaceReAllocNonCached(GALINFOPTR galInfo, Viv2DPixmapPtr ppriv);
94      Bool MapUserMemToGPU(GALINFOPTR galInfo, MemMapInfoPtr mmInfo);
95      void UnmapUserMem(GALINFOPTR galInfo, MemMapInfoPtr mmInfo);
96      /************************************************************************
97 diff --git a/EXA/src/vivante_gal/vivante_gal_surface.c b/EXA/src/vivante_gal/vivante_gal_surface.c
98 old mode 100755
99 new mode 100644
100 index 036b61b..0234814
101 --- a/EXA/src/vivante_gal/vivante_gal_surface.c
102 +++ b/EXA/src/vivante_gal/vivante_gal_surface.c
103 @@ -673,7 +673,8 @@ static gctBOOL VIV2DGPUSurfaceAlloc(VIVGPUPtr gpuctx, gctUINT alignedWidth, gctU
104      return VIV2DGPUSurfaceAllocEx(gpuctx, alignedWidth, alignedHeight, bytesPerPixel, surface, getPixmapCachePolicy());
105  }
106  
107 -gctBOOL VIV2DGPUSurfaceReAllocNonCached(VIVGPUPtr gpuctx, Viv2DPixmapPtr ppriv) {
108 +Bool VIV2DGPUSurfaceReAllocNonCached(GALINFOPTR galInfo, Viv2DPixmapPtr ppriv) {
109 +    VIVGPUPtr gpuctx = (VIVGPUPtr)galInfo->mGpu;
110      GenericSurfacePtr oldSurf = gcvNULL;
111      GenericSurfacePtr newSurf = gcvNULL;
112      gctUINT32 alignedWidth;
113 diff --git a/EXA/src/vivante_gal/vivante_priv.h b/EXA/src/vivante_gal/vivante_priv.h
114 index e8ee3d2..05f5748 100644
115 --- a/EXA/src/vivante_gal/vivante_priv.h
116 +++ b/EXA/src/vivante_gal/vivante_priv.h
117 @@ -29,6 +29,7 @@ extern "C" {
118  #include "HAL/gc_hal.h"
119  #include "HAL/gc_hal_raster.h"
120  #include "HAL/gc_hal_base.h"
121 +#include "vivante_debug.h"
122  
123      /************************************************************************
124       * PIXMAP_HANDLING_STUFF(START)
125 @@ -97,6 +98,9 @@ extern "C" {
126       * DRIVER & DEVICE  Structs (END)
127       *************************************************************************/
128  
129 +    gctBOOL VIV2DGPUSurfaceAllocEx(VIVGPUPtr gpuctx, gctUINT alignedWidth, gctUINT alignedHeight,
130 +        gctUINT bytesPerPixel, GenericSurfacePtr * surface, enum PixmapCachePolicy cachePolicy);
131 +
132  #ifdef __cplusplus
133  }
134  #endif
135 -- 
136 1.8.4.5
137