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

Commit 595d373f authored by Ben Skeggs's avatar Ben Skeggs
Browse files

drm/nouveau/bios: memset dcb struct to zero before parsing



Fixes type/mask calculation being based on uninitialised data for VGA
outputs.

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 6b07c6cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -124,6 +124,7 @@ dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len,
	       struct dcb_output *outp)
{
	u16 dcb = dcb_outp(bios, idx, ver, len);
	memset(outp, 0x00, sizeof(*outp));
	if (dcb) {
		if (*ver >= 0x20) {
			u32 conn = nv_ro32(bios, dcb + 0x00);