summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2019-02-05 11:23:36 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-02-18 15:27:35 -0500
commit0806bc0afbb4157b6e1c8d91cbe8e536b292996c (patch)
tree4a937dd803c891db74db8b55c2d625ac21c7ce50 /drivers/media
parent35deee14183457754f77e34dc92c588d93d40052 (diff)
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 <tharvey@gateworks.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> [hverkuil-cisco@xs4all.nl: added missing commit log] Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/i2c/tda1997x.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
index e8613e364403..a62ede096636 100644
--- a/drivers/media/i2c/tda1997x.c
+++ b/drivers/media/i2c/tda1997x.c
@@ -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;