diff options
author | Jon Mayo <jmayo@nvidia.com> | 2013-05-22 19:25:19 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2013-09-14 13:16:01 -0700 |
commit | 10b29075780d00a74ef54d9de3992cccac5ce713 (patch) | |
tree | 9f5653afe0164a9c6587daa7d1050c665b60041b /include/video | |
parent | 6e98ca799d90eb460c0ed081c09d0c2eec6b2feb (diff) |
video: tegra: support pixel format byte swap
reserve upper bits of pixformat to indicate byte swizzle option.
reorder and increase field sizes of tegra_dc structure.
Change-Id: Ibd84dafcc478f6c8f51669f2db52270d5723961c
Signed-off-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-on: http://git-master/r/232768
(cherry picked from commit 1c6286c8c3d8fc2148281c59f38949824844db4e)
Reviewed-on: http://git-master/r/231899
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'include/video')
-rw-r--r-- | include/video/tegra_dc_ext.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/video/tegra_dc_ext.h b/include/video/tegra_dc_ext.h index bc85d7eb362b..c0a9f0272966 100644 --- a/include/video/tegra_dc_ext.h +++ b/include/video/tegra_dc_ext.h @@ -28,6 +28,7 @@ # include <unistd.h> #endif +/* pixformat - color format */ #define TEGRA_DC_EXT_FMT_P1 0 #define TEGRA_DC_EXT_FMT_P2 1 #define TEGRA_DC_EXT_FMT_P4 2 @@ -50,6 +51,22 @@ #define TEGRA_DC_EXT_FMT_YUV422R 23 #define TEGRA_DC_EXT_FMT_YCbCr422RA 24 #define TEGRA_DC_EXT_FMT_YUV422RA 25 +/* color format type field is 8-bits */ +#define TEGRA_DC_EXT_FMT_SHIFT 0 +#define TEGRA_DC_EXT_FMT_MASK (0xff << TEGRA_DC_EXT_FMT_SHIFT) + +/* pixformat - byte order options ( w x y z ) */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_NOSWAP (0 << 8) /* ( 3 2 1 0 ) */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_SWAP2 (1 << 8) /* ( 2 3 0 1 ) */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_SWAP4 (2 << 8) /* ( 0 1 2 3 ) */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_SWAP4HW (3 << 8) /* ( 1 0 3 2 ) */ +/* the next two are not available on T30 or earlier */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_SWAP02 (4 << 8) /* ( 3 0 1 2 ) */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_SWAPLEFT (5 << 8) /* ( 2 1 0 3 ) */ +/* byte order field is 4-bits */ +#define TEGRA_DC_EXT_FMT_BYTEORDER_SHIFT 8 +#define TEGRA_DC_EXT_FMT_BYTEORDER_MASK \ + (0x0f << TEGRA_DC_EXT_FMT_BYTEORDER_SHIFT) #define TEGRA_DC_EXT_BLEND_NONE 0 #define TEGRA_DC_EXT_BLEND_PREMULT 1 |