aboutsummaryrefslogtreecommitdiffstats
path: root/include/video/atmel_lcdc.h
diff options
context:
space:
mode:
authorHaavard Skinnemoen <hskinnemoen@atmel.com>2008-02-06 04:39:11 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:15 -0500
commit162b3a084904a1d6ef1553782b8573885d5f900b (patch)
treed525a8f16852d80175555d3e28c52fb1f7d98bc0 /include/video/atmel_lcdc.h
parent529e55b6a57bda6df9e45eb268589efc70f63303 (diff)
atmel_lcdfb: validate display timings
Setting a display timing parameter too high or too low may cause it to wrap around and thus become completely wrong. Validate the timings in atmel_lcdfb_check_var() and saturate to the highest or lowest possible value if necessary. Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/video/atmel_lcdc.h')
-rw-r--r--include/video/atmel_lcdc.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/include/video/atmel_lcdc.h b/include/video/atmel_lcdc.h
index 4eea63761a3f..76095e70935b 100644
--- a/include/video/atmel_lcdc.h
+++ b/include/video/atmel_lcdc.h
@@ -115,20 +115,20 @@ struct atmel_lcdfb_info {
115#define ATMEL_LCDC_MEMOR_LITTLE (1 << 31) 115#define ATMEL_LCDC_MEMOR_LITTLE (1 << 31)
116 116
117#define ATMEL_LCDC_TIM1 0x0808 117#define ATMEL_LCDC_TIM1 0x0808
118#define ATMEL_LCDC_VFP (0xff << 0) 118#define ATMEL_LCDC_VFP (0xffU << 0)
119#define ATMEL_LCDC_VBP_OFFSET 8 119#define ATMEL_LCDC_VBP_OFFSET 8
120#define ATMEL_LCDC_VBP (0xff << ATMEL_LCDC_VBP_OFFSET) 120#define ATMEL_LCDC_VBP (0xffU << ATMEL_LCDC_VBP_OFFSET)
121#define ATMEL_LCDC_VPW_OFFSET 16 121#define ATMEL_LCDC_VPW_OFFSET 16
122#define ATMEL_LCDC_VPW (0x3f << ATMEL_LCDC_VPW_OFFSET) 122#define ATMEL_LCDC_VPW (0x3fU << ATMEL_LCDC_VPW_OFFSET)
123#define ATMEL_LCDC_VHDLY_OFFSET 24 123#define ATMEL_LCDC_VHDLY_OFFSET 24
124#define ATMEL_LCDC_VHDLY (0xf << ATMEL_LCDC_VHDLY_OFFSET) 124#define ATMEL_LCDC_VHDLY (0xfU << ATMEL_LCDC_VHDLY_OFFSET)
125 125
126#define ATMEL_LCDC_TIM2 0x080c 126#define ATMEL_LCDC_TIM2 0x080c
127#define ATMEL_LCDC_HBP (0xff << 0) 127#define ATMEL_LCDC_HBP (0xffU << 0)
128#define ATMEL_LCDC_HPW_OFFSET 8 128#define ATMEL_LCDC_HPW_OFFSET 8
129#define ATMEL_LCDC_HPW (0x3f << ATMEL_LCDC_HPW_OFFSET) 129#define ATMEL_LCDC_HPW (0x3fU << ATMEL_LCDC_HPW_OFFSET)
130#define ATMEL_LCDC_HFP_OFFSET 21 130#define ATMEL_LCDC_HFP_OFFSET 21
131#define ATMEL_LCDC_HFP (0x7ff << ATMEL_LCDC_HFP_OFFSET) 131#define ATMEL_LCDC_HFP (0x7ffU << ATMEL_LCDC_HFP_OFFSET)
132 132
133#define ATMEL_LCDC_LCDFRMCFG 0x0810 133#define ATMEL_LCDC_LCDFRMCFG 0x0810
134#define ATMEL_LCDC_LINEVAL (0x7ff << 0) 134#define ATMEL_LCDC_LINEVAL (0x7ff << 0)