From patchwork Wed Jan 12 02:14:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Buell X-Patchwork-Id: 78500 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1B61EB7043 for ; Wed, 12 Jan 2011 13:15:17 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755341Ab1ALCPI (ORCPT ); Tue, 11 Jan 2011 21:15:08 -0500 Received: from outbound-queue-1.mail.thdo.gradwell.net ([212.11.70.34]:45600 "EHLO outbound-queue-1.mail.thdo.gradwell.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753780Ab1ALCPH convert rfc822-to-8bit (ORCPT ); Tue, 11 Jan 2011 21:15:07 -0500 Received: from outbound-edge-2.mail.thdo.gradwell.net (bonnie.gradwell.net [212.11.70.2]) by outbound-queue-1.mail.thdo.gradwell.net (Postfix) with ESMTP id 8532721FC3; Wed, 12 Jan 2011 02:15:04 +0000 (GMT) Received: from 188-221-254-207.zone12.bethere.co.uk (HELO lithium.local.net) (188.221.254.207) (smtp-auth username postmaster@pop3.munted.org.uk, mechanism cram-md5) by outbound-edge-2.mail.thdo.gradwell.net (qpsmtpd/0.83) with ESMTPA; Wed, 12 Jan 2011 02:15:04 +0000 Received: from lithium.local.net (localhost.localdomain [127.0.0.1]) by lithium.local.net (Postfix) with ESMTP id 632A0705; Wed, 12 Jan 2011 02:15:00 +0000 (GMT) Received: by lithium.local.net (Postfix, from userid 1000) id 24D16706; Wed, 12 Jan 2011 02:15:00 +0000 (GMT) Subject: Re: [PATCH 0/22] Make SVGA oriented FBs work on multi-domain PCI From: Alex Buell Reply-To: alex.buell@munted.org.uk To: David Miller Cc: linux-fbdev@vger.kernel.org, sparclinux@vger.kernel.org In-Reply-To: <1294795825.13868.6.camel@lithium> References: <20110111.154846.233419170.davem@davemloft.net> <1294791650.13868.2.camel@lithium> <20110111.162253.121250783.davem@davemloft.net> <1294795825.13868.6.camel@lithium> Organization: One very high maintenance cat for company Date: Wed, 12 Jan 2011 02:14:59 +0000 Message-ID: <1294798499.13868.9.camel@lithium> Mime-Version: 1.0 X-Mailer: Evolution 2.30.2 X-Virus-Scanned: ClamAV using ClamSMTP X-Gradwell-MongoId: 4d2d0ea8.91b0-1f6a-2 X-Gradwell-Auth-Method: mailbox X-Gradwell-Auth-Credentials: postmaster@pop3.munted.org.uk Sender: sparclinux-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org On Wed, 2011-01-12 at 01:30 +0000, Alex Buell wrote: > On Tue, 2011-01-11 at 16:22 -0800, David Miller wrote: > > From: Alex Buell > > Date: Wed, 12 Jan 2011 00:20:50 +0000 > > > > > On Tue, 2011-01-11 at 15:48 -0800, David Miller wrote: > > > > > >> This patch set makes sure that FB drivers for PCI devices utilizing > > >> the svgalib interfaces work on multi-domain PCI architectures. > > >> > > >> Basically this amounts to making sure that the vgastate->vgabase > > >> __iomem pointer makes it way into every interfaces and gets used > > >> by all of the I/O access calls. > > > > > > jeez, that was fast work! I'd already done the changes in s3fb.c but > > > didn't get as far as you did with this. > > > > > > I'm now testing your patches right now. > > > > Thanks a lot in advance for testing Alex. > > With your patches, this happens: > > Jan 12 01:24:20 sodium kernel: fb1: S3 Virge/GX on 0000:00:03.0, 6 MB RAM, 14 MHz MCLK > Jan 12 01:24:24 sodium kernel: eth0: Link down, cable problem? > Jan 12 01:24:36 sodium kernel: eth0: Auto-Negotiation unsuccessful, trying force link mode > Jan 12 01:24:45 sodium kernel: eth0: Link down, cable problem? > Jan 12 01:24:47 sodium kernel: ERROR(1): Cheetah error trap taken afsr[0010100000000000] afar[00000000000a0000] TL1(0) > Jan 12 01:24:47 sodium kernel: ERROR(1): TPC[1057490c] TNPC[10574910] O7[80] TSTATE[9911001600] > Jan 12 01:24:47 sodium kernel: ERROR(1): TPC > Jan 12 01:24:47 sodium kernel: ERROR(1): M_SYND(0), E_SYND(0), Privileged > Jan 12 01:24:47 sodium kernel: ERROR(1): Highest priority error (0000100000000000) "Unmapped error from system bus" > Jan 12 01:24:47 sodium kernel: ERROR(1): D-cache idx[0] tag[0000000000000000] utag[0000000000000000] stag[0000000000000000] > Jan 12 01:24:47 sodium kernel: ERROR(1): D-cache data0[0000000000000000] data1[0000000000000000] data2[0000000000000000] data3[0000000000000000] > Jan 12 01:24:47 sodium kernel: ERROR(1): I-cache idx[0] tag[0000000000000000] utag[0000000000000000] stag[0000000000000000] u[0000000000000000] l[0000000000000000] > Jan 12 01:24:47 sodium kernel: ERROR(1): I-cache INSN0[0000000000000000] INSN1[0000000000000000] INSN2[0000000000000000] INSN3[0000000000000000] > Jan 12 01:24:47 sodium kernel: ERROR(1): I-cache INSN4[0000000000000000] INSN5[0000000000000000] INSN6[0000000000000000] INSN7[0000000000000000] > Jan 12 01:24:47 sodium kernel: ERROR(1): E-cache idx[a0000] tag[0000000001000049] > Jan 12 01:24:47 sodium kernel: ERROR(1): E-cache data0[82006c3080a08001] data1[1268001b03001c87] data2[25002050f05c24d0] data3[230021f8e65861e0] > Jan 12 01:24:47 sodium kernel: Kernel panic - not syncing: Irrecoverable deferred error trap. > Jan 12 01:24:47 sodium kernel: > Jan 12 01:24:47 sodium kernel: sym0: SCSI BUS reset detected. > Jan 12 01:24:47 sodium kernel: sym0: SCSI BUS has been reset. > Jan 12 01:24:47 sodium kernel: Call Trace: > Jan 12 01:24:47 sodium kernel: [00000000004292d0] cheetah_deferred_handler+0x494/0x4cc > Jan 12 01:24:47 sodium kernel: [0000000000405e70] c_deferred+0x18/0x24 > Jan 12 01:24:47 sodium kernel: [000000001057490c] restore_vga+0x8c0/0x1068 [vgastate] > Jan 12 01:24:47 sodium kernel: [00000000105b0840] s3fb_release+0x40/0x6c [s3fb] > Jan 12 01:24:47 sodium kernel: [00000000005ca0fc] fb_release+0x24/0x4c > Jan 12 01:24:47 sodium kernel: [00000000004bb8a0] fput+0x118/0x1e0 > Jan 12 01:24:47 sodium kernel: [00000000004b9100] filp_close+0x64/0x78 > Jan 12 01:24:47 sodium kernel: [00000000004b91a0] SyS_close+0x8c/0xe4 > Jan 12 01:24:47 sodium kernel: [0000000000406154] linux_sparc_syscall32+0x34/0x40 > > 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: save_vga(&(par->state)); # fbset -i -fb /dev/fb1 mode "640x480-60" # D: 25.176 MHz, H: 31.469 kHz, V: 59.942 Hz geometry 640 480 640 480 8 timings 39721 40 24 32 11 96 2 rgba 8/0,8/0,8/0,0/0 endmode Frame buffer device information: Name : S3 Virge/GX Address : 0x14000000 Size : 6291456 Type : PACKED PIXELS Visual : PSEUDOCOLOR XPanStep : 0 YPanStep : 0 YWrapStep : 0 LineLength : 0 Accelerator : No To get the driver to use /dev/fb1, I had to comment out some code as well: /* if (! svga_primary_device(dev)) { dev_info(&(dev->dev), "ignoring secondary device\n"); return -ENODEV; } */ --- 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;