media: tda1997x: fix get_edid

set_edid never wrote the new EDID to state->edid.edid, it was only
written to the hardware. Since get_edid returned state->edid.edid,
it was never returning the right EDID.

Signed-off-by: Tim Harvey <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
[[email protected]: added missing commit log]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Tim Harvey authored and Mauro Carvalho Chehab committed 2019-02-18 15:27:35 -05:00
1 parent 35deee1418
commit 0806bc0afb
1 file changed
+4
+4
View File
@@ -1884,6 +1884,10 @@ static int tda1997x_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
for (i = 0; i < 128; i++)
io_write(sd, REG_EDID_IN_BYTE128 + i, edid->edid[i+128]);
/* store state */
memcpy(state->edid.edid, edid->edid, 256);
state->edid.blocks = edid->blocks;
tda1997x_enable_edid(sd);
return 0;