All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 0/22] Make SVGA oriented FBs work on multi-domain PCI
Date: Wed, 12 Jan 2011 02:29:45 +0000	[thread overview]
Message-ID: <20110111.182945.200098560.davem@davemloft.net> (raw)
In-Reply-To: <20110111.154846.233419170.davem@davemloft.net>

From: Alex Buell <alex.buell@munted.org.uk>
Date: Wed, 12 Jan 2011 02:14:59 +0000

> I just found the problem. Here's a patch that makes the s3fb  driver
> work. Haven't seen any output on the device yet that's to come later.
> Here's a quick patch:
> 
> --- s3fb.c.orig 2011-01-12 02:09:47.339553002 +0000
> +++ s3fb.c      2011-01-12 02:10:01.411553002 +0000
> @@ -383,7 +383,7 @@
>  
>                 memset(&(par->state), 0, sizeof(struct vgastate));
>                 par->state.vgabase = vgabase;
> -               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));

Hmmm, while this change is correct, restore_vga() should skip VGA_SAVE_FONTS
if state->membase is zero, which it ought ot be here.  If state->membase
is zero, then ioremap() will return NULL.  If ioremap() returns NULL then
restore_vga() should cleanup and return 1.

Oh... I see what is happening.  save_vga() sets this value using it's
own heuristics, when VGA_SAVE_FONTS is set, but in a way that won't
work in multi-domain PCI situations.

So we need to set this up in the drivers just like we do for the
'vgabase' member.

I'll work on some patches to fix this.

Thanks.

  parent reply	other threads:[~2011-01-12  2:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-11 23:48 [PATCH 0/22] Make SVGA oriented FBs work on multi-domain PCI David Miller
2011-01-12  0:20 ` Alex Buell
2011-01-12  0:22 ` David Miller
2011-01-12  1:30 ` Alex Buell
2011-01-12  2:14 ` Alex Buell
2011-01-12  2:29 ` David Miller [this message]
2011-01-12  4:27 ` David Miller
2011-01-12  4:51 ` David Miller
2011-01-12  7:17 ` Ondrej Zary
2011-01-12 23:43 ` Alex Buell
2011-01-17  4:30 ` David Miller
2011-01-22  4:11 ` David Miller
2011-01-22 10:55 ` Alex Buell
2011-02-16 23:01 ` Ondrej Zary
2011-02-16 23:21 ` Alex Buell
2011-02-16 23:24 ` David Miller
2011-02-16 23:37 ` Alex Buell
2011-02-17  8:20 ` Ondrej Zary

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=20110111.182945.200098560.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=linux-fbdev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.