All of lore.kernel.org
 help / color / mirror / Atom feed
From: qianfanguijin@163.com
To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Cc: preid@electromag.com.au, andriy.shevchenko@linux.intel.com,
	qianfan Zhao <qianfanguijin@163.com>
Subject: [PATCH] drivers: fbtft: Add property 'keep-bootlogo'
Date: Sat, 12 Feb 2022 13:37:11 +0800	[thread overview]
Message-ID: <20220212053711.26481-1-qianfanguijin@163.com> (raw)

From: qianfan Zhao <qianfanguijin@163.com>

Keep the logo draw by bootloader

Signed-off-by: qianfan Zhao <qianfanguijin@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


WARNING: multiple messages have this Message-ID (diff)
From: qianfanguijin@163.com
To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Cc: qianfan Zhao <qianfanguijin@163.com>,
	preid@electromag.com.au, andriy.shevchenko@linux.intel.com
Subject: [PATCH] drivers: fbtft: Add property 'keep-bootlogo'
Date: Sat, 12 Feb 2022 13:37:11 +0800	[thread overview]
Message-ID: <20220212053711.26481-1-qianfanguijin@163.com> (raw)

From: qianfan Zhao <qianfanguijin@163.com>

Keep the logo draw by bootloader

Signed-off-by: qianfan Zhao <qianfanguijin@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


             reply	other threads:[~2022-02-12  5:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-12  5:37 qianfanguijin [this message]
2022-02-12  5:37 ` [PATCH] drivers: fbtft: Add property 'keep-bootlogo' qianfanguijin
2022-02-14 10:09 ` Andy Shevchenko
2022-02-14 10:09   ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220212053711.26481-1-qianfanguijin@163.com \
    --to=qianfanguijin@163.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=preid@electromag.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.