Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 507ceb15 authored by Martin Peres's avatar Martin Peres Committed by Ben Skeggs
Browse files

drm/nouveau/core: fix the assumption that NVDEV_XXXX is always under 32



It fixes a bug that would have been introduced when adding more
sudevs/engines.

Signed-off-by: default avatarMartin Peres <martin.peres@labri.fr>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent d1be7e9b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@ nouveau_fifo_channel_create_(struct nouveau_object *parent,
			     struct nouveau_object *engine,
			     struct nouveau_object *engine,
			     struct nouveau_oclass *oclass,
			     struct nouveau_oclass *oclass,
			     int bar, u32 addr, u32 size, u32 pushbuf,
			     int bar, u32 addr, u32 size, u32 pushbuf,
			     u32 engmask, int len, void **ptr)
			     u64 engmask, int len, void **ptr)
{
{
	struct nouveau_device *device = nv_device(engine);
	struct nouveau_device *device = nv_device(engine);
	struct nouveau_fifo *priv = (void *)engine;
	struct nouveau_fifo *priv = (void *)engine;
+3 −3
Original line number Original line Diff line number Diff line
@@ -126,9 +126,9 @@ nv04_fifo_chan_ctor(struct nouveau_object *parent,


	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
					  0x10000, args->pushbuf,
					  0x10000, args->pushbuf,
					  (1 << NVDEV_ENGINE_DMAOBJ) |
					  (1ULL << NVDEV_ENGINE_DMAOBJ) |
					  (1 << NVDEV_ENGINE_SW) |
					  (1ULL << NVDEV_ENGINE_SW) |
					  (1 << NVDEV_ENGINE_GR), &chan);
					  (1ULL << NVDEV_ENGINE_GR), &chan);
	*pobject = nv_object(chan);
	*pobject = nv_object(chan);
	if (ret)
	if (ret)
		return ret;
		return ret;
+3 −3
Original line number Original line Diff line number Diff line
@@ -69,9 +69,9 @@ nv10_fifo_chan_ctor(struct nouveau_object *parent,


	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
					  0x10000, args->pushbuf,
					  0x10000, args->pushbuf,
					  (1 << NVDEV_ENGINE_DMAOBJ) |
					  (1ULL << NVDEV_ENGINE_DMAOBJ) |
					  (1 << NVDEV_ENGINE_SW) |
					  (1ULL << NVDEV_ENGINE_SW) |
					  (1 << NVDEV_ENGINE_GR), &chan);
					  (1ULL << NVDEV_ENGINE_GR), &chan);
	*pobject = nv_object(chan);
	*pobject = nv_object(chan);
	if (ret)
	if (ret)
		return ret;
		return ret;
+4 −4
Original line number Original line Diff line number Diff line
@@ -74,10 +74,10 @@ nv17_fifo_chan_ctor(struct nouveau_object *parent,


	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0x800000,
					  0x10000, args->pushbuf,
					  0x10000, args->pushbuf,
					  (1 << NVDEV_ENGINE_DMAOBJ) |
					  (1ULL << NVDEV_ENGINE_DMAOBJ) |
					  (1 << NVDEV_ENGINE_SW) |
					  (1ULL << NVDEV_ENGINE_SW) |
					  (1 << NVDEV_ENGINE_GR) |
					  (1ULL << NVDEV_ENGINE_GR) |
					  (1 << NVDEV_ENGINE_MPEG), /* NV31- */
					  (1ULL << NVDEV_ENGINE_MPEG), /* NV31- */
					  &chan);
					  &chan);
	*pobject = nv_object(chan);
	*pobject = nv_object(chan);
	if (ret)
	if (ret)
+4 −4
Original line number Original line Diff line number Diff line
@@ -192,10 +192,10 @@ nv40_fifo_chan_ctor(struct nouveau_object *parent,


	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0xc00000,
	ret = nouveau_fifo_channel_create(parent, engine, oclass, 0, 0xc00000,
					  0x1000, args->pushbuf,
					  0x1000, args->pushbuf,
					  (1 << NVDEV_ENGINE_DMAOBJ) |
					  (1ULL << NVDEV_ENGINE_DMAOBJ) |
					  (1 << NVDEV_ENGINE_SW) |
					  (1ULL << NVDEV_ENGINE_SW) |
					  (1 << NVDEV_ENGINE_GR) |
					  (1ULL << NVDEV_ENGINE_GR) |
					  (1 << NVDEV_ENGINE_MPEG), &chan);
					  (1ULL << NVDEV_ENGINE_MPEG), &chan);
	*pobject = nv_object(chan);
	*pobject = nv_object(chan);
	if (ret)
	if (ret)
		return ret;
		return ret;
Loading