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

Commit 16456c87 authored by Dave Airlie's avatar Dave Airlie
Browse files

drm: fix typo in edid vendor parsing.



Should be,

    edid_vendor[2] = (edid->mfg_id[1] & 0x1f) +  '@';

Since vendor ID has only two bytes only, I am somewhat surprised why gcc
doesn't complain this.

Reported-by: default avatarGuo, Chaohong <chaohong.guo@intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 3c6fc352
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -162,7 +162,7 @@ static bool edid_vendor(struct edid *edid, char *vendor)
	edid_vendor[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
	edid_vendor[0] = ((edid->mfg_id[0] & 0x7c) >> 2) + '@';
	edid_vendor[1] = (((edid->mfg_id[0] & 0x3) << 3) |
	edid_vendor[1] = (((edid->mfg_id[0] & 0x3) << 3) |
			  ((edid->mfg_id[1] & 0xe0) >> 5)) + '@';
			  ((edid->mfg_id[1] & 0xe0) >> 5)) + '@';
	edid_vendor[2] = (edid->mfg_id[2] & 0x1f) + '@';
	edid_vendor[2] = (edid->mfg_id[1] & 0x1f) + '@';


	return !strncmp(edid_vendor, vendor, 3);
	return !strncmp(edid_vendor, vendor, 3);
}
}