video: support exynos fimd driver for various exynos series
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 video: support exynos fimd driver for various exynos series
This patch support exynos fimd driver for various exynos series different from existing it supports only exynos4 chip.
---
Changes for v1:
- moves exynos_fimd_get_base_offset() to exynos_fb.h
arch/arm/include/asm/arch-exynos/fb.h | 18 +++++++- drivers/video/exynos_fb.h | 8 +++ drivers/video/exynos_fimd.c | 76 ++++++++++++++++++-------------- 3 files changed, 68 insertions(+), 34 deletions(-)
arch/arm/include/asm/arch-exynos/fb.h +17 -1
@@ -23,7 +23,7 @@#define __ASM_ARM_ARCH_FB_H_ #ifndef __ASSEMBLY__ -struct exynos4_fb { +struct exynos_fb { unsigned int vidcon0; unsigned int vidcon1; unsigned int vidcon2;
@@ -151,9 +151,14 @@ struct exynos4_fb {unsigned char res15[156 ];unsigned int dualrgb; + unsigned char res16[16]; };#endif +/* LCD IF register offset */ +#define EXYNOS4_LCD_IF_BASE_OFFSET 0x0 +#define EXYNOS5_LCD_IF_BASE_OFFSET 0x20000 +/* * Register offsets */
@@ -253,6 +258,8 @@ struct exynos4_fb {/* VIDTCON2 */ #define EXYNOS_VIDTCON2_LINEVAL (x) (((x) & 0x7ff) << 11)#define EXYNOS_VIDTCON2_HOZVAL (x) (((x) & 0x7ff) << 0) +#define EXYNOS_VIDTCON2_LINEVAL_E (x) ((((x) & 0x800) >> 11) << 23) +#define EXYNOS_VIDTCON2_HOZVAL_E (x) ((((x) & 0x800) >> 11) << 22)/* Window 0~4 Control - WINCONx */ #define EXYNOS_WINCON_DATAPATH_DMA (0 << 22)
@@ -330,6 +337,8 @@ struct exynos4_fb {#define EXYNOS_VIDOSD_TOP_Y (x) (((x) & 0x7ff) << 0)#define EXYNOS_VIDOSD_RIGHT_X (x) (((x) & 0x7ff) << 11)#define EXYNOS_VIDOSD_BOTTOM_Y (x) (((x) & 0x7ff) << 0) +#define EXYNOS_VIDOSD_RIGHT_X_E (x) (((x) & 0x1) << 23) +#define EXYNOS_VIDOSD_BOTTOM_Y_E (x) (((x) & 0x1) << 22)/* VIDOSD0C, VIDOSDxD */ #define EXYNOS_VIDOSD_SIZE (x) (((x) & 0xffffff) << 0)
@@ -354,6 +363,8 @@ struct exynos4_fb {/* Buffer Size */ #define EXYNOS_VIDADDR_OFFSIZE (x) (((x) & 0x1fff) << 13)#define EXYNOS_VIDADDR_PAGEWIDTH (x) (((x) & 0x1fff) << 0) +#define EXYNOS_VIDADDR_OFFSIZE_E (x) ((((x) & 0x2000) >> 13) << 27) +#define EXYNOS_VIDADDR_PAGEWIDTH_E (x) ((((x) & 0x2000) >> 13) << 26)/* WIN Color Map */ #define EXYNOS_WINMAP_COLOR (x) ((x) & 0xffffff)
@@ -443,4 +454,9 @@ struct exynos4_fb {#define EXYNOS_I80START_TRIG (1 << 1)#define EXYNOS_I80STATUS_TRIG_DONE (1 << 2) +/* DP_MIE_CLKCON */ +#define EXYNOS_DP_MIE_DISABLE (0 << 0) +#define EXYNOS_DP_CLK_ENABLE (1 << 1) +#define EXYNOS_MIE_CLK_ENABLE (3 << 0) +#endif /* _REGS_FB_H */
drivers/video/exynos_fb.h +8 -0
@@ -51,4 +51,12 @@ void exynos_fimd_lcd_init_mem(unsigned long screen_base, unsigned long fb_size,void exynos_fimd_lcd_init (vidinfo_t *vid);unsigned long exynos_fimd_calc_fbsize (void ); +static unsigned int exynos_fimd_get_base_offset (void ) +{ +if (cpu_is_exynos5 ()) +return EXYNOS5_LCD_IF_BASE_OFFSET ; +else +return EXYNOS4_LCD_IF_BASE_OFFSET ; +} +#endif
drivers/video/exynos_fimd.c +43 -33
182 lines not on this page · raw message
Signature · 1 line
1.7.4.1
PATCH v2 1/1 video: support exynos fimd driver for various exynos series
Quoted 5 lines · Donghwa Lee
This patch support exynos fimd driver for various exynos series different from existing it supports only exynos4 chip.
Signed-off-by Donghwa Lee <[email protected]>Signed-off-by Kyungmin Park <[email protected]>
Quoted 9 lines
---
Changes for v1:
- movesexynos_fimd_get_base_offset()toexynos_fb.harch/arm/include/asm/arch-exynos/fb.h | 18 +++++++- drivers/video/exynos_fb.h | 8 +++ drivers/video/exynos_fimd.c | 76 ++++++++++++++++++-------------- 3 files changed, 68 insertions(+), 34 deletions(-)
Looks good to me.
Anatolij,
If you are OK. I'll merge this patch to u-boot-samsung.
Thanks.
Minkyu Kang.
Signature · 2 lines
from. prom. www.promsoft.net
PATCH v2 1/1 video: support exynos fimd driver for various exynos series
In reply to Donghwa LeeHi,
Quoted 8 lines · On Thu, 19 Jul 2012 10:30:44 +0900 Donghwa Lee <[email protected]> wrote:
This patch support exynos fimd driver for various exynos series different from existing it supports only exynos4 chip.
Signed-off-by Donghwa Lee <[email protected]>Signed-off-by Kyungmin Park <[email protected]>---
Changes for v1:
- movesexynos_fimd_get_base_offset()toexynos_fb.h
Why? This function is used in exynos_fimd.c file only. Moving it to the header file will result in a warning when compiling files including exynos_fb.h. This function should be in exynos_fimd.c.
Thanks,
Anatolij
PATCH v2 1/1 video: support exynos fimd driver for various exynos series
Quoted 14 lines · Anatolij Gustschin
Hi,
Quoted 8 lines · On Thu, 19 Jul 2012 10:30:44 +0900 Donghwa Lee <[email protected]> wrote:
This patch support exynos fimd driver for various exynos series different from existing it supports only exynos4 chip.
Signed-off-by Donghwa Lee <[email protected]>Signed-off-by Kyungmin Park <[email protected]>---
Changes for v1:
- movesexynos_fimd_get_base_offset()toexynos_fb.h
Quoted 4 lines
Why? This function is used in
exynos_fimd.cfile only. Moving it to the header file will result in a warning when compiling files includingexynos_fb.h. This function should be inexynos_fimd.c.
Good point : )
Donghwa misunderstood my opinion, maybe.
I want to move this function to arch/arm/include/asm/arch-exynos/fb.h. not drivers/video/exynos_fb.h.
Because define values and accessor function should be in same header file.
Thanks.
Minkyu Kang.
Signature · 2 lines
from. prom. www.promsoft.net