Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3342429yba; Mon, 6 May 2019 22:52:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqySicoPS2xHboG1ifl9NNx6C/N3hOWZWq6oh17B2vPhxIgZXOQiFoYC60WmqzkZ3bZ88mRJ X-Received: by 2002:a62:d244:: with SMTP id c65mr38787987pfg.173.1557208343375; Mon, 06 May 2019 22:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557208343; cv=none; d=google.com; s=arc-20160816; b=CpZ9Hu5gkoF77+SYXdYs6Mi1uvoxccSPCq40nMEOmrO9uYh72A8Or2owdg12+RP2uK GO0E09M3RzfGrDqNUFPnCzMBp5BPWSOkJ8kmq3HiUE9coviYu6lL4D6c1YM1VdfDcN6c BZNsTuKktyUjpMQwT2goODofEdXwS8Mw8WdsGoV6fgkr1bz79YgVF+A+kWINSQ/xbgSD o2lZOxiqHhyOOd1iy7yn4IVFFOkURfNctgSBapPeh9ByJBRDw0gDFFgPkvgSC98jOiVZ 0slPmI26Ub/Z5pvmmyyg4GtlpKopAWkIH02/v/uZKmVTsJof/8KUm9McLQ3BO0wd2mvU WmWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=3kklye0WkalB8Ho97DycOi3Quni9FCgkEvq9CvzSKVg=; b=CYTpLwREXIymkj+HyiaxZlCIvMgrfLrE6HouJnGE1eBehzyb3TqZe+viKOlvpDG14K nfu/8Q9BHBKI+MPVZWmhjPAzKks9oVqG4hPG7Nk1zg5tcc2kb3Z97E+uVnRx0ZsL9M0i iATJ8ZAEgMxk+QGlXCr1gfppbUJUNHc3AYmPtqkQgpae68EJg0OHxtHJE+x9utlI34H8 kGolk2YVnDWwFBbyiyop3m4XItXkGw0FGq58QSqyqA98n7os3DgjopdKsaa+NaWHfjsW V+WHfeWhXJhkDpOaGe7uQPrCuBf0Pf/VoOg0UQLQLS/rkT2KuOUAFpj2audd9x8fBV8n drHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ktvlgAkd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x18si18421674pgi.193.2019.05.06.22.52.07; Mon, 06 May 2019 22:52:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ktvlgAkd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729272AbfEGFvO (ORCPT + 99 others); Tue, 7 May 2019 01:51:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:59444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728989AbfEGFj5 (ORCPT ); Tue, 7 May 2019 01:39:57 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8895C216C4; Tue, 7 May 2019 05:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1557207597; bh=T86Ozqa4zQwnEIPLFsnsGeVLTp6aZdkd1zJOQJbGNi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ktvlgAkdVzgLpEU+g4sYERpClVVQrnwTn8ftkdOrbhhCkrHgJR6UoscKL9WNvK6cJ 9MgYUYplaBGS2PDiEbTcVfFvO80bDcNFBCZpupp3Pkh8q4G4b2AyKK2lk0qjCKA24u rOeq9XoyM3GDcJMb71x36frCK4S6re6FPmyBV4B0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 4.14 46/95] media: adv7842: when the EDID is cleared, unconfigure CEC as well Date: Tue, 7 May 2019 01:37:35 -0400 Message-Id: <20190507053826.31622-46-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190507053826.31622-1-sashal@kernel.org> References: <20190507053826.31622-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans Verkuil [ Upstream commit ab83203e181015b099720aff43ffabc1812e0fb3 ] When there is no EDID the CEC adapter should be unconfigured as well. So call cec_phys_addr_invalidate() when this happens. Signed-off-by: Hans Verkuil Cc: # for v4.18 and up Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/i2c/adv7842.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c index f9c23173c9fa..dcce8d030e5d 100644 --- a/drivers/media/i2c/adv7842.c +++ b/drivers/media/i2c/adv7842.c @@ -799,8 +799,10 @@ static int edid_write_hdmi_segment(struct v4l2_subdev *sd, u8 port) /* Disable I2C access to internal EDID ram from HDMI DDC ports */ rep_write_and_or(sd, 0x77, 0xf3, 0x00); - if (!state->hdmi_edid.present) + if (!state->hdmi_edid.present) { + cec_phys_addr_invalidate(state->cec_adap); return 0; + } pa = cec_get_edid_phys_addr(edid, 256, &spa_loc); err = cec_phys_addr_validate(pa, &pa, NULL); -- 2.20.1