Message ID | 1358155936-834-3-git-send-email-ajaykumar.rs@samsung.com |
---|---|
State | Accepted |
Delegated to: | Minkyu Kang |
Headers | show |
Hi Ajay, On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar <ajaykumar.rs@samsung.com> wrote: > Previously, the call to draw_logo() was happening irrespective > of whether we have selected logo or LCD console. > With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected. > > This would even fix the following compilation warning: > exynos_fb.c: In function 'draw_logo': > exynos_fb.c:74:8: warning: variable 'addr' set but not used > [-Wunused-but-set-variable] > exynos_fb.c:73:9: warning: variable 'y' set but not used > [-Wunused-but-set-variable] > exynos_fb.c:73:6: warning: variable 'x' set but not used > [-Wunused-but-set-variable] > > Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> > --- > drivers/video/exynos_fb.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c > index 183bca0..ee0ed06 100644 > --- a/drivers/video/exynos_fb.c > +++ b/drivers/video/exynos_fb.c > @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) > lcd_set_flush_dcache(1); > } > > +#ifdef CONFIG_CMD_BMP > static void draw_logo(void) > { > int x, y; > @@ -88,10 +89,9 @@ static void draw_logo(void) > } > > addr = panel_info.logo_addr; > -#ifdef CONFIG_CMD_BMP > bmp_display(addr, x, y); > -#endif > } > +#endif > > static void lcd_panel_on(vidinfo_t *vid) > { > @@ -150,7 +150,9 @@ void lcd_enable(void) > if (panel_info.logo_on) { > memset(lcd_base, 0, panel_width * panel_height * > (NBITS(panel_info.vl_bpix) >> 3)); > +#ifdef CONFIG_CMD_BMP > draw_logo(); > +#endif It would be nice to avoid another #ifdef. Would it be possible instead to make the first #ifdef cover the whole internals of the draw_logo() function? > } > > lcd_panel_on(&panel_info); > -- > 1.8.0 > Regards, Simon
Hi Simon, On Tue, Jan 22, 2013 at 7:13 PM, Simon Glass <sjg@chromium.org> wrote: > Hi Ajay, > > On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar <ajaykumar.rs@samsung.com> wrote: >> Previously, the call to draw_logo() was happening irrespective >> of whether we have selected logo or LCD console. >> With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected. >> >> This would even fix the following compilation warning: >> exynos_fb.c: In function 'draw_logo': >> exynos_fb.c:74:8: warning: variable 'addr' set but not used >> [-Wunused-but-set-variable] >> exynos_fb.c:73:9: warning: variable 'y' set but not used >> [-Wunused-but-set-variable] >> exynos_fb.c:73:6: warning: variable 'x' set but not used >> [-Wunused-but-set-variable] >> >> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> >> --- >> drivers/video/exynos_fb.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c >> index 183bca0..ee0ed06 100644 >> --- a/drivers/video/exynos_fb.c >> +++ b/drivers/video/exynos_fb.c >> @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) >> lcd_set_flush_dcache(1); >> } >> >> +#ifdef CONFIG_CMD_BMP >> static void draw_logo(void) >> { >> int x, y; >> @@ -88,10 +89,9 @@ static void draw_logo(void) >> } >> >> addr = panel_info.logo_addr; >> -#ifdef CONFIG_CMD_BMP >> bmp_display(addr, x, y); >> -#endif >> } >> +#endif >> >> static void lcd_panel_on(vidinfo_t *vid) >> { >> @@ -150,7 +150,9 @@ void lcd_enable(void) >> if (panel_info.logo_on) { >> memset(lcd_base, 0, panel_width * panel_height * >> (NBITS(panel_info.vl_bpix) >> 3)); >> +#ifdef CONFIG_CMD_BMP >> draw_logo(); >> +#endif > > It would be nice to avoid another #ifdef. Would it be possible instead > to make the first #ifdef cover the whole internals of the draw_logo() > function? This patchset has already been merged! >> } >> >> lcd_panel_on(&panel_info); >> -- >> 1.8.0 >> > > Regards, > Simon Regards, Ajay
Hi Ajay, On Tue, Jan 22, 2013 at 6:11 AM, Ajay kumar <ajaynumb@gmail.com> wrote: > Hi Simon, > > On Tue, Jan 22, 2013 at 7:13 PM, Simon Glass <sjg@chromium.org> wrote: >> Hi Ajay, >> >> On Mon, Jan 14, 2013 at 1:32 AM, Ajay Kumar <ajaykumar.rs@samsung.com> wrote: >>> Previously, the call to draw_logo() was happening irrespective >>> of whether we have selected logo or LCD console. >>> With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected. >>> >>> This would even fix the following compilation warning: >>> exynos_fb.c: In function 'draw_logo': >>> exynos_fb.c:74:8: warning: variable 'addr' set but not used >>> [-Wunused-but-set-variable] >>> exynos_fb.c:73:9: warning: variable 'y' set but not used >>> [-Wunused-but-set-variable] >>> exynos_fb.c:73:6: warning: variable 'x' set but not used >>> [-Wunused-but-set-variable] >>> >>> Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> >>> --- >>> drivers/video/exynos_fb.c | 6 ++++-- >>> 1 file changed, 4 insertions(+), 2 deletions(-) >>> >>> diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c >>> index 183bca0..ee0ed06 100644 >>> --- a/drivers/video/exynos_fb.c >>> +++ b/drivers/video/exynos_fb.c >>> @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) >>> lcd_set_flush_dcache(1); >>> } >>> >>> +#ifdef CONFIG_CMD_BMP >>> static void draw_logo(void) >>> { >>> int x, y; >>> @@ -88,10 +89,9 @@ static void draw_logo(void) >>> } >>> >>> addr = panel_info.logo_addr; >>> -#ifdef CONFIG_CMD_BMP >>> bmp_display(addr, x, y); >>> -#endif >>> } >>> +#endif >>> >>> static void lcd_panel_on(vidinfo_t *vid) >>> { >>> @@ -150,7 +150,9 @@ void lcd_enable(void) >>> if (panel_info.logo_on) { >>> memset(lcd_base, 0, panel_width * panel_height * >>> (NBITS(panel_info.vl_bpix) >> 3)); >>> +#ifdef CONFIG_CMD_BMP >>> draw_logo(); >>> +#endif >> >> It would be nice to avoid another #ifdef. Would it be possible instead >> to make the first #ifdef cover the whole internals of the draw_logo() >> function? > This patchset has already been merged! No problem - I have been away for a week and didn't see the 'applied' response. > >>> } >>> >>> lcd_panel_on(&panel_info); >>> -- >>> 1.8.0 >>> >> >> Regards, >> Simon > > Regards, > Ajay Regards, Simon
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c index 183bca0..ee0ed06 100644 --- a/drivers/video/exynos_fb.c +++ b/drivers/video/exynos_fb.c @@ -68,6 +68,7 @@ static void exynos_lcd_init(vidinfo_t *vid) lcd_set_flush_dcache(1); } +#ifdef CONFIG_CMD_BMP static void draw_logo(void) { int x, y; @@ -88,10 +89,9 @@ static void draw_logo(void) } addr = panel_info.logo_addr; -#ifdef CONFIG_CMD_BMP bmp_display(addr, x, y); -#endif } +#endif static void lcd_panel_on(vidinfo_t *vid) { @@ -150,7 +150,9 @@ void lcd_enable(void) if (panel_info.logo_on) { memset(lcd_base, 0, panel_width * panel_height * (NBITS(panel_info.vl_bpix) >> 3)); +#ifdef CONFIG_CMD_BMP draw_logo(); +#endif } lcd_panel_on(&panel_info);
Previously, the call to draw_logo() was happening irrespective of whether we have selected logo or LCD console. With this patch we call draw_logo() only when CONFIG_CMD_BMP is selected. This would even fix the following compilation warning: exynos_fb.c: In function 'draw_logo': exynos_fb.c:74:8: warning: variable 'addr' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:9: warning: variable 'y' set but not used [-Wunused-but-set-variable] exynos_fb.c:73:6: warning: variable 'x' set but not used [-Wunused-but-set-variable] Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com> --- drivers/video/exynos_fb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)