Commit e11323e2 authored by Ben Skeggs's avatar Ben Skeggs Committed by Luis Henriques

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

commit 595d373f upstream.

Fixes type/mask calculation being based on uninitialised data for VGA
outputs.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Cc: Sven Joachim <svenjoac@gmx.de>
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 66c83af9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment