-
Notifications
You must be signed in to change notification settings - Fork 592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os/drivers/lcd/: Remove logo specific code from bus specific files #6614
base: master
Are you sure you want to change the base?
Conversation
…i_lcd.c to logo.c Reduces dependency from mipi_lcd.c by moving logo specific code to logo.c file. There are three functions defined inside logo.c file -: 1)lcd_logo_allocate_buffer(): It allocate buffer for logo data. If software rotation is enabled it utilizes software rotation buffer else a new buffer is created. 2)lcd_logo_fill_buffer(): It fills the logo buffer by identifying correct area. 3)lcd_logo_release_buffer(): It releases the logo buffer memory.
Remove logo specific code from bus specific files (mipi_lcd.c). |
@namanjain7 Sorry, because of urgent issue, review is pending. |
@@ -247,6 +249,7 @@ static int lcddev_ioctl(FAR struct file *filep, int cmd, unsigned long arg) | |||
} | |||
break; | |||
case LCDDEVIO_PUTAREA: { | |||
lcd_logo_release_buffer(); | |||
#if defined(CONFIG_LCD_FLUSH_THREAD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If CONFIG_LCD_FLUSH_THREAD is enabled, we don't need buffer for only lcd logo
#if !defined(CONFIG_LCD_SW_ROTATION) | ||
if (lcd_init_fullscreen_image != NULL) { | ||
kmm_free(lcd_init_fullscreen_image); | ||
} | ||
#endif | ||
if (!lcd_init_fullscreen_image) { | ||
lcd_init_fullscreen_image = NULL; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#if !defined(CONFIG_LCD_SW_ROTATION) | |
if (lcd_init_fullscreen_image != NULL) { | |
kmm_free(lcd_init_fullscreen_image); | |
} | |
#endif | |
if (!lcd_init_fullscreen_image) { | |
lcd_init_fullscreen_image = NULL; | |
} | |
} | |
if (!lcd_init_fullscreen_image) { | |
#if !defined(CONFIG_LCD_SW_ROTATION) | |
kmm_free(lcd_init_fullscreen_image); | |
#endif | |
lcd_init_fullscreen_image = NULL; | |
} | |
} | |
Reduces dependency from mipi_lcd.c by moving logo specific code to logo.c file. There are three functions defined inside logo.c file -: 1)lcd_logo_allocate_buffer(): It allocate buffer for logo data. If software rotation is enabled it utilizes software rotation buffer else a new buffer is created. 2)lcd_logo_fill_buffer(): It fills the logo buffer by identifying correct area. 3)lcd_logo_release_buffer(): It releases the logo buffer memory.