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

Commit 370eec76 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs
Browse files

drm/nouveau/graph: pad firmware code at load time



Pad the microcode to a multiple of 0x40 words, otherwise firmware will
fail to run from non-prepadded firmware files.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Reviewed-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b7c852a6
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -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 + 0x0188, i >> 6);
		nv_wr32(priv, fuc_base + 0x0184, code->data[i]);
		nv_wr32(priv, fuc_base + 0x0184, code->data[i]);
	}
	}

	/* code must be padded to 0x40 words */
	for (; i & 0x3f; i++)
		nv_wr32(priv, fuc_base + 0x0184, 0);
}
}


static void
static void