From: Lekensteyn <lekensteyn-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] drm/nouveau/bios: use size provided by _ROM method
Date: Sun, 21 Oct 2012 14:53:03 +0200 [thread overview]
Message-ID: <450304285.kMiQM72imv@al> (raw)
In-Reply-To: <20121021122005.GB22587-OI9uyE9O0yo@public.gmane.org>
On Sunday 21 October 2012 14:20:05 Marcin Slusarz wrote:
> BTW, _ROM method from https://lkml.org/lkml/2012/10/21/11 multiplies length
> by 8, so maybe we can read 32kB in one batch?
>
> Marcin
That holds for that specific model, but it is not standard (in ACPI). Ben
Skeggs has a laptop (Lenovo?) W530 that allows you to read the whole VBIOS in
one call (that means chunk size > 4KiB), but there is another machine where
this does not work (https://bugs.freedesktop.org/show_bug.cgi?id=55948). That
machine allows you to read lengths of 4 KiB only (the buffer size is hard-coded
to 4096, the upper bound of the returned size).
I'd say, stick to 4 KiB for the first read, then try to read the remaining
VBIOS in one shot and finally fallback to reading in chunks of min(4096, bios-
>size - i). That should give a count of least 512 bytes. On my machine the
length is 0x7d which translates to exactly 64 KB (not KiB).
After your patch in https://lkml.org/lkml/2012/10/20/150, "drm/nouveau/bios:
attempt to fetch entire acpi rom image in one shot" could be improved to only
read the unknown VBIOS:
/* disobey the acpi spec - much faster on at least w530 ... */
- ret = nouveau_acpi_get_bios_chunk(bios->data, 0, bios->size);
+ ret = nouveau_acpi_get_bios_chunk(bios->data, 4096, bios->size - 4096);
Peter
prev parent reply other threads:[~2012-10-21 12:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-21 10:53 [PATCH] drm/nouveau/bios: use size provided by _ROM method Lekensteyn
2012-10-21 12:20 ` Marcin Slusarz
[not found] ` <20121021122005.GB22587-OI9uyE9O0yo@public.gmane.org>
2012-10-21 12:53 ` Lekensteyn [this message]
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=450304285.kMiQM72imv@al \
--to=lekensteyn-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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.