]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
OMAP3: video: add macros to set display parameters
authorStefano Babic <sbabic@denx.de>
Wed, 29 Aug 2012 01:22:06 +0000 (01:22 +0000)
committerTom Rini <trini@ti.com>
Wed, 5 Sep 2012 00:05:39 +0000 (17:05 -0700)
Add a common macros to set the registers for horizontal
and vertical timing.

Signed-off-by: Stefano Babic <sbabic@denx.de>
arch/arm/include/asm/arch-omap3/dss.h

index 8913a7194fa0ec7eb5d5acf2f7b32b320ae2e27d..54add4b4562a52220e50af5868ac18a47a4010ef 100644 (file)
@@ -181,6 +181,16 @@ struct panel_config {
        void *frame_buffer;
 };
 
+#define DSS_HBP(bp)    (((bp) - 1) << 20)
+#define DSS_HFP(fp)    (((fp) - 1) << 8)
+#define DSS_HSW(sw)    ((sw) - 1)
+#define DSS_VBP(bp)    ((bp) << 20)
+#define DSS_VFP(fp)    ((fp) << 8)
+#define DSS_VSW(sw)    ((sw) - 1)
+
+#define PANEL_TIMING_H(bp, fp, sw) (DSS_HBP(bp) | DSS_HFP(fp) | DSS_HSW(sw))
+#define PANEL_TIMING_V(bp, fp, sw) (DSS_VBP(bp) | DSS_VFP(fp) | DSS_VSW(sw))
+
 /* Generic DSS Functions */
 void omap3_dss_venc_config(const struct venc_regs *venc_cfg,
                        u32 height, u32 width);