From mboxrd@z Thu Jan 1 00:00:00 1970 From: Laurent Vivier Subject: Re: [PATCH v2] nouveau: fix OpenFirmware support Date: Wed, 14 Oct 2015 17:20:29 +0200 Message-ID: <561E72BD.8010208@vivier.eu> References: <1444574882-3565-1-git-send-email-laurent@vivier.eu> <20151014142000.GA16845@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Ilia Mirkin , Olaf Hering Cc: Dave Airlie , Ben Skeggs , "dri-devel@lists.freedesktop.org" , "linux-kernel@vger.kernel.org" List-Id: dri-devel@lists.freedesktop.org Le 14/10/2015 16:52, Ilia Mirkin a =C3=A9crit : > On Wed, Oct 14, 2015 at 10:20 AM, Olaf Hering wrote: >> On Sun, Oct 11, Laurent Vivier wrote: >> >>> On PowerMac G5 (and I think on all OpenFirmware platforms), nvbios_= pcirTp() >>> returns NULL. But in fact the OpenFirmware has given us the size >>> we can store in image->size. >> >>> CC: imirkin@alum.mit.edu >>> Signed-off-by: Laurent Vivier >> >> Tested-by: Olaf Hering >> >> Broken since a while already... >> https://lists.ozlabs.org/pipermail/linuxppc-dev/2015-March/126737.ht= ml >=20 > FTR, looks like my version is upstream now: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commi= t/?id=3D25d295882a1adfcdaaad85369289677b87c7c8f0 >=20 > I agree that my of_size thing was a bit of a hack, if you want to red= o > it by removing of_size/of_read from shadowof.c and copying it in at > init time (also a hack, IMHO), I certainly wouldn't object. As before= , > it's Ben's call though. It's nice to have a fix upstream. I'll send a patch to remove the of_size. Rereading your patch and mine, I think we don't need no_pcir, we can do instead: if (!nvbios_rd16(bios, base + 0x18)) { /* no PCIr */ image.base =3D 0; image.type =3D 0; image.size =3D bios->size; image.last =3D 1; } else { if (!shadow_fetch(bios, mthd, offset + 0x1000)) { =2E.. What is you opinion ? Laurent