From: yxj Date: Wed, 23 Jan 2013 03:34:26 +0000 (+0800) Subject: rk screen:add interface to calculator fb size by screen resolution X-Git-Tag: firefly_0821_release~7842 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4673caa440bcbb71a7e978ad90bcd7c26f00a3f0;p=firefly-linux-kernel-4.4.55.git rk screen:add interface to calculator fb size by screen resolution --- diff --git a/drivers/video/display/screen/lcd_LP097QX1.c b/drivers/video/display/screen/lcd_LP097QX1.c index 27b9ed821077..1b93c87bf45d 100644 --- a/drivers/video/display/screen/lcd_LP097QX1.c +++ b/drivers/video/display/screen/lcd_LP097QX1.c @@ -117,3 +117,15 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->standby = NULL; screen->dsp_lut = dsp_lut; } + +size_t get_fb_size(void) +{ + size_t size = 0; + #if defined(CONFIG_THREE_FB_BUFFER) + size = ((H_VD)*(V_VD)<<2)* 3; //three buffer + #else + size = ((H_VD)*(V_VD)<<2)<<1; //two buffer + #endif + return ALIGN(size,SZ_1M); +} + diff --git a/drivers/video/display/screen/lcd_b101ew05.c b/drivers/video/display/screen/lcd_b101ew05.c index c667c5453c2c..89494ec81df9 100755 --- a/drivers/video/display/screen/lcd_b101ew05.c +++ b/drivers/video/display/screen/lcd_b101ew05.c @@ -340,3 +340,14 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->sscreen_set = rk610_lcd_scaler_set_param; #endif } + +size_t get_fb_size(void) +{ + size_t size = 0; + #if defined(CONFIG_THREE_FB_BUFFER) + size = ((H_VD)*(V_VD)<<2)* 3; //three buffer + #else + size = ((H_VD)*(V_VD)<<2)<<1; //two buffer + #endif + return ALIGN(size,SZ_1M); +} diff --git a/drivers/video/display/screen/lcd_ds1006h.c b/drivers/video/display/screen/lcd_ds1006h.c index fb8ee356ce75..2ad348da37f3 100755 --- a/drivers/video/display/screen/lcd_ds1006h.c +++ b/drivers/video/display/screen/lcd_ds1006h.c @@ -333,3 +333,15 @@ void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info ) screen->sscreen_set = rk610_lcd_scaler_set_param; #endif } + +size_t get_fb_size(void) +{ + size_t size = 0; + #if defined(CONFIG_THREE_FB_BUFFER) + size = ((H_VD)*(V_VD)<<2)* 3; //three buffer + #else + size = ((H_VD)*(V_VD)<<2)<<1; //two buffer + #endif + return ALIGN(size,SZ_1M); +} + diff --git a/include/linux/rk_screen.h b/include/linux/rk_screen.h index ef3688cb4201..700a157eca3b 100644 --- a/include/linux/rk_screen.h +++ b/include/linux/rk_screen.h @@ -154,6 +154,7 @@ struct rk29fb_info { static inline void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info) {} #else extern void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info); +extern size_t get_fb_size(void); #endif extern void set_tv_info(struct rk29fb_screen *screen); extern void set_hdmi_info(struct rk29fb_screen *screen);