]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.14/media-adv7604-when-the-edid-is-cleared-unconfigure-c.patch
autosel fixes for 4.14
[thirdparty/kernel/stable-queue.git] / queue-4.14 / media-adv7604-when-the-edid-is-cleared-unconfigure-c.patch
1 From e6c7b67741c608df1d08dbb8fd8c331a4f9f8f3a Mon Sep 17 00:00:00 2001
2 From: Hans Verkuil <hans.verkuil@cisco.com>
3 Date: Thu, 4 Oct 2018 03:57:06 -0400
4 Subject: media: adv7604: when the EDID is cleared, unconfigure CEC as well
5
6 [ Upstream commit e7da89926f6dc6cf855f5ffdf79ef99a1b115ca7 ]
7
8 When there is no EDID the CEC adapter should be unconfigured as
9 well. So call cec_phys_addr_invalidate() when this happens.
10
11 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
12 Cc: <stable@vger.kernel.org> # for v4.18 and up
13 Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
14 Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
15 ---
16 drivers/media/i2c/adv7604.c | 4 +++-
17 1 file changed, 3 insertions(+), 1 deletion(-)
18
19 diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
20 index d2108aad3c658..26c3ec573a565 100644
21 --- a/drivers/media/i2c/adv7604.c
22 +++ b/drivers/media/i2c/adv7604.c
23 @@ -2295,8 +2295,10 @@ static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid)
24 state->aspect_ratio.numerator = 16;
25 state->aspect_ratio.denominator = 9;
26
27 - if (!state->edid.present)
28 + if (!state->edid.present) {
29 state->edid.blocks = 0;
30 + cec_phys_addr_invalidate(state->cec_adap);
31 + }
32
33 v4l2_dbg(2, debug, sd, "%s: clear EDID pad %d, edid.present = 0x%x\n",
34 __func__, edid->pad, state->edid.present);
35 --
36 2.20.1
37