From: Laurent Vivier <laurent@vivier.eu>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
Ben Skeggs <bskeggs@redhat.com>, Dave Airlie <airlied@redhat.com>
Subject: Re: [PATCH] nouveau: fix OpenFirmware support
Date: Sat, 10 Oct 2015 21:29:19 +0200 [thread overview]
Message-ID: <5619670F.9080800@vivier.eu> (raw)
In-Reply-To: <CAKb7UvgSnC=6FBGo=mN-5QDZFc8Nu1kUZe2=8ki0Q1HxQPtfhA@mail.gmail.com>
Le 10/10/2015 20:41, Ilia Mirkin a écrit :
> Hi Laurent,
>
> On Sat, Oct 10, 2015 at 9:27 AM, Laurent Vivier <laurent@vivier.eu> 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.
>>
>> This size is stored in bios->size by of_init() as there is no way
>> to retrieve it otherwise. And as we know the size, copy all data
>> to bios->data.
>>
>> Tested on PowerMac G5 with 64bit kernel and a NV43 card (GeForce 6600 LE).
>
> Can you give this patch a shot instead?
>
> http://cgit.freedesktop.org/~darktama/nouveau/commit/?id=794a63cc75eada9ad6b2a0275c1c8c4d3522864f
Well, I think mine is also a good solution and it is much more simple.
;)
... because it is useless to add a size() function if we can directly
copy the content/size of the bios in bios->data and bios->size.
We can do that because we have the size of the property, which is not
the case when we discover the BIOS directly from a PCI ROM or from ACPI
(this is why we need a shadow, I think).
For pcir part, I think we can just ignore the result and take the size
from bios->size, as in the case of non openfirmware bios->size will be 4
(we have only shadowed the first word to read the id, 0xaa55) and then
the checksum and others ID searches will fail. So I think the checksum
should not be ignored.
I've tried to restore behavior before commit:
7af4dec drm/nouveau/bios: use size/type from pci data structure
and commit:
ad4a362 drm/nouveau/bios: split out shadow methods
Originally, openfirmware content was copied directly into bios->data:
77145f1 drm/nouveau: port remainder of drm code, and rip out compat layer
> This resolved my issues on a PPC G5 + NV34. I think mine ran into a
> few additional problems that you didn't see -- no PCIR header and
> invalid checksum.
I have no PCIR header too.
Could you send me the content of the file "NVDA,BMP" you can find
somewhere under /proc/device-tree/ ?
Could you try my patch on your system, please ?
Laurent
next prev parent reply other threads:[~2015-10-10 19:29 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-10 13:27 [PATCH] nouveau: fix OpenFirmware support Laurent Vivier
2015-10-10 18:41 ` Ilia Mirkin
2015-10-10 19:29 ` Laurent Vivier [this message]
2015-10-10 19:56 ` Ilia Mirkin
2015-10-10 23:45 ` Laurent Vivier
2015-10-10 23:49 ` Ilia Mirkin
2015-10-11 14:37 ` Laurent Vivier
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=5619670F.9080800@vivier.eu \
--to=laurent@vivier.eu \
--cc=airlied@redhat.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imirkin@alum.mit.edu \
--cc=linux-kernel@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