summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2014-08-01 20:33:17 +0100
committerChih-Wei Huang <cwhuang@linux.org.tw>2015-01-22 09:46:13 +0800
commitb88e243781d9b89d500c94decf2b405edb730752 (patch)
treec06833b95a34fa339e2d11e0227781ac7af6a6a6
parent10334153b198f59cd598fc5fd25185d9032921c9 (diff)
downloadexternal_drm_gralloc-b88e243781d9b89d500c94decf2b405edb730752.zip
external_drm_gralloc-b88e243781d9b89d500c94decf2b405edb730752.tar.gz
external_drm_gralloc-b88e243781d9b89d500c94decf2b405edb730752.tar.bz2
all: Cleanup duplicated macros.
- Move MAX macro to gralloc_drm.h - Drop the freedreno's duplicated ALIGN macro. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r--gralloc_drm.h1
-rw-r--r--gralloc_drm_freedreno.c3
-rw-r--r--gralloc_drm_nouveau.c2
-rw-r--r--gralloc_drm_radeon.c2
4 files changed, 1 insertions, 7 deletions
diff --git a/gralloc_drm.h b/gralloc_drm.h
index c32aaf6..e53ecd9 100644
--- a/gralloc_drm.h
+++ b/gralloc_drm.h
@@ -31,6 +31,7 @@
extern "C" {
#endif
+#define MAX(a, b) (((a) > (b)) ? (a) : (b))
#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
struct gralloc_drm_t;
diff --git a/gralloc_drm_freedreno.c b/gralloc_drm_freedreno.c
index 10b0939..3da5a65 100644
--- a/gralloc_drm_freedreno.c
+++ b/gralloc_drm_freedreno.c
@@ -38,9 +38,6 @@
#include "gralloc_drm.h"
#include "gralloc_drm_priv.h"
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-#define ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1))
-
struct fd_info {
struct gralloc_drm_drv_t base;
diff --git a/gralloc_drm_nouveau.c b/gralloc_drm_nouveau.c
index 576966e..8a84332 100644
--- a/gralloc_drm_nouveau.c
+++ b/gralloc_drm_nouveau.c
@@ -39,8 +39,6 @@
#include "gralloc_drm.h"
#include "gralloc_drm_priv.h"
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-
#define NVC0_TILE_HEIGHT(m) (8 << ((m) >> 4))
enum {
diff --git a/gralloc_drm_radeon.c b/gralloc_drm_radeon.c
index be2ea9b..2911a45 100644
--- a/gralloc_drm_radeon.c
+++ b/gralloc_drm_radeon.c
@@ -45,8 +45,6 @@
#define RADEON_GPU_PAGE_SIZE 4096
-#define MAX(a, b) (((a) > (b)) ? (a) : (b))
-
struct radeon_info {
struct gralloc_drm_drv_t base;