linux-fbdev.vger.kernel.org archive mirror
 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: Mon, 17 Jan 2011 04:30:09 +0000	[thread overview]
Message-ID: <20110116.203009.28806331.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 23:43:02 +0000

> Jan 12 21:53:27 sodium pci@8,700000: PCI Error, primary error type[Master Abort]
> Jan 12 21:53:27 sodium kernel: /pci@8,700pci@8,pci@8,700000: PCter Aborpci@8,700000: PCI Error, primary error type[Master Abort]
> Jan 12 21:53:27 sodium kernel: /pci@8,700000: bytemask[0080] was_block(0) space(Memory)
> Jan 12 21:53:27 sodium kernel: /pci@8,700000: PCI AFAR [00000000000a00a8]
> Jan 12 21:53:27 sodium kernel: /pci@8,700000: PCI Secondary errors [(Master Abort)]
> Jan 12 21:53:27 sodium kernel: /pci@8,700000: PCI Error, primary error type[Master Abort]

The address we're using seems right, but for some reason the device
is giving a master abort when we try to access the legacy VGA memory.

I did a little bit of research, and there is a bit in the VGA I/O
register set that needs to be set otherwise the VGA card will not
respond to video memory accesses.

Can you test to see if the following patch makes a difference?

diff --git a/drivers/video/s3fb.c b/drivers/video/s3fb.c
index 4b8f215..00152f6 100644
--- a/drivers/video/s3fb.c
+++ b/drivers/video/s3fb.c
@@ -1053,6 +1053,13 @@ static int __devinit s3_pci_probe(struct pci_dev *dev, const struct pci_device_i
 	vga_wcrt(par->state.vgabase, 0x38, cr38);
 	vga_wcrt(par->state.vgabase, 0x39, cr39);
 
+	/* Ensure that the card will respond to legacy VGA memory
+	 * accesses.
+	 */
+	regval = vga_r(par->state.vgabase, VGA_MIS_R);
+	regval |= VGA_MIS_ENB_MEM_ACCESS;
+	vga_w(par->state.vgabase, VGA_MIS_W, regval);
+
 	strcpy(info->fix.id, s3_names [par->chip]);
 	info->fix.mmio_start = 0;
 	info->fix.mmio_len = 0;

  parent reply	other threads:[~2011-01-17  4:30 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
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 [this message]
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=20110116.203009.28806331.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 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).