Skip to content

Commit a604f32

Browse files
tomek-brcmcubanismo
authored andcommitted
Remove conflicting rotation/mirror bits
Avoid possibility to specify impossible configurations, for example both mirrored and not mirrored. Signed-off-by: Tomek Bury <tomek@broadcom.com>
1 parent c86e523 commit a604f32

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

allocator_common.h

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -175,14 +175,13 @@ typedef struct usage_display {
175175
uint32_t rotation_types;
176176
} usage_display_t;
177177
#define USAGE_BASE_DISPLAY 0x0001
178-
#define USAGE_BASE_DISPLAY_ROTATION_0 0x00000001
179-
#define USAGE_BASE_DISPLAY_ROTATION_90 0x00000002
180-
#define USAGE_BASE_DISPLAY_ROTATION_180 0x00000004
181-
#define USAGE_BASE_DISPLAY_ROTATION_270 0x00000008
182-
#define USAGE_BASE_DISPLAY_MIRROR_ROTATION_0 0x00000010
183-
#define USAGE_BASE_DISPLAY_MIRROR_ROTATION_90 0x00000020
184-
#define USAGE_BASE_DISPLAY_MIRROR_ROTATION_180 0x00000040
185-
#define USAGE_BASE_DISPLAY_MIRROR_ROTATION_270 0x00000080
178+
/* 2 bits to describe rotation */
179+
#define USAGE_BASE_DISPLAY_ROTATION_0 0x00000000
180+
#define USAGE_BASE_DISPLAY_ROTATION_90 0x00000001
181+
#define USAGE_BASE_DISPLAY_ROTATION_180 0x00000002
182+
#define USAGE_BASE_DISPLAY_ROTATION_270 0x00000003
183+
/* mirror flag */
184+
#define USAGE_BASE_DISPLAY_MIRROR 0x00000004
186185

187186
/*!
188187
* Structure to specify a single usage atom.

0 commit comments

Comments
 (0)