-
Notifications
You must be signed in to change notification settings - Fork 618
drivers/lcd: Add splash image support for lcd drivers #6993
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
drivers/lcd: Add splash image support for lcd drivers #6993
Conversation
|
@anjana348 @namanjain7 @abhinav-s235 Could you review this PR to change initial screen output? |
os/drivers/lcd/mipi_lcd.c
Outdated
| fclose(test_file); | ||
|
|
||
| ASSERT(dev->setpower); | ||
| ret = dev->setpower(dev, CONFIG_LCD_MAXPOWER); |
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.
Earlier we were keeping LCD off in silent reboot case, now We are powering on LCD in both cases and setting different bmp image for silent reboot case.
And if bmp file is not present, driver registration will not be done
has the requirement changed like above?
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.
We are powering on LCD in both cases and setting different bmp image for silent reboot case
-> Right.
And if bmp file is not present, driver registration will not be done
-> Only LCD OFF. l'll fix it in this commit.
Thank you for Checking.
b4886bf to
33f4306
Compare
os/drivers/lcd/mipi_lcd.c
Outdated
| } | ||
|
|
||
| /* Check if BMP file exists before rendering */ | ||
| FILE *test_file = fopen(bmp_file_path, "rb"); |
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.
- There is double checking of file which is not needed , here and also in lcd_render_bmp(). Can be removed from one place.
- You have added an extra file "app1" in commit. Is it needed?
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.
- There is double checking of file which is not needed , here and also in lcd_render_bmp(). Can be removed from one place.
- You have added an extra file "app1" in commit. Is it needed?
-
I know this is double check, but we need to check file here for not turn on the LCD when file is not exist.
If this check is removed, LCD on -> lcd_render_bmp return error for no bmp file -> LCD off. I think this can make backlight blinking.
Do you have any good idea for about this? -
Of course not. I'll remove it. Thank you.
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.
Additionally, I also think we should avoid double checking.
However, due to the current LCD driver structure, the setpower function performs both LCD initialization and PWM ON. So the backlight must be turned on to draw the screen.
If there is no BMP file, the backlight should not turn on, so I think this method is currently the best approach.
In the future, by improving the LCD driver to separate PWM and LCD control, it might be possible to control them separately.
What are your thoughts on the current best approach and the improvements needed in the future?
And please let me know if there's anything incorrect in what I said.
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.
We can seperate setpower into small functions
power_off
Power_on
backlight(power)
and use them in lcd_init_put_image() (not call setpower ) like
power on ()
ret = lcd_render_bmp(dev, bmp_file_path); // Displaying BMP image on LCD
if (ret != OK) {
power_off();
return;
}
backlight(CONFIG_LCD_MAXPOWER)
Then we don't need to do double checking.
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.
Thank you for your advice.
I add new small functions, lcd_power_off and lcd_power_on for reuse.
And also removed double checking.
6d8b104 to
5e41510
Compare
This update modifies lcd_init_put_image to handle splash image rendering during boot. - Normal boot: Renders splash_normal.bmp. - Silent boot: Renders splash_silent.bmp. - No splash image: Turns LCD off. The existing LCD logo rendering code is replaced with splash image handling. A new sample splash_normal.bmp is added for 800x480 LCD. Signed-off-by: seokhun-eom <[email protected]>
5e41510 to
05302a8
Compare
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.
LGTM
We replace logo with splash image. So we don't need to use LCD logo anymore. Remove LCD logo configuration options from Kconfig and defconfig and related code. Delete lcd_logo_52_340.c file. Signed-off-by: seokhun-eom <[email protected]>
05302a8 to
3641fa9
Compare
This update modifies
lcd_init_put_imageto handle splash image rendering during boot.The existing LCD logo rendering code is replaced with splash image handling.
A new sample splash_normal.bmp is added for 800x480 LCD.
Implementation builds on PR #6990 (
lcd_render_bmpfunction).