Received: by 10.223.164.202 with SMTP id h10csp194037wrb; Mon, 13 Nov 2017 05:05:03 -0800 (PST) X-Google-Smtp-Source: AGs4zMa8b8XAjtPVnDmxhCymRSFgQGDGSNHZj70E/hZtJQ6m+Jt6beWws7/MDnugjUOh3WhkrwWx X-Received: by 10.99.4.75 with SMTP id 72mr8441840pge.318.1510578303748; Mon, 13 Nov 2017 05:05:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510578303; cv=none; d=google.com; s=arc-20160816; b=J4IrLvEMuXBQTREfbkshGgKhwzvYhFnuCO523njs6v1n7Pvsoimr2T6/SY1tutm6sr uEUUto4palKAdNcb+hPVf15LmjKvz0u8HfI7McLZLRDevpGRYFxu0KeFcGFR+zRUbx// MiULWczM6aTIwcqqIHBbxciMxamwop69TYOMb+M9dUYqojZjinaD0q5ZpYLsS5wKH7NA xnNCMkwAYM/0XkGoMj7yKrRpRVci1xTNpo7QUtPiDUnLdXK20GxrEQ242ru+CB/GTUIC wn0idM4gxkRQqIQU1L2OyvaBaVxPyw+sqH1io/xPEJJS93TZ9NX0/4phIjxez6uaBt1v JkDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kaW6Mlkqe9eGdE3k7gU73raYzFYI5snmI/HNG6WXuxY=; b=W9ruv7pJshNwEftskj60S7DTqDB/PPavDasYaBWuQFRSwoaefWf+sUhKF4raVnSSdi zgrRt/A6rXmG21CxOmy4f1wAZ9xjMPzo2Di5keTs7EejRihRUfaCSzoiR5BA2b4Wd+yh wCIwlc8sEAxF7GlnzemzCvotUCGdErGASjmXuNkeh9vHxYtlzU/FXYjKNndtiI2+TG9f N1pgHNvkiJzVT8q+vWvrTCxw+cxRna2TyUhLozSyTEfXk/7ekUKVs8ILQvXNouC6Mup7 +//Hz1LUIK/Njdl1WkkCbhaJ3TOtJveMo1y+p/5JnwL6GENdYAeI7THtYYHDFgEwZxSC BvDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p20si3400421pgc.387.2017.11.13.05.04.50; Mon, 13 Nov 2017 05:05:03 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755014AbdKMNDG (ORCPT + 95 others); Mon, 13 Nov 2017 08:03:06 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51352 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755000AbdKMNDD (ORCPT ); Mon, 13 Nov 2017 08:03:03 -0500 Received: from localhost (LFbn-1-12253-150.w90-92.abo.wanadoo.fr [90.92.67.150]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 7A081ABB; Mon, 13 Nov 2017 13:03:02 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Airlie , Archit Taneja , Wolfram Sang , Lars-Peter Clausen , Laurent Pinchart , dri-devel@lists.freedesktop.org, John Stultz , Nhan Nguyen Subject: [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing Date: Mon, 13 Nov 2017 13:56:38 +0100 Message-Id: <20171113125622.533445512@linuxfoundation.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20171113125615.304035578@linuxfoundation.org> References: <20171113125615.304035578@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: John Stultz commit 3587c856675c45809010c2cee5b21096f6e8e938 upstream. I've found that by just turning the chip on and off via the POWER_DOWN register, I end up getting i2c_transfer errors on HiKey. Investigating further, it turns out that some of the register state in hardware is getting lost, as the device registers are reset when the chip is powered down. Thus this patch simply re-writes the i2c address to the ADV7511_REG_EDID_I2C_ADDR register to ensure its properly set before we try to read the EDID data. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-7-git-send-email-john.stultz@linaro.org Signed-off-by: Nhan Nguyen Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -573,9 +573,17 @@ static int adv7511_get_modes(struct adv7 unsigned int count; /* Reading the EDID only works if the device is powered */ - if (!adv7511->powered) + if (!adv7511->powered) { + unsigned int edid_i2c_addr = + (adv7511->i2c_main->addr << 1) + 4; + __adv7511_power_on(adv7511); + /* Reset the EDID_I2C_ADDR register as it might be cleared */ + regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR, + edid_i2c_addr); + } + edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511); if (!adv7511->powered) From 1583955935972622425@xxx Mon Nov 13 13:01:34 +0000 2017 X-GM-THRID: 1583955935972622425 X-Gmail-Labels: Inbox,Category Promotions,HistoricalUnread