From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: nouveau@lists.freedesktop.org,
Maarten Lankhorst <maarten.lankhorst@ubuntu.com>,
Ben Skeggs <bskeggs@redhat.com>,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
Date: Wed, 05 Jun 2013 09:05:16 +0200 [thread overview]
Message-ID: <51AEE32C.9090004@canonical.com> (raw)
In-Reply-To: <CAKb7Uvj4vR4Xw_Fy-3MjyF_MW4iWqzP6iorgLKCKT2ABZkykzw@mail.gmail.com>
Hey,
Op 04-06-13 20:38, Ilia Mirkin schreef:
> On Mon, Jun 3, 2013 at 5:02 AM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>> These chipsets include the VP2 engine which is composed of a bitstream
>> processor (BSP) that decodes H.264 and a video processor (VP) which can
>> do iDCT/mo-comp/etc for MPEG1/2, H.264, and VC-1. Both of these are
>> driven by separate xtensa chips embedded in the hardware. This patch
>> provides the mechanism to load the kernel for the xtensa chips and
>> provide the necessary interactions to do the rest of the work.
>>
>> Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
>> ---
>>
>> This patch applies on top of nouveau/master (16a41bcc8).
>>
>> This seems to work for me. There was one boot where my userspace
>> component didn't work right, but it could just as well be a bug
>> there. Subsequent attempts seem to work fine. Note that I'm not
>> particularly familiar with any of this stuff, so if something looks
>> odd, I probably didn't know any better. I did try to faithfully
>> reproduce whatever the blob did. A few questions/thoughts:
>>
>> 1. There's a LOT of similarity between BSP and VP setup/etc. Is it
>> worth it to create a core/xtensa.c or some such, similar to
>> falcon.c? Since it's only in two places, not that much code, and
>> there _are_ differences, I decided to keep them separate.
>>
>> 2. Firmware naming. Maarten suggested to use the falcon naming style,
>> which is nv$chipset_fuc$offset. However here, all the chips share
>> the same firmware. Also the offset would be 103 vs 00f, and is a
>> little arbitrary. (And fuc doesn't apply here... xt? xtensa?) I've
>> left it the way I had it: nv84_bsp and nv84_vp.
>>
>> 3. Firmware load time. I chose to load the fw into memory in the ctor,
>> and then copy it in in init, due to some potentially bogus
>> suspend/resume concerns. Also e.g. mplayer likes to create/destroy
>> decoders at startup a few times. The downside is that ~200KB of
>> memory is gone. Let me know if I should change it to do the
>> request_firmware in init.
>>
>> There's obviously a userspace piece to this, which I'm still working
>> on. But right now I have it working within certain parameters
>> (e.g. 1280x544 videos), and I'm relatively confident it can be
>> completed without further kernel-side changes.
>>
>> There's also a hypothetical concern of "what if we create an open
>> firmware with a different user API". Ideally there'd be some way to
>> expose what kind of firmware is loaded, but I think that can be left
>> for "later".
> I also happened to notice that NV98, NVA1+ refer to these nv84 engines
> (in drivers/gpu/drm/nouveau/core/engine/device/nv50.c). I assume that
> means I should create a new nv98.c version of BSP/VP that resembles
> the old versions of nv84.c, and point device/nv50.c at those for nv98
> and nva1+?
nv98+ should really have an implementation more like nvc0, and the copy engine
is a good example on what conversion is needed to do it. :-)
If you fix that up, I'll stop being lazy and fix VP4 for nva3/a5/a8 in mesa. ;)
~Maarten
next prev parent reply other threads:[~2013-06-05 7:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 9:02 [PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0 Ilia Mirkin
2013-06-04 18:38 ` Ilia Mirkin
2013-06-05 7:05 ` Maarten Lankhorst [this message]
2013-06-05 7:16 ` Ilia Mirkin
2013-06-11 5:49 ` Ben Skeggs
2013-06-23 8:08 ` [PATCH v2] " Ilia Mirkin
[not found] ` <1371974938-21234-1-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
2013-06-27 6:29 ` [PATCH] " Ilia Mirkin
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=51AEE32C.9090004@canonical.com \
--to=maarten.lankhorst@canonical.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=imirkin@alum.mit.edu \
--cc=maarten.lankhorst@ubuntu.com \
--cc=nouveau@lists.freedesktop.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.