[PATCH] drivers: fbtft: Add property 'keep-bootlogo'
qianfanguijin at 163.com
qianfanguijin at 163.com
Sat Feb 12 05:37:11 UTC 2022
From: qianfan Zhao <qianfanguijin at 163.com>
Keep the logo draw by bootloader
Signed-off-by: qianfan Zhao <qianfanguijin at 163.com>
---
drivers/staging/fbtft/fbtft-core.c | 6 ++++--
drivers/staging/fbtft/fbtft.h | 4 ++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 37548848af99..d683c2c54131 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -713,6 +713,7 @@ struct fb_info *fbtft_framebuffer_alloc(struct fbtft_display *display,
par->buf = buf;
spin_lock_init(&par->dirty_lock);
par->bgr = pdata->bgr;
+ par->keep_bootlogo = pdata->keep_bootlogo;
par->startbyte = pdata->startbyte;
par->init_sequence = init_sequence;
par->gamma.curves = gamma_curves;
@@ -838,8 +839,8 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
goto reg_fail;
}
- /* update the entire display */
- par->fbtftops.update_display(par, 0, par->info->var.yres - 1);
+ if (!par->keep_bootlogo) /* update the entire display */
+ par->fbtftops.update_display(par, 0, par->info->var.yres - 1);
if (par->fbtftops.set_gamma && par->gamma.curves) {
ret = par->fbtftops.set_gamma(par, par->gamma.curves);
@@ -1176,6 +1177,7 @@ static struct fbtft_platform_data *fbtft_properties_read(struct device *dev)
pdata->display.debug = fbtft_property_value(dev, "debug");
pdata->rotate = fbtft_property_value(dev, "rotate");
pdata->bgr = device_property_read_bool(dev, "bgr");
+ pdata->keep_bootlogo = device_property_read_bool(dev, "keep-bootlogo");
pdata->fps = fbtft_property_value(dev, "fps");
pdata->txbuflen = fbtft_property_value(dev, "txbuflen");
pdata->startbyte = fbtft_property_value(dev, "startbyte");
diff --git a/drivers/staging/fbtft/fbtft.h b/drivers/staging/fbtft/fbtft.h
index 6751c129df4d..6232e203544a 100644
--- a/drivers/staging/fbtft/fbtft.h
+++ b/drivers/staging/fbtft/fbtft.h
@@ -126,6 +126,7 @@ struct fbtft_display {
* @gpios: Pointer to an array of pinname to gpio mappings
* @rotate: Display rotation angle
* @bgr: LCD Controller BGR bit
+ * @keep_bootlogo: Keep the logo draw by bootloader
* @fps: Frames per second (this will go away, use @fps in @fbtft_display)
* @txbuflen: Size of transmit buffer
* @startbyte: When set, enables use of Startbyte in transfers
@@ -136,6 +137,7 @@ struct fbtft_platform_data {
struct fbtft_display display;
unsigned int rotate;
bool bgr;
+ bool keep_bootlogo;
unsigned int fps;
int txbuflen;
u8 startbyte;
@@ -186,6 +188,7 @@ struct fbtft_platform_data {
* @first_update_done: Used to only time the first display update
* @update_time: Used to calculate 'fps' in debug output
* @bgr: BGR mode/\n
+ * @keep_bootlogo: Keep the logo draw by bootloader
* @extra: Extra info needed by driver
*/
struct fbtft_par {
@@ -227,6 +230,7 @@ struct fbtft_par {
bool first_update_done;
ktime_t update_time;
bool bgr;
+ bool keep_bootlogo;
void *extra;
};
--
2.17.1
More information about the dri-devel
mailing list