From: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Cc: "nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
<dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>,
Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v2 07/10] drm/nouveau/graph: pad firmware code at load time
Date: Tue, 22 Apr 2014 11:08:39 +0900 [thread overview]
Message-ID: <5355CF27.8000401@nvidia.com> (raw)
In-Reply-To: <CACAvsv7J7yUaug=CoUfsPg5PXf=ZmwUD9XvCt4CqAvnamQNN9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 04/22/2014 08:48 AM, Ben Skeggs wrote:
> On Tue, Apr 22, 2014 at 4:03 AM, Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> wrote:
>> On Mon, Apr 21, 2014 at 2:02 AM, Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>>> Pad the microcode to a multiple of 0x40 bytes, otherwise firmware will
>>
>> bytes or u32's? From the code, I'm guessing the latter. (Similar
>> concern about comment in the code.)
>>
>>> fail to run from non-prepadded firmware files.
>>>
>>> Signed-off-by: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> Reviewed-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> ---
>>> drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
>>> index e5b75f189988..013475c62986 100644
>>> --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
>>> +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
>>> @@ -894,6 +894,10 @@ nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base,
>>> nv_wr32(priv, fuc_base + 0x0188, i >> 6);
>>> nv_wr32(priv, fuc_base + 0x0184, code->data[i]);
>>> }
>>> +
>>> + /* code must be padded to 0x40 bytes */
>>> + for (; i & 0x3f; i++)
>>> + nv_wr32(priv, fuc_base + 0x0184, 0);
> It's 256 bytes indeed.
Fixed, thanks!
WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Courbot <acourbot@nvidia.com>
To: Ben Skeggs <skeggsb@gmail.com>, Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Alexandre Courbot <gnurou@gmail.com>,
"nouveau@lists.freedesktop.org" <nouveau@lists.freedesktop.org>,
"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>,
"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH v2 07/10] drm/nouveau/graph: pad firmware code at load time
Date: Tue, 22 Apr 2014 11:08:39 +0900 [thread overview]
Message-ID: <5355CF27.8000401@nvidia.com> (raw)
In-Reply-To: <CACAvsv7J7yUaug=CoUfsPg5PXf=ZmwUD9XvCt4CqAvnamQNN9A@mail.gmail.com>
On 04/22/2014 08:48 AM, Ben Skeggs wrote:
> On Tue, Apr 22, 2014 at 4:03 AM, Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>> On Mon, Apr 21, 2014 at 2:02 AM, Alexandre Courbot <acourbot@nvidia.com> wrote:
>>> Pad the microcode to a multiple of 0x40 bytes, otherwise firmware will
>>
>> bytes or u32's? From the code, I'm guessing the latter. (Similar
>> concern about comment in the code.)
>>
>>> fail to run from non-prepadded firmware files.
>>>
>>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>>> Reviewed-by: Thierry Reding <treding@nvidia.com>
>>> ---
>>> drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
>>> index e5b75f189988..013475c62986 100644
>>> --- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
>>> +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
>>> @@ -894,6 +894,10 @@ nvc0_graph_init_fw(struct nvc0_graph_priv *priv, u32 fuc_base,
>>> nv_wr32(priv, fuc_base + 0x0188, i >> 6);
>>> nv_wr32(priv, fuc_base + 0x0184, code->data[i]);
>>> }
>>> +
>>> + /* code must be padded to 0x40 bytes */
>>> + for (; i & 0x3f; i++)
>>> + nv_wr32(priv, fuc_base + 0x0184, 0);
> It's 256 bytes indeed.
Fixed, thanks!
next prev parent reply other threads:[~2014-04-22 2:08 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 6:02 [PATCH v2 00/10] drm/nouveau: support for GK20A, cont'd Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 05/10] drm/nouveau/fifo: add GK20A support Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
[not found] ` <1398060142-7937-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-21 6:02 ` [PATCH v2 01/10] drm/nouveau/bar: only ioremap BAR3 if it exists Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 02/10] drm/nouveau/bar/nvc0: support chips without BAR3 Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 03/10] drm/nouveau/ibus: add GK20A support Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 04/10] drm/nouveau/fb: " Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
[not found] ` <1398060142-7937-5-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-22 10:40 ` Thierry Reding
2014-04-22 10:40 ` Thierry Reding
2014-04-23 2:07 ` Alexandre Courbot
2014-04-23 2:07 ` Alexandre Courbot
[not found] ` <53572077.6090305-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-23 6:11 ` Alexandre Courbot
2014-04-23 6:11 ` Alexandre Courbot
[not found] ` <CAAVeFuKscuN-=HJOarbzFkG1ARq6-Nfc2pf1ibam9b61Cjbs6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-28 11:44 ` Thierry Reding
2014-04-28 11:44 ` Thierry Reding
2014-05-01 4:49 ` Alexandre Courbot
2014-05-01 4:49 ` Alexandre Courbot
2014-05-02 6:26 ` Terje Bergström
2014-05-02 6:26 ` Terje Bergström
2014-04-21 6:02 ` [PATCH v2 06/10] drm/nouveau/graph: enable when using external firmware Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 07/10] drm/nouveau/graph: pad firmware code at load time Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 18:03 ` Ilia Mirkin
2014-04-21 18:03 ` Ilia Mirkin
[not found] ` <CAKb7UviQ6s8wRqwLVnE_A0NOw=WcVdFXG_wWmnZypwuaW_hnuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-21 23:48 ` Ben Skeggs
2014-04-21 23:48 ` Ben Skeggs
[not found] ` <CACAvsv7J7yUaug=CoUfsPg5PXf=ZmwUD9XvCt4CqAvnamQNN9A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22 2:08 ` Alexandre Courbot [this message]
2014-04-22 2:08 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 08/10] drm/nouveau/graph: add GK20A support Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 09/10] drm/nouveau: support GK20A in nouveau_accel_init() Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
[not found] ` <1398060142-7937-10-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-04-21 18:07 ` [Nouveau] " Ilia Mirkin
2014-04-21 18:07 ` Ilia Mirkin
2014-04-22 1:58 ` Ben Skeggs
2014-04-22 1:58 ` Ben Skeggs
[not found] ` <CAKb7Uvg4kOfsE0gd4zLcwjShc4eVgVKA7zQM2r1aeatOybm8NQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-22 2:31 ` Alexandre Courbot
2014-04-22 2:31 ` [Nouveau] " Alexandre Courbot
2014-04-21 6:02 ` [PATCH v2 10/10] drm/nouveau: support for probing GK20A Alexandre Courbot
2014-04-21 6:02 ` Alexandre Courbot
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=5355CF27.8000401@nvidia.com \
--to=acourbot-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=skeggsb-Re5JQEeQqe8AvxtiuMwx3w@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.