diff options
author | William Wilgus <wilgus.william@gmail.com> | 2021-03-23 13:35:29 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2021-03-24 18:22:01 +0000 |
commit | ffee661ab70e9622a05c9c2f24ecf474dad8f042 (patch) | |
tree | c44b07169b685d2d50154065138e7362603bb0f5 | |
parent | 94b40ed314e980a7ecc3c3cada8d6f002cf85f58 (diff) | |
download | rockbox-ffee661ab7.tar.gz rockbox-ffee661ab7.zip |
lcd framebuffer - Bugfix ensure proper alignment
-- apparenty 0x4 aligned doesn't work properly
requires 0x8 alignment at least for the h10 20gb
but enabled for all arm processors
assign the default framebuffer to the default_vp as well
Change-Id: I0b76c30f2ddb5d6d2f7c6a132e4081aee58da17b
-rw-r--r-- | firmware/drivers/lcd-1bit-vert.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-horz.c | 5 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-vert.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-2bit-vi.c | 4 | ||||
-rw-r--r-- | firmware/drivers/lcd-color-common.c | 4 |
5 files changed, 10 insertions, 12 deletions
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c index c86ced9b6c..8bdc0c6d8e 100644 --- a/firmware/drivers/lcd-1bit-vert.c +++ b/firmware/drivers/lcd-1bit-vert.c @@ -73,10 +73,10 @@ static struct viewport default_vp = .height = LCDM(HEIGHT), .font = FONT_SYSFIXED, .drawmode = DRMODE_SOLID, - .buffer = NULL, + .buffer = &LCDFN(framebuffer_default), }; -struct viewport* CURRENT_VP; +struct viewport* CURRENT_VP MEM_ALIGN_ATTR = NULL; static void *LCDFN(frameaddress_default)(int x, int y) { @@ -94,7 +94,6 @@ static void *LCDFN(frameaddress_default)(int x, int y) /* LCD init */ void LCDFN(init)(void) { - /* Initialize the viewport */ LCDFN(set_viewport)(NULL); LCDFN(clear_display)(); diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c index b2114ba830..a96ee51036 100644 --- a/firmware/drivers/lcd-2bit-horz.c +++ b/firmware/drivers/lcd-2bit-horz.c @@ -66,12 +66,12 @@ static struct viewport default_vp = .height = LCD_HEIGHT, .font = FONT_SYSFIXED, .drawmode = DRMODE_SOLID, - .buffer = NULL, + .buffer = &lcd_framebuffer_default, .fg_pattern = LCD_DEFAULT_FG, .bg_pattern = LCD_DEFAULT_BG }; -struct viewport* lcd_current_viewport IBSS_ATTR; +struct viewport* lcd_current_viewport IBSS_ATTR MEM_ALIGN_ATTR = NULL; static unsigned fg_pattern IBSS_ATTR; static unsigned bg_pattern IBSS_ATTR; @@ -93,7 +93,6 @@ void lcd_init(void) { /* Initialize the viewport */ lcd_set_viewport(NULL); - lcd_clear_display(); /* Call device specific init */ lcd_init_device(); diff --git a/firmware/drivers/lcd-2bit-vert.c b/firmware/drivers/lcd-2bit-vert.c index 6a476495d0..dbd0eac3b6 100644 --- a/firmware/drivers/lcd-2bit-vert.c +++ b/firmware/drivers/lcd-2bit-vert.c @@ -68,12 +68,12 @@ static struct viewport default_vp = .height = LCD_HEIGHT, .font = FONT_SYSFIXED, .drawmode = DRMODE_SOLID, - .buffer = NULL, + .buffer = &lcd_framebuffer_default, .fg_pattern = LCD_DEFAULT_FG, .bg_pattern = LCD_DEFAULT_BG }; -struct viewport* lcd_current_viewport IBSS_ATTR; +struct viewport* lcd_current_viewport IBSS_ATTR MEM_ALIGN_ATTR = NULL; static unsigned fg_pattern IBSS_ATTR; static unsigned bg_pattern IBSS_ATTR; diff --git a/firmware/drivers/lcd-2bit-vi.c b/firmware/drivers/lcd-2bit-vi.c index c09bbce2e0..5482777afd 100644 --- a/firmware/drivers/lcd-2bit-vi.c +++ b/firmware/drivers/lcd-2bit-vi.c @@ -80,12 +80,12 @@ static struct viewport default_vp = .height = LCDM(HEIGHT), .font = FONT_SYSFIXED, .drawmode = DRMODE_SOLID, - .buffer = NULL, + .buffer = &LCDFN(framebuffer_default), .fg_pattern = LCDM(DEFAULT_FG), .bg_pattern = LCDM(DEFAULT_BG) }; -struct viewport * CURRENT_VP IBSS_ATTR; +struct viewport * CURRENT_VP IBSS_ATTR MEM_ALIGN_ATTR = NULL; static unsigned fg_pattern IBSS_ATTR; static unsigned bg_pattern IBSS_ATTR; diff --git a/firmware/drivers/lcd-color-common.c b/firmware/drivers/lcd-color-common.c index 935f4e59dd..de72863bea 100644 --- a/firmware/drivers/lcd-color-common.c +++ b/firmware/drivers/lcd-color-common.c @@ -63,12 +63,12 @@ static struct viewport default_vp = .height = LCD_HEIGHT, .font = FONT_SYSFIXED, .drawmode = DRMODE_SOLID, - .buffer = NULL, + .buffer = &lcd_framebuffer_default, .fg_pattern = LCD_DEFAULT_FG, .bg_pattern = LCD_DEFAULT_BG, }; -struct viewport* lcd_current_viewport IDATA_ATTR; +struct viewport* lcd_current_viewport IDATA_ATTR MEM_ALIGN_ATTR = NULL; static void *lcd_frameaddress_default(int x, int y) { |