diff options
author | Mike Rapoport <mike.rapoport@gmail.com> | 2016-02-15 19:54:02 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-15 18:26:17 -0800 |
commit | f7a61fde48da20dc7f91b9ce76c23db4588b50d3 (patch) | |
tree | 10734b730fd12ed1f6630d2150e5dfd73be81290 /drivers/staging/sm750fb/sm750_accel.h | |
parent | 7124080feb0a335a88822462263a72fdcf5491aa (diff) |
staging: sm750fb: change definition of DE_STRETCH_FORMAT fields
Use stratight-forward definition of DE_STRETCH_FORMAT register fields
and use open-coded implementation for register manipulation
Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb/sm750_accel.h')
-rw-r--r-- | drivers/staging/sm750fb/sm750_accel.h | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h index f14abb68af2e..69aa47c35408 100644 --- a/drivers/staging/sm750fb/sm750_accel.h +++ b/drivers/staging/sm750fb/sm750_accel.h @@ -109,21 +109,22 @@ #define DE_BACKGROUND_COLOR 31:0 #define DE_STRETCH_FORMAT 0x00001C -#define DE_STRETCH_FORMAT_PATTERN_XY 30:30 -#define DE_STRETCH_FORMAT_PATTERN_XY_NORMAL 0 -#define DE_STRETCH_FORMAT_PATTERN_XY_OVERWRITE 1 -#define DE_STRETCH_FORMAT_PATTERN_Y 29:27 -#define DE_STRETCH_FORMAT_PATTERN_X 25:23 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT 21:20 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_8 0 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_16 1 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_32 2 -#define DE_STRETCH_FORMAT_PIXEL_FORMAT_24 3 - -#define DE_STRETCH_FORMAT_ADDRESSING 19:16 -#define DE_STRETCH_FORMAT_ADDRESSING_XY 0 -#define DE_STRETCH_FORMAT_ADDRESSING_LINEAR 15 -#define DE_STRETCH_FORMAT_SOURCE_HEIGHT 11:0 +#define DE_STRETCH_FORMAT_PATTERN_XY BIT(30) +#define DE_STRETCH_FORMAT_PATTERN_Y_SHIFT 27 +#define DE_STRETCH_FORMAT_PATTERN_Y_MASK (0x7 << 27) +#define DE_STRETCH_FORMAT_PATTERN_X_SHIFT 23 +#define DE_STRETCH_FORMAT_PATTERN_X_MASK (0x7 << 23) +#define DE_STRETCH_FORMAT_PIXEL_FORMAT_SHIFT 20 +#define DE_STRETCH_FORMAT_PIXEL_FORMAT_MASK (0x3 << 20) +#define DE_STRETCH_FORMAT_PIXEL_FORMAT_8 (0x0 << 20) +#define DE_STRETCH_FORMAT_PIXEL_FORMAT_16 (0x1 << 20) +#define DE_STRETCH_FORMAT_PIXEL_FORMAT_32 (0x2 << 20) +#define DE_STRETCH_FORMAT_PIXEL_FORMAT_24 (0x3 << 20) +#define DE_STRETCH_FORMAT_ADDRESSING_SHIFT 16 +#define DE_STRETCH_FORMAT_ADDRESSING_MASK (0xf << 16) +#define DE_STRETCH_FORMAT_ADDRESSING_XY (0x0 << 16) +#define DE_STRETCH_FORMAT_ADDRESSING_LINEAR (0xf << 16) +#define DE_STRETCH_FORMAT_SOURCE_HEIGHT_MASK 0xfff #define DE_COLOR_COMPARE 0x000020 #define DE_COLOR_COMPARE_COLOR 23:0 |