From: Steven Walter <srwalter@yahoo.com>
To: linux-kernel@vger.kernel.org
Cc: Paul Mundt <lethal@ChaoticDreams.org>
Subject: [PATCH] Add module parameter support to tdfxfb
Date: Sun, 29 Jul 2001 21:40:16 -0500 [thread overview]
Message-ID: <20010729214016.B2149@hapablap.dyn.dhs.org> (raw)
The attached patch adds support for module parameters to the tdfxfb
driver. As it stands, these options can only be changed if the driver
is compiled into the kernel.
This patch is incremental to Paul Mundt's patch. Its very
straightforward to apply to 2.4.7, but I'll gladly make such a patch if
there is demand. All comments are welcome.
--
-Steven
In a time of universal deceit, telling the truth is a revolutionary act.
-- George Orwell
--- clean-2.4.7/drivers/video/tdfxfb.c Sun Jul 29 21:14:45 2001
+++ linux/drivers/video/tdfxfb.c Sun Jul 29 21:19:33 2001
@@ -500,6 +500,17 @@
MODULE_DEVICE_TABLE(pci, tdfxfb_id_table);
+MODULE_PARM(inverse, "i");
+MODULE_PARM(noaccel, "i");
+MODULE_PARM(nopan, "i");
+MODULE_PARM(nowrap, "i");
+MODULE_PARM(nohwcursor, "i");
+#ifdef CONFIG_MTRR
+MODULE_PARM(nomtrr, "i");
+#endif
+MODULE_PARM(font, "s");
+MODULE_PARM(mode_option, "s");
+
struct mode {
char* name;
struct fb_var_screeninfo var;
@@ -529,7 +540,8 @@
#endif
static int nohwcursor = 0;
static char __initdata fontname[40] = { 0 };
-static const char *mode_option __initdata = NULL;
+static char *font __initdata = NULL;
+static char *mode_option __initdata = NULL;
/* -------------------------------------------------------------------------
* Hardware-specific funcions
@@ -2059,6 +2071,13 @@
int __init tdfxfb_init(void)
{
+ if (inverse)
+ fb_invert_cmaps();
+ if (noaccel)
+ nopan = nowrap = nohwcursor = 1;
+ if (font)
+ strncpy(fontname, font, 40);
+
return pci_module_init(&tdfxfb_driver);
}
@@ -2089,9 +2108,8 @@
this_opt = strtok(NULL, ",")) {
if(!strcmp(this_opt, "inverse")) {
inverse = 1;
- fb_invert_cmaps();
} else if(!strcmp(this_opt, "noaccel")) {
- noaccel = nopan = nowrap = nohwcursor = 1;
+ noaccel = 1;
} else if(!strcmp(this_opt, "nopan")) {
nopan = 1;
} else if(!strcmp(this_opt, "nowrap")) {
reply other threads:[~2001-07-30 2:40 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20010729214016.B2149@hapablap.dyn.dhs.org \
--to=srwalter@yahoo.com \
--cc=lethal@ChaoticDreams.org \
--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