1.1 --- a/nanonote_gpm940b0.c Sun Jun 07 02:18:33 2015 +0200
1.2 +++ b/nanonote_gpm940b0.c Sun Jun 07 02:20:54 2015 +0200
1.3 @@ -1,7 +1,8 @@
1.4 /*
1.5 * JzRISC lcd controller
1.6 *
1.7 - * Xiangfu Liu <xiangfu@sharism.cc>
1.8 + * Copyright (C) Xiangfu Liu <xiangfu@sharism.cc>
1.9 + * Copyright (C) 2015 Paul Boddie <paul@boddie.org.uk>
1.10 *
1.11 * This program is free software; you can redistribute it and/or
1.12 * modify it under the terms of the GNU General Public License as
1.13 @@ -54,26 +55,15 @@
1.14 320, 240, LCD_BPP,
1.15 };
1.16
1.17 -int lcd_line_length;
1.18 -int lcd_color_fg;
1.19 -int lcd_color_bg;
1.20 -/*
1.21 - * Frame buffer memory information
1.22 - */
1.23 -void *lcd_base; /* Start of framebuffer memory */
1.24 -void *lcd_console_address; /* Start of console buffer */
1.25 -
1.26 -short console_col;
1.27 -short console_row;
1.28 -
1.29 -void lcd_ctrl_init (void *lcdbase);
1.30 -void lcd_enable (void);
1.31 -void lcd_disable (void);
1.32 +unsigned long lcd_get_size(void)
1.33 +{
1.34 + int line_length = (panel_info.vl_col * NBITS(panel_info.vl_bpix)) / 8;
1.35 + return line_length * panel_info.vl_row;
1.36 +}
1.37
1.38 static int jz_lcd_init_mem(void *lcdbase, vidinfo_t *vid);
1.39 static void jz_lcd_desc_init(vidinfo_t *vid);
1.40 static int jz_lcd_hw_init(vidinfo_t *vid);
1.41 -/* extern int flush_cache_all(void); */
1.42
1.43 void lcd_ctrl_init (void *lcdbase)
1.44 {