[Mesa-dev] [PATCH 1/3] nvc0: fix compute state initialization on GK110+

Ilia Mirkin imirkin at alum.mit.edu
Sat Feb 13 23:41:55 UTC 2016


On Sat, Feb 13, 2016 at 6:31 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> For some unknown reasons, the command 0x518, which is FIRMWARE[0x6]

Please make a note that the blob calls it, along with the args passed
in (usually via scratch regs iirc). It's probably one of the context
register modifiers. Our firmware doesn't implement any of those
commands.

> from rnndb, totally hangs the GPU, and a reboot is needed. With
> that removed, I can succesfully launch compute shaders and so the
> compute support seems to work as expected.
>
> Tested on GK208 and GM107.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
>  src/gallium/drivers/nouveau/nvc0/nve4_compute.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> index aaf4282..31b571d 100644
> --- a/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> +++ b/src/gallium/drivers/nouveau/nvc0/nve4_compute.c
> @@ -39,7 +39,7 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
>  {
>     struct nouveau_device *dev = screen->base.device;
>     struct nouveau_object *chan = screen->base.channel;
> -   unsigned i;
> +   int i;
>     int ret;
>     uint32_t obj_class;
>
> @@ -115,13 +115,10 @@ nve4_screen_compute_setup(struct nvc0_screen *screen,
>     PUSH_DATA (push, NVC0_TSC_MAX_ENTRIES - 1);
>
>     if (obj_class >= NVF0_COMPUTE_CLASS) {
> -      BEGIN_NVC0(push, SUBC_COMPUTE(0x0248), 1);
> -      PUSH_DATA (push, 0x100);
> -      BEGIN_NIC0(push, SUBC_COMPUTE(0x0248), 63);
> -      for (i = 63; i >= 1; --i)
> +      BEGIN_NIC0(push, SUBC_COMPUTE(0x0248), 64);

You verified that this is also needed on GM107, yes?

With the comment re firmware added in, this patch is

Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

> +      for (i = 63; i >= 0; i--)
>           PUSH_DATA(push, 0x38000 | i);
>        IMMED_NVC0(push, SUBC_COMPUTE(NV50_GRAPH_SERIALIZE), 0);
> -      IMMED_NVC0(push, SUBC_COMPUTE(0x518), 0);
>     }
>
>     BEGIN_NVC0(push, NVE4_COMPUTE(TEX_CB_INDEX), 1);
> --
> 2.6.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list