[Mesa-stable] [Mesa-dev] [PATCH] nvc0: take extra pushbuf space into account for pushbuf_space calls

Samuel Pitoiset samuel.pitoiset at gmail.com
Sat Mar 4 16:49:10 UTC 2017


Pushed.

On 03/04/2017 05:23 PM, Ilia Mirkin wrote:
> I'm without keys for a little while, feel free to push this and the
> tbo alignment patch for me.
>
> On Sat, Mar 4, 2017 at 9:12 AM, Samuel Pitoiset
> <samuel.pitoiset at gmail.com> wrote:
>> Looks like still fragile, but either way:
>>
>> Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
>>
>>
>> On 03/03/2017 02:18 AM, Ilia Mirkin wrote:
>>>
>>> See detailed explanation of why this is needed in commit eb60a89bc3a.
>>> This spot was missed/overlooked. Basically as a result of the fact
>>> that BEGIN_* ends up calling PUSH_SPACE, which in turn adds an extra 8
>>> to the requested amount, we have to be mindful of that when doing bare
>>> nouveau_pushbuf_space calls.
>>>
>>> Reportedly this fixes some crashes when replaying a hitman trace taken
>>> on radeonsi.
>>>
>>> Fixes: eb60a89bc3a ("nouveau: take extra push space into account for
>>> pushbuf_space calls")
>>> Cc: "13.0 17.0" <mesa-stable at lists.freedesktop.org>
>>> Reported-by: Karol Herbst <nouveau at karolherbst.de>
>>> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
>>> ---
>>>  src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 4 ++--
>>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
>>> b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
>>> index 15b4750..798761d 100644
>>> --- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
>>> +++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
>>> @@ -515,7 +515,7 @@ nve4_compute_upload_input(struct nvc0_context *nvc0,
>>>        struct nv04_resource *res = nv04_resource(info->indirect);
>>>        uint32_t offset = res->offset + info->indirect_offset;
>>>
>>> -      nouveau_pushbuf_space(push, 16, 0, 1);
>>> +      nouveau_pushbuf_space(push, 32, 0, 1);
>>>        PUSH_REFN(push, res->bo, NOUVEAU_BO_RD | res->domain);
>>>
>>>        BEGIN_1IC0(push, NVE4_CP(UPLOAD_EXEC), 1 + 8);
>>> @@ -655,7 +655,7 @@ nve4_launch_grid(struct pipe_context *pipe, const
>>> struct pipe_grid_info *info)
>>>        PUSH_DATA (push, 8);
>>>        PUSH_DATA (push, 1);
>>>
>>> -      nouveau_pushbuf_space(push, 16, 0, 1);
>>> +      nouveau_pushbuf_space(push, 32, 0, 1);
>>>        PUSH_REFN(push, res->bo, NOUVEAU_BO_RD | res->domain);
>>>
>>>        BEGIN_1IC0(push, NVE4_CP(UPLOAD_EXEC), 1 + (8 / 4));
>>>
>>


More information about the mesa-stable mailing list