diff options
author | Lajos Molnar <molnar@ti.com> | 2011-04-07 08:41:26 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-04-07 08:41:26 +0100 |
commit | d16edfb337d41f717345a1e149f6039afa239f5e (patch) | |
tree | 2317e2c8dbdfb0ef673228fd942e85a30982f57c /drivers/media/video/tiler | |
parent | 23da91cf9817b567bfbf4125ed1189751c09e3f3 (diff) |
TILER: Removed unused DMM macro definitions
Removed unneeded/unused macro definitions.
Signed-off-by: Lajos Molnar <molnar@ti.com>
Signed-off-by: David Sin <davidsin@ti.com>
Diffstat (limited to 'drivers/media/video/tiler')
-rw-r--r-- | drivers/media/video/tiler/tiler-def.h | 108 | ||||
-rw-r--r-- | drivers/media/video/tiler/tiler-geom.c | 16 |
2 files changed, 15 insertions, 109 deletions
diff --git a/drivers/media/video/tiler/tiler-def.h b/drivers/media/video/tiler/tiler-def.h index facf497e31e..8e34811e3b4 100644 --- a/drivers/media/video/tiler/tiler-def.h +++ b/drivers/media/video/tiler/tiler-def.h @@ -37,27 +37,17 @@ #define TILVIEW_PAGE (TILVIEW_32BIT + 0x08000000u) #define TILVIEW_END (TILVIEW_PAGE + 0x08000000u) -#define TILER_ACC_MODE_SHIFT (27) -#define DMM_ACC_MODE_SHIFT (27) - -#define TIL_ALIAS_ADDR(x, access_mode)\ -((void *)(TILER_ALIAS_BASE | (u32)x | (access_mode << TILER_ACC_MODE_SHIFT))) - #define TIL_ADDR(x, r, yi, xi, a)\ ((void *)((u32)x | (r << DMM_ROTATION_SHIFT) |\ (yi << DMM_Y_INVERT_SHIFT) | (xi << DMM_X_INVERT_SHIFT) |\ -(a << DMM_ACC_MODE_SHIFT))) - -#define TILER_ALIAS_VIEW_CLEAR (~0xE0000000) - -#define DMM_X_INVERT_SHIFT (29) -#define DMM_GET_X_INVERTED(x) ((((u32)x & (1<<DMM_X_INVERT_SHIFT)) > 0) ? 1 : 0) -#define DMM_Y_INVERT_SHIFT (30) -#define DMM_GET_Y_INVERTED(x) ((((u32)x & (1<<DMM_Y_INVERT_SHIFT)) > 0) ? 1 : 0) +(a << TILER_ACC_MODE_SHIFT))) -#define DMM_ROTATION_SHIFT (31) -#define DMM_GET_ROTATED(x)\ -((((u32)x & ((u32)1<<DMM_ROTATION_SHIFT)) > 0) ? 1 : 0) +#define DMM_X_INVERT_SHIFT (29) +#define DMM_IS_X_INVERTED(x) ((x >> DMM_X_INVERT_SHIFT) & 1) +#define DMM_Y_INVERT_SHIFT (30) +#define DMM_IS_Y_INVERTED(x) ((x >> DMM_Y_INVERT_SHIFT) & 1) +#define DMM_ROTATION_SHIFT (31) +#define DMM_IS_ROTATED(x) ((x >> DMM_ROTATION_SHIFT) & 1) #define DMM_ALIAS_VIEW_CLEAR (~0xE0000000) @@ -79,88 +69,4 @@ #define DMM_PAGE_DIMM_X_MODE_32 (DMM_TILE_DIMM_X_MODE_32*2) #define DMM_PAGE_DIMM_Y_MODE_32 (DMM_TILE_DIMM_Y_MODE_32*2) -#define DMM_HOR_X_ADDRSHIFT_8 (0) -#define DMM_HOR_X_ADDRMASK_8 (0x3FFF) -#define DMM_HOR_X_COOR_GET_8(x)\ - (((unsigned long)x >> DMM_HOR_X_ADDRSHIFT_8) & DMM_HOR_X_ADDRMASK_8) -#define DMM_HOR_X_PAGE_COOR_GET_8(x)\ - (DMM_HOR_X_COOR_GET_8(x)/DMM_PAGE_DIMM_X_MODE_8) - -#define DMM_HOR_Y_ADDRSHIFT_8 (14) -#define DMM_HOR_Y_ADDRMASK_8 (0x1FFF) -#define DMM_HOR_Y_COOR_GET_8(x)\ - (((unsigned long)x >> DMM_HOR_Y_ADDRSHIFT_8) & DMM_HOR_Y_ADDRMASK_8) -#define DMM_HOR_Y_PAGE_COOR_GET_8(x)\ - (DMM_HOR_Y_COOR_GET_8(x)/DMM_PAGE_DIMM_Y_MODE_8) - -#define DMM_HOR_X_ADDRSHIFT_16 (1) -#define DMM_HOR_X_ADDRMASK_16 (0x7FFE) -#define DMM_HOR_X_COOR_GET_16(x) (((unsigned long)x >> \ - DMM_HOR_X_ADDRSHIFT_16) & DMM_HOR_X_ADDRMASK_16) -#define DMM_HOR_X_PAGE_COOR_GET_16(x) (DMM_HOR_X_COOR_GET_16(x) / \ - DMM_PAGE_DIMM_X_MODE_16) - -#define DMM_HOR_Y_ADDRSHIFT_16 (15) -#define DMM_HOR_Y_ADDRMASK_16 (0xFFF) -#define DMM_HOR_Y_COOR_GET_16(x) (((unsigned long)x >> \ - DMM_HOR_Y_ADDRSHIFT_16) & DMM_HOR_Y_ADDRMASK_16) -#define DMM_HOR_Y_PAGE_COOR_GET_16(x) (DMM_HOR_Y_COOR_GET_16(x) / \ - DMM_PAGE_DIMM_Y_MODE_16) - -#define DMM_HOR_X_ADDRSHIFT_32 (2) -#define DMM_HOR_X_ADDRMASK_32 (0x7FFC) -#define DMM_HOR_X_COOR_GET_32(x) (((unsigned long)x >> \ - DMM_HOR_X_ADDRSHIFT_32) & DMM_HOR_X_ADDRMASK_32) -#define DMM_HOR_X_PAGE_COOR_GET_32(x) (DMM_HOR_X_COOR_GET_32(x) / \ - DMM_PAGE_DIMM_X_MODE_32) - -#define DMM_HOR_Y_ADDRSHIFT_32 (15) -#define DMM_HOR_Y_ADDRMASK_32 (0xFFF) -#define DMM_HOR_Y_COOR_GET_32(x) (((unsigned long)x >> \ - DMM_HOR_Y_ADDRSHIFT_32) & DMM_HOR_Y_ADDRMASK_32) -#define DMM_HOR_Y_PAGE_COOR_GET_32(x) (DMM_HOR_Y_COOR_GET_32(x) / \ - DMM_PAGE_DIMM_Y_MODE_32) - -#define DMM_VER_X_ADDRSHIFT_8 (14) -#define DMM_VER_X_ADDRMASK_8 (0x1FFF) -#define DMM_VER_X_COOR_GET_8(x)\ - (((unsigned long)x >> DMM_VER_X_ADDRSHIFT_8) & DMM_VER_X_ADDRMASK_8) -#define DMM_VER_X_PAGE_COOR_GET_8(x)\ - (DMM_VER_X_COOR_GET_8(x)/DMM_PAGE_DIMM_X_MODE_8) - -#define DMM_VER_Y_ADDRSHIFT_8 (0) -#define DMM_VER_Y_ADDRMASK_8 (0x3FFF) -#define DMM_VER_Y_COOR_GET_8(x)\ - (((unsigned long)x >> DMM_VER_Y_ADDRSHIFT_8) & DMM_VER_Y_ADDRMASK_8) -#define DMM_VER_Y_PAGE_COOR_GET_8(x)\ - (DMM_VER_Y_COOR_GET_8(x)/DMM_PAGE_DIMM_Y_MODE_8) - -#define DMM_VER_X_ADDRSHIFT_16 (14) -#define DMM_VER_X_ADDRMASK_16 (0x1FFF) -#define DMM_VER_X_COOR_GET_16(x) (((unsigned long)x >> \ - DMM_VER_X_ADDRSHIFT_16) & DMM_VER_X_ADDRMASK_16) -#define DMM_VER_X_PAGE_COOR_GET_16(x) (DMM_VER_X_COOR_GET_16(x) / \ - DMM_PAGE_DIMM_X_MODE_16) - -#define DMM_VER_Y_ADDRSHIFT_16 (0) -#define DMM_VER_Y_ADDRMASK_16 (0x3FFF) -#define DMM_VER_Y_COOR_GET_16(x) (((unsigned long)x >> \ - DMM_VER_Y_ADDRSHIFT_16) & DMM_VER_Y_ADDRMASK_16) -#define DMM_VER_Y_PAGE_COOR_GET_16(x) (DMM_VER_Y_COOR_GET_16(x) / \ - DMM_PAGE_DIMM_Y_MODE_16) - -#define DMM_VER_X_ADDRSHIFT_32 (15) -#define DMM_VER_X_ADDRMASK_32 (0xFFF) -#define DMM_VER_X_COOR_GET_32(x) (((unsigned long)x >> \ - DMM_VER_X_ADDRSHIFT_32) & DMM_VER_X_ADDRMASK_32) -#define DMM_VER_X_PAGE_COOR_GET_32(x) (DMM_VER_X_COOR_GET_32(x) / \ - DMM_PAGE_DIMM_X_MODE_32) - -#define DMM_VER_Y_ADDRSHIFT_32 (0) -#define DMM_VER_Y_ADDRMASK_32 (0x7FFF) -#define DMM_VER_Y_COOR_GET_32(x) (((unsigned long)x >> \ - DMM_VER_Y_ADDRSHIFT_32) & DMM_VER_Y_ADDRMASK_32) -#define DMM_VER_Y_PAGE_COOR_GET_32(x) (DMM_VER_Y_COOR_GET_32(x) / \ - DMM_PAGE_DIMM_Y_MODE_32) - #endif diff --git a/drivers/media/video/tiler/tiler-geom.c b/drivers/media/video/tiler/tiler-geom.c index 6258d75b926..3423301ef84 100644 --- a/drivers/media/video/tiler/tiler-geom.c +++ b/drivers/media/video/tiler/tiler-geom.c @@ -139,7 +139,7 @@ static void tiler_get_natural_xy(u32 tsptr, u32 *x, u32 *y) break; } - if (DMM_GET_ROTATED(tsptr)) { + if (DMM_IS_ROTATED(tsptr)) { *x = offset >> y_bits; *y = offset & DMM_TILER_MASK(y_bits); } else { @@ -147,9 +147,9 @@ static void tiler_get_natural_xy(u32 tsptr, u32 *x, u32 *y) *y = offset >> x_bits; } - if (DMM_GET_X_INVERTED(tsptr)) + if (DMM_IS_X_INVERTED(tsptr)) *x ^= DMM_TILER_MASK(x_bits); - if (DMM_GET_Y_INVERTED(tsptr)) + if (DMM_IS_Y_INVERTED(tsptr)) *y ^= DMM_TILER_MASK(y_bits); } @@ -234,9 +234,9 @@ u32 tiler_reorient_topleft(u32 tsptr, struct tiler_view_orient orient, tiler_get_natural_xy(tsptr, &x, &y); - if (DMM_GET_X_INVERTED(tsptr)) + if (DMM_IS_X_INVERTED(tsptr)) x -= width - 1; - if (DMM_GET_Y_INVERTED(tsptr)) + if (DMM_IS_Y_INVERTED(tsptr)) y -= height - 1; if (orient.x_invert) @@ -256,13 +256,13 @@ u32 tiler_stride(u32 tsptr) switch (fmt) { case TILFMT_8BIT: - return DMM_GET_ROTATED(tsptr) ? + return DMM_IS_ROTATED(tsptr) ? DMM_TILER_STRIDE_90_(8) : DMM_TILER_STRIDE_0_(8); case TILFMT_16BIT: - return DMM_GET_ROTATED(tsptr) ? + return DMM_IS_ROTATED(tsptr) ? DMM_TILER_STRIDE_90_(16) : DMM_TILER_STRIDE_0_(16); case TILFMT_32BIT: - return DMM_GET_ROTATED(tsptr) ? + return DMM_IS_ROTATED(tsptr) ? DMM_TILER_STRIDE_90_(32) : DMM_TILER_STRIDE_0_(32); default: return 0; |