From patchwork Thu Oct 4 09:08:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 10625753 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F1B99175A for ; Thu, 4 Oct 2018 09:09:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0DFB28C6D for ; Thu, 4 Oct 2018 09:09:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D57DE28CBB; Thu, 4 Oct 2018 09:09:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 85BF728C6D for ; Thu, 4 Oct 2018 09:09:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 17ED86E595; Thu, 4 Oct 2018 09:09:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lb3-smtp-cloud8.xs4all.net (lb3-smtp-cloud8.xs4all.net [194.109.24.29]) by gabe.freedesktop.org (Postfix) with ESMTPS id 19D2A6E58C for ; Thu, 4 Oct 2018 09:09:06 +0000 (UTC) Received: from tschai.fritz.box ([212.251.195.8]) by smtp-cloud8.xs4all.net with ESMTPA id 7zcygC0KD0ZZE7zd3gjcyx; Thu, 04 Oct 2018 11:09:05 +0200 From: Hans Verkuil To: linux-media@vger.kernel.org Subject: [PATCH 2/5] adv7604: when the EDID is cleared, unconfigure CEC as well Date: Thu, 4 Oct 2018 11:08:57 +0200 Message-Id: <20181004090900.32915-3-hverkuil@xs4all.nl> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20181004090900.32915-1-hverkuil@xs4all.nl> References: <20181004090900.32915-1-hverkuil@xs4all.nl> X-CMAE-Envelope: MS4wfOHUDIiPDYOb622JxqGz7sJ0QhlbgIFACKk/7NT6oAHxkFiQcbOnxy7Db3kaDRt9Kt/1cu0cOd6nbBDm/yBqp9TrWLPWhRMY3J5pltf9/tKhEn6XnoVY mMpL2ETAhyOzwaOWKAjjUrmiGEzH2m0qDx35DtLAFWtMwx9ZrrzHm11y0MvXWT4X1p331syuv54iia1EFWjlax7PX1uNNOBTKTdeOXX5Tfn09+Uydgfj36n5 QultK7082Qgo+PfeSNwuO0MG7+EshRGhJVOAo5n9yH100U7ZfgSqGERnB7sOomhk X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomi Valkeinen , Hans Verkuil , dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Hans Verkuil 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 --- drivers/media/i2c/adv7604.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c index 668be2bca57a..3376d5cb05d5 100644 --- a/drivers/media/i2c/adv7604.c +++ b/drivers/media/i2c/adv7604.c @@ -2284,8 +2284,10 @@ static int adv76xx_set_edid(struct v4l2_subdev *sd, struct v4l2_edid *edid) state->aspect_ratio.numerator = 16; state->aspect_ratio.denominator = 9; - if (!state->edid.present) + if (!state->edid.present) { state->edid.blocks = 0; + cec_phys_addr_invalidate(state->cec_adap); + } v4l2_dbg(2, debug, sd, "%s: clear EDID pad %d, edid.present = 0x%x\n", __func__, edid->pad, state->edid.present);