From: Rodolfo Giometti <giometti@enneenne.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] pxafb: Add option to enable/disable the cursor
Date: Tue, 13 Feb 2007 18:38:05 +0100 [thread overview]
Message-ID: <20070213173805.GK8882@enneenne.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 301 bytes --]
Add cursor enable/disable, very useful if you wish a full screen boot
logo.
Cursor can be disabled from kernel command line:
video=pxafb:nocursor
or from sysfs interface:
echo 1 > /sys/module/pxafb/parameters/nocursor
Signed-off-by: Rodolfo Giometti <giometti@linux.it>
[-- Attachment #2: patch-pxafb-nocursor --]
[-- Type: text/plain, Size: 1977 bytes --]
diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index b4947c8..5d33501 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -9,6 +9,8 @@
* which in turn is
* Based on acornfb.c Copyright (C) Russell King.
*
+ * Cursor enable/disable by Rodolfo Giometti <giometti@linux.it>
+ *
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive for
* more details.
@@ -54,6 +56,10 @@
#include "pxafb.h"
+static int nocursor = 0;
+module_param(nocursor, int, 0644);
+MODULE_PARM_DESC(nocursor, "cursor enable/disable");
+
/* Bits which should not be set in machine configuration structures */
#define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM|LCCR0_BM|LCCR0_QDM|LCCR0_DIS|LCCR0_EFM|LCCR0_IUM|LCCR0_SFM|LCCR0_LDM|LCCR0_ENB)
#define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP|LCCR3_VSP|LCCR3_PCD|LCCR3_BPP)
@@ -464,6 +470,17 @@ static int pxafb_mmap(struct fb_info *info,
return -EINVAL;
}
+/* fb_cursor
+ * Used to disable cursor drawing...
+ */
+int pxafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
+{
+ if (nocursor)
+ return 0;
+ else
+ return -EINVAL; /* just to force soft_cursor() call */
+}
+
static struct fb_ops pxafb_ops = {
.owner = THIS_MODULE,
.fb_check_var = pxafb_check_var,
@@ -474,6 +491,7 @@ static struct fb_ops pxafb_ops = {
.fb_imageblit = cfb_imageblit,
.fb_blank = pxafb_blank,
.fb_mmap = pxafb_mmap,
+ .fb_cursor = pxafb_cursor,
};
/*
@@ -1308,6 +1326,9 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
inf->lccr0 = (inf->lccr0 & ~LCCR0_DPD) | LCCR0_4PixMono;
} else if (!strncmp(this_opt, "8pix", 4)) {
inf->lccr0 = (inf->lccr0 & ~LCCR0_DPD) | LCCR0_8PixMono;
+ } else if (!strncmp(this_opt, "nocursor", 8)) {
+ nocursor = 1;
+ dev_info(dev, "cursor disabled");
} else {
dev_err(dev, "unknown option: %s\n", this_opt);
return -EINVAL;
next reply other threads:[~2007-02-13 17:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-02-13 17:38 Rodolfo Giometti [this message]
2007-02-13 17:48 ` [PATCH] pxafb: Add option to enable/disable the cursor Russell King
2007-02-13 18:04 ` Rodolfo Giometti
2007-02-13 18:22 ` James Simmons
2007-02-15 13:23 ` Rodolfo Giometti
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=20070213173805.GK8882@enneenne.com \
--to=giometti@enneenne.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.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