mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Juergen Beisert <jbe@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 05/10] Fix default framebuffer 'enable' set
Date: Mon, 20 Dec 2010 16:05:04 +0100	[thread overview]
Message-ID: <1292857509-13881-6-git-send-email-jbe@pengutronix.de> (raw)
In-Reply-To: <1292857509-13881-1-git-send-email-jbe@pengutronix.de>

To setup the default 'enable' setting the "dev_set_param(dev, "enable", "0");"
does not work as expected. After the call the parameter is still "<NULL>".
This is due to any change of the setting is rejected, if the same setting
is already active.
This patch also let the default setting be successfull, but only calls the
graphics backend if a change happens.

Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
---
 drivers/video/fb.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index ab2c5eb..bef4147 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -39,14 +39,13 @@ static int fb_enable_set(struct device_d *dev, struct param_d *param,
 
 	enable = simple_strtoul(val, NULL, 0);
 
-	if (info->enabled == !!enable)
-		return 0;
-
 	if (enable) {
-		info->fbops->fb_enable(info);
+		if (!info->enabled)
+			info->fbops->fb_enable(info);
 		new = "1";
 	} else {
-		info->fbops->fb_disable(info);
+		if (info->enabled)
+			info->fbops->fb_disable(info);
 		new = "0";
 	}
 
-- 
1.7.2.3


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2010-12-20 15:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 15:04 [PATCH] Add support for runtime selection of video mode in barebox Juergen Beisert
2010-12-20 15:05 ` [PATCH 01/10] Add more useful generic macros Juergen Beisert
2010-12-20 15:05 ` [PATCH 02/10] ARM Chumby: Fix memory index Juergen Beisert
2010-12-20 15:05 ` [PATCH 03/10] ARM Chumby: Fix unit of the clocks after the change to Hz Juergen Beisert
2010-12-20 15:05 ` [PATCH 04/10] ARM Chumby: Just fix some typos Juergen Beisert
2010-12-20 15:05 ` Juergen Beisert [this message]
2010-12-20 15:05 ` [PATCH 06/10] Add the feature to change the video mode at runtime Juergen Beisert
2010-12-20 15:05 ` [PATCH 07/10] ARM STM/i.MX: Add a pixel clock calculation routine for i.MX23/i.MX28 Juergen Beisert
2010-12-20 15:05 ` [PATCH 08/10] ARM STM/i.MX: Add video driver " Juergen Beisert
2010-12-29 14:55   ` Gregory CLEMENT
2010-12-20 15:05 ` [PATCH 09/10] ARM KARO-TX28-STK5: Add a user for video graphics support on i.MX28 Juergen Beisert
2010-12-20 15:05 ` [PATCH 10/10] ARM Chumby-Falconwing: Add a user for video graphics support on i.MX23 Juergen Beisert

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=1292857509-13881-6-git-send-email-jbe@pengutronix.de \
    --to=jbe@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox