linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Fbdev development list
	<linux-fbdev-devel@lists.sourceforge.net>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] [RIVAFB]: Do not tap VGA ports if not X86
Date: Thu, 29 Jul 2004 10:04:26 +0800	[thread overview]
Message-ID: <200407291004.26089.adaplas@hotpop.com> (raw)

Do not tap VGA ports if arch is not X86.

Tony

Signed-off-by: Antonino Daplas <adaplas@pol.net>

 fbdev.c  |    5 ++++-
 rivafb.h |    2 ++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff -uprN linux-2.6.8-rc2-mm1-orig/drivers/video/riva/fbdev.c linux-2.6.8-rc2-mm1/drivers/video/riva/fbdev.c
--- linux-2.6.8-rc2-mm1-orig/drivers/video/riva/fbdev.c	2004-07-28 20:07:59.018089680 +0000
+++ linux-2.6.8-rc2-mm1/drivers/video/riva/fbdev.c	2004-07-28 20:08:30.286336184 +0000
@@ -1090,13 +1090,14 @@ static int rivafb_open(struct fb_info *i
 
 	NVTRACE_ENTER();
 	if (!cnt) {
+#ifdef CONFIG_X86
 		memset(&par->state, 0, sizeof(struct vgastate));
 		par->state.flags = VGA_SAVE_MODE  | VGA_SAVE_FONTS;
 		/* save the DAC for Riva128 */
 		if (par->riva.Architecture == NV_ARCH_03)
 			par->state.flags |= VGA_SAVE_CMAP;
 		save_vga(&par->state);
-
+#endif
 		RivaGetConfig(&par->riva, par->Chipset);
 		/* vgaHWunlock() + riva unlock (0x7F) */
 		CRTCout(par, 0x11, 0xFF);
@@ -1121,7 +1122,9 @@ static int rivafb_release(struct fb_info
 		par->riva.LockUnlock(&par->riva, 0);
 		par->riva.LoadStateExt(&par->riva, &par->initial_state.ext);
 		riva_load_state(par, &par->initial_state);
+#ifdef CONFIG_X86
 		restore_vga(&par->state);
+#endif
 		par->riva.LockUnlock(&par->riva, 1);
 	}
 	atomic_dec(&par->ref_count);
diff -uprN linux-2.6.8-rc2-mm1-orig/drivers/video/riva/rivafb.h linux-2.6.8-rc2-mm1/drivers/video/riva/rivafb.h
--- linux-2.6.8-rc2-mm1-orig/drivers/video/riva/rivafb.h	2004-07-28 20:08:03.560399144 +0000
+++ linux-2.6.8-rc2-mm1/drivers/video/riva/rivafb.h	2004-07-28 20:08:34.671669512 +0000
@@ -50,7 +50,9 @@ struct riva_par {
 
 	struct riva_regs initial_state;	/* initial startup video mode */
 	struct riva_regs current_state;
+#ifdef CONFIG_X86
 	struct vgastate state;
+#endif
 	atomic_t ref_count;
 	u32 cursor_data[32 * 32/4];
 	int cursor_reset;




-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click

                 reply	other threads:[~2004-07-29  2:14 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=200407291004.26089.adaplas@hotpop.com \
    --to=adaplas@hotpop.com \
    --cc=adaplas@pol.net \
    --cc=akpm@osdl.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --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;
as well as URLs for NNTP newsgroup(s).