linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Buell <alex.buell@munted.org.uk>
To: David Miller <davem@davemloft.net>
Cc: romieu@fr.zoreil.com, linux-fbdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: Using s3virge card in Sun Blade 2000
Date: Thu, 06 Jan 2011 23:25:19 +0000	[thread overview]
Message-ID: <1294356319.24378.22.camel@lithium> (raw)
In-Reply-To: <20110106.142906.226774601.davem@davemloft.net>

On Thu, 2011-01-06 at 14:29 -0800, David Miller wrote:
> You have to initialize par->state.vgabase in the s3fb driver to the
> VGA area iomem pointer you calculated at boot time.

Thanks for that, I've just got past that, now it's changing modes that
crashes the driver. I can load and unload the driver,  and it
automatically selects 640x480.

How do I track down the offending line of code from the following entry
in the logs:
TPC<s3fb_set_par+0x1a0/0xf78 [s3fb]>

Also, oddly enough, before calling save_vga it clears par->state, which
was why it was crashing. Explicitly setting the par->state.vgabase to
the vga_iobase address solved the problem as below. I also noticed that
having VGA_SAVE_FONTS crashes the driver, so I left it out - a quick
look through the code in vgastate.c indicate it needs rework to make it
work but I've left that for later. 

(in s3fb_open)

 if (par->ref_count = 0) {
                memset(&(par->state), 0, sizeof(struct vgastate));

                /* save_vga/restore_vga needs this to function */
                par->state.vgabase = par->vga_iobase;

                /*par->state.flags = VGA_SAVE_MODE | VGA_SAVE_FONTS | VGA_SAVE_CMAP;*/
                par->state.flags = VGA_SAVE_MODE | VGA_SAVE_CMAP;
                par->state.num_crtc = 0x70;
                par->state.num_seq = 0x20;
                save_vga(&(par->state));

Thanks, seems it's starting to work bit by bit!
-- 
Tactical Nuclear Kittens

  reply	other threads:[~2011-01-06 23:25 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03 16:32 Using s3virge card in Sun Blade 2000 Alex Buell
2011-01-03 18:58 ` David Miller
2011-01-03 19:39   ` Alex Buell
2011-01-03 19:43     ` David Miller
2011-01-03 20:33       ` Alex Buell
2011-01-03 20:39         ` David Miller
2011-01-03 21:36           ` Alex Buell
2011-01-03 22:36             ` David Miller
2011-01-04 15:57               ` Alex Buell
2011-01-04 17:26                 ` David Miller
2011-01-04 20:11                   ` Alex Buell
2011-01-04 20:19                     ` David Miller
2011-01-04 20:38                       ` Alex Buell
2011-01-05 19:07             ` David Miller
2011-01-05 21:13               ` Alex Buell
2011-01-06  0:33                 ` Alex Buell
2011-01-06 20:42                   ` Francois Romieu
2011-01-06 20:50                     ` Alex Buell
2011-01-06 22:24                       ` Alex Buell
2011-01-06 22:29                         ` David Miller
2011-01-06 23:25                           ` Alex Buell [this message]
2011-01-06 23:34                           ` Alex Buell
2011-01-03 20:37     ` Dave Airlie
2011-01-05 20:37   ` Geert Uytterhoeven

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=1294356319.24378.22.camel@lithium \
    --to=alex.buell@munted.org.uk \
    --cc=davem@davemloft.net \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /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).