diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-11-14 04:38:25 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-12-30 09:14:15 -0500 |
commit | 29fceeebb6ad55dd0e27f6f7b8f10aa039315cde (patch) | |
tree | ca9e3d9b6ab73562b014476b68d2f81c79790ddc /drivers/video/omap2 | |
parent | 7a53df2c08119c1a7008d8480205fb3e6859c721 (diff) |
OMAPDSS: DISPC: Add MFLAG defines
OMAP5 has MFLAG feature in DISPC. Add the register definition and dump
it. The register is not used yet, though.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 4 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dispc.h | 20 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.c | 1 | ||||
-rw-r--r-- | drivers/video/omap2/dss/dss_features.h | 1 |
4 files changed, 26 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index d8f4aeeaeec4..533539e51cf5 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -3213,6 +3213,8 @@ static void dispc_dump_regs(struct seq_file *s) | |||
3213 | DUMPREG(DISPC_CONTROL3); | 3213 | DUMPREG(DISPC_CONTROL3); |
3214 | DUMPREG(DISPC_CONFIG3); | 3214 | DUMPREG(DISPC_CONFIG3); |
3215 | } | 3215 | } |
3216 | if (dss_has_feature(FEAT_MFLAG)) | ||
3217 | DUMPREG(DISPC_GLOBAL_MFLAG_ATTRIBUTE); | ||
3216 | 3218 | ||
3217 | #undef DUMPREG | 3219 | #undef DUMPREG |
3218 | 3220 | ||
@@ -3287,6 +3289,8 @@ static void dispc_dump_regs(struct seq_file *s) | |||
3287 | DUMPREG(i, DISPC_OVL_ATTRIBUTES2); | 3289 | DUMPREG(i, DISPC_OVL_ATTRIBUTES2); |
3288 | if (dss_has_feature(FEAT_PRELOAD)) | 3290 | if (dss_has_feature(FEAT_PRELOAD)) |
3289 | DUMPREG(i, DISPC_OVL_PRELOAD); | 3291 | DUMPREG(i, DISPC_OVL_PRELOAD); |
3292 | if (dss_has_feature(FEAT_MFLAG)) | ||
3293 | DUMPREG(i, DISPC_OVL_MFLAG_THRESHOLD); | ||
3290 | } | 3294 | } |
3291 | 3295 | ||
3292 | #undef DISPC_REG | 3296 | #undef DISPC_REG |
diff --git a/drivers/video/omap2/dss/dispc.h b/drivers/video/omap2/dss/dispc.h index de4863d21ab7..78edb449c763 100644 --- a/drivers/video/omap2/dss/dispc.h +++ b/drivers/video/omap2/dss/dispc.h | |||
@@ -40,6 +40,7 @@ | |||
40 | #define DISPC_CONTROL3 0x0848 | 40 | #define DISPC_CONTROL3 0x0848 |
41 | #define DISPC_CONFIG3 0x084C | 41 | #define DISPC_CONFIG3 0x084C |
42 | #define DISPC_MSTANDBY_CTRL 0x0858 | 42 | #define DISPC_MSTANDBY_CTRL 0x0858 |
43 | #define DISPC_GLOBAL_MFLAG_ATTRIBUTE 0x085C | ||
43 | 44 | ||
44 | /* DISPC overlay registers */ | 45 | /* DISPC overlay registers */ |
45 | #define DISPC_OVL_BA0(n) (DISPC_OVL_BASE(n) + \ | 46 | #define DISPC_OVL_BA0(n) (DISPC_OVL_BASE(n) + \ |
@@ -100,6 +101,8 @@ | |||
100 | DISPC_FIR_COEF_V2_OFFSET(n, i)) | 101 | DISPC_FIR_COEF_V2_OFFSET(n, i)) |
101 | #define DISPC_OVL_PRELOAD(n) (DISPC_OVL_BASE(n) + \ | 102 | #define DISPC_OVL_PRELOAD(n) (DISPC_OVL_BASE(n) + \ |
102 | DISPC_PRELOAD_OFFSET(n)) | 103 | DISPC_PRELOAD_OFFSET(n)) |
104 | #define DISPC_OVL_MFLAG_THRESHOLD(n) (DISPC_OVL_BASE(n) + \ | ||
105 | DISPC_MFLAG_THRESHOLD_OFFSET(n)) | ||
103 | 106 | ||
104 | /* DISPC up/downsampling FIR filter coefficient structure */ | 107 | /* DISPC up/downsampling FIR filter coefficient structure */ |
105 | struct dispc_coef { | 108 | struct dispc_coef { |
@@ -894,4 +897,21 @@ static inline u16 DISPC_PRELOAD_OFFSET(enum omap_plane plane) | |||
894 | return 0; | 897 | return 0; |
895 | } | 898 | } |
896 | } | 899 | } |
900 | |||
901 | static inline u16 DISPC_MFLAG_THRESHOLD_OFFSET(enum omap_plane plane) | ||
902 | { | ||
903 | switch (plane) { | ||
904 | case OMAP_DSS_GFX: | ||
905 | return 0x0860; | ||
906 | case OMAP_DSS_VIDEO1: | ||
907 | return 0x0864; | ||
908 | case OMAP_DSS_VIDEO2: | ||
909 | return 0x0868; | ||
910 | case OMAP_DSS_VIDEO3: | ||
911 | return 0x086c; | ||
912 | default: | ||
913 | BUG(); | ||
914 | return 0; | ||
915 | } | ||
916 | } | ||
897 | #endif | 917 | #endif |
diff --git a/drivers/video/omap2/dss/dss_features.c b/drivers/video/omap2/dss/dss_features.c index f8fd6dbacabc..7f8969191dc6 100644 --- a/drivers/video/omap2/dss/dss_features.c +++ b/drivers/video/omap2/dss/dss_features.c | |||
@@ -613,6 +613,7 @@ static const enum dss_feat_id omap5_dss_feat_list[] = { | |||
613 | FEAT_DSI_PLL_SELFREQDCO, | 613 | FEAT_DSI_PLL_SELFREQDCO, |
614 | FEAT_DSI_PLL_REFSEL, | 614 | FEAT_DSI_PLL_REFSEL, |
615 | FEAT_DSI_PHY_DCC, | 615 | FEAT_DSI_PHY_DCC, |
616 | FEAT_MFLAG, | ||
616 | }; | 617 | }; |
617 | 618 | ||
618 | /* OMAP2 DSS Features */ | 619 | /* OMAP2 DSS Features */ |
diff --git a/drivers/video/omap2/dss/dss_features.h b/drivers/video/omap2/dss/dss_features.h index 10b0556e1352..e3ef3b714896 100644 --- a/drivers/video/omap2/dss/dss_features.h +++ b/drivers/video/omap2/dss/dss_features.h | |||
@@ -64,6 +64,7 @@ enum dss_feat_id { | |||
64 | FEAT_DSI_PLL_SELFREQDCO, | 64 | FEAT_DSI_PLL_SELFREQDCO, |
65 | FEAT_DSI_PLL_REFSEL, | 65 | FEAT_DSI_PLL_REFSEL, |
66 | FEAT_DSI_PHY_DCC, | 66 | FEAT_DSI_PHY_DCC, |
67 | FEAT_MFLAG, | ||
67 | }; | 68 | }; |
68 | 69 | ||
69 | /* DSS register field id */ | 70 | /* DSS register field id */ |