Patchwork [U-Boot,02/10] lcd, tegra: remove unused cursor functions

login
register
mail settings
Submitter Jeroen Hofstee
Date Jan. 12, 2013, 10:07 p.m.
Message ID <1358028480-4979-3-git-send-email-jeroen@myspectrum.nl>
Download mbox | patch
Permalink /patch/211559/
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Comments

Jeroen Hofstee - Jan. 12, 2013, 10:07 p.m.
cc: Anatolij Gustschin <agust@denx.de>
cc: Simon Glass <sjg.chromium.org>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 drivers/video/tegra.c |   52 -------------------------------------------------
 1 file changed, 52 deletions(-)
Jeroen Hofstee - Jan. 12, 2013, 10:17 p.m.
I wrote down your mail address wrongly here. I will fix it in v2,
awaiting other comments.

On 01/12/2013 11:07 PM, Jeroen Hofstee wrote:
> cc: Anatolij Gustschin <agust@denx.de>
> cc: Simon Glass <sjg.chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> ---
>   drivers/video/tegra.c |   52 -------------------------------------------------
>   1 file changed, 52 deletions(-)
>
> diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
> index 3709d0b..26a96a5 100644
> --- a/drivers/video/tegra.c
> +++ b/drivers/video/tegra.c
> @@ -73,62 +73,10 @@ vidinfo_t panel_info = {
>   	.vl_col = -1,
>   };
>   
> -char lcd_cursor_enabled;
> -
> -ushort lcd_cursor_width;
> -ushort lcd_cursor_height;
> -
>   #ifndef CONFIG_OF_CONTROL
>   #error "You must enable CONFIG_OF_CONTROL to get Tegra LCD support"
>   #endif
>   
> -void lcd_cursor_size(ushort width, ushort height)
> -{
> -	lcd_cursor_width = width;
> -	lcd_cursor_height = height;
> -}
> -
> -void lcd_toggle_cursor(void)
> -{
> -	ushort x, y;
> -	uchar *dest;
> -	ushort row;
> -
> -	x = console_col * lcd_cursor_width;
> -	y = console_row * lcd_cursor_height;
> -	dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) /
> -			8);
> -
> -	for (row = 0; row < lcd_cursor_height; ++row, dest += lcd_line_length) {
> -		ushort *d = (ushort *)dest;
> -		ushort color;
> -		int i;
> -
> -		for (i = 0; i < lcd_cursor_width; ++i) {
> -			color = *d;
> -			color ^= lcd_getfgcolor();
> -			*d = color;
> -			++d;
> -		}
> -	}
> -}
> -
> -void lcd_cursor_on(void)
> -{
> -	lcd_cursor_enabled = 1;
> -	lcd_toggle_cursor();
> -}
> -void lcd_cursor_off(void)
> -{
> -	lcd_cursor_enabled = 0;
> -	lcd_toggle_cursor();
> -}
> -
> -char lcd_is_cursor_enabled(void)
> -{
> -	return lcd_cursor_enabled;
> -}
> -
>   static void update_panel_size(struct fdt_disp_config *config)
>   {
>   	panel_info.vl_col = config->width;
Simon Glass - Jan. 25, 2013, 8:38 p.m.
+Tom

On Sun, Jan 13, 2013 at 11:07 AM, Jeroen Hofstee <jeroen@myspectrum.nl> wrote:
> cc: Anatolij Gustschin <agust@denx.de>
> cc: Simon Glass <sjg.chromium.org>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>

Acked-by: Simon Glass <sjg@chromium.org>

> ---
>  drivers/video/tegra.c |   52 -------------------------------------------------
>  1 file changed, 52 deletions(-)
>
> diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
> index 3709d0b..26a96a5 100644
> --- a/drivers/video/tegra.c
> +++ b/drivers/video/tegra.c
> @@ -73,62 +73,10 @@ vidinfo_t panel_info = {
>         .vl_col = -1,
>  };
>
> -char lcd_cursor_enabled;
> -
> -ushort lcd_cursor_width;
> -ushort lcd_cursor_height;
> -
>  #ifndef CONFIG_OF_CONTROL
>  #error "You must enable CONFIG_OF_CONTROL to get Tegra LCD support"
>  #endif
>
> -void lcd_cursor_size(ushort width, ushort height)
> -{
> -       lcd_cursor_width = width;
> -       lcd_cursor_height = height;
> -}
> -
> -void lcd_toggle_cursor(void)
> -{
> -       ushort x, y;
> -       uchar *dest;
> -       ushort row;
> -
> -       x = console_col * lcd_cursor_width;
> -       y = console_row * lcd_cursor_height;
> -       dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) /
> -                       8);
> -
> -       for (row = 0; row < lcd_cursor_height; ++row, dest += lcd_line_length) {
> -               ushort *d = (ushort *)dest;
> -               ushort color;
> -               int i;
> -
> -               for (i = 0; i < lcd_cursor_width; ++i) {
> -                       color = *d;
> -                       color ^= lcd_getfgcolor();
> -                       *d = color;
> -                       ++d;
> -               }
> -       }
> -}
> -
> -void lcd_cursor_on(void)
> -{
> -       lcd_cursor_enabled = 1;
> -       lcd_toggle_cursor();
> -}
> -void lcd_cursor_off(void)
> -{
> -       lcd_cursor_enabled = 0;
> -       lcd_toggle_cursor();
> -}
> -
> -char lcd_is_cursor_enabled(void)
> -{
> -       return lcd_cursor_enabled;
> -}
> -
>  static void update_panel_size(struct fdt_disp_config *config)
>  {
>         panel_info.vl_col = config->width;
> --
> 1.7.9.5
>
> _______________________________________________
> U-Boot mailing list
> U-Boot@lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
Jeroen Hofstee - Jan. 26, 2013, 4:20 p.m.
Hello Tom,

On 01/25/2013 10:18 PM, Tom Warren wrote:
> Jeroen,
>
> How will this all go in? Do you expect Anatolij to take it in via the main repo (u-boot.git/master)?
I am not sure I understand exactly what you mean, but yes there
are some conflicts awaiting. 2 pending drivers and another lcd
cleanup patch. And yes I think it is easier to rebase those then to
rebase this and Wolfgang's patch (if that is what you're asking),
since the variables are deleted step by step. So simply not adding
them is easier then getting rid of them again. The other lcd cleanup
is smaller. I don't know how much trouble the board config changes
will cause.

To not break the pending drivers a new version of
http://patchwork.ozlabs.org/patch/212378/ is needed though, since
it does not apply after this patch set. Since that patch contains 2 lines,
that should be easy (or can be manually merged by Anatolij).

But it is up to Anatolij, how this actually goes in and to which branch.

Regards,
Jeroen

Patch

diff --git a/drivers/video/tegra.c b/drivers/video/tegra.c
index 3709d0b..26a96a5 100644
--- a/drivers/video/tegra.c
+++ b/drivers/video/tegra.c
@@ -73,62 +73,10 @@  vidinfo_t panel_info = {
 	.vl_col = -1,
 };
 
-char lcd_cursor_enabled;
-
-ushort lcd_cursor_width;
-ushort lcd_cursor_height;
-
 #ifndef CONFIG_OF_CONTROL
 #error "You must enable CONFIG_OF_CONTROL to get Tegra LCD support"
 #endif
 
-void lcd_cursor_size(ushort width, ushort height)
-{
-	lcd_cursor_width = width;
-	lcd_cursor_height = height;
-}
-
-void lcd_toggle_cursor(void)
-{
-	ushort x, y;
-	uchar *dest;
-	ushort row;
-
-	x = console_col * lcd_cursor_width;
-	y = console_row * lcd_cursor_height;
-	dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) /
-			8);
-
-	for (row = 0; row < lcd_cursor_height; ++row, dest += lcd_line_length) {
-		ushort *d = (ushort *)dest;
-		ushort color;
-		int i;
-
-		for (i = 0; i < lcd_cursor_width; ++i) {
-			color = *d;
-			color ^= lcd_getfgcolor();
-			*d = color;
-			++d;
-		}
-	}
-}
-
-void lcd_cursor_on(void)
-{
-	lcd_cursor_enabled = 1;
-	lcd_toggle_cursor();
-}
-void lcd_cursor_off(void)
-{
-	lcd_cursor_enabled = 0;
-	lcd_toggle_cursor();
-}
-
-char lcd_is_cursor_enabled(void)
-{
-	return lcd_cursor_enabled;
-}
-
 static void update_panel_size(struct fdt_disp_config *config)
 {
 	panel_info.vl_col = config->width;