Received: by 10.223.164.202 with SMTP id h10csp203686wrb; Mon, 13 Nov 2017 05:13:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMYKZ+jqurYSamzG0O9QaOnajijoWpxGtIMp89sW9FBftytnMfsY9W1PcgeTS56tO+Uy4GHg X-Received: by 10.101.78.201 with SMTP id w9mr8442742pgq.402.1510578808257; Mon, 13 Nov 2017 05:13:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510578808; cv=none; d=google.com; s=arc-20160816; b=f9y5jlKWfm5YyDmj64N8Gs0nKkdWHQK4i0j+kfZqpJ0KVbO5PjSVF2zoc5Zuhkztwh csHLjX16zqfCW+07A1PP79bGvQ7Gz0zfAq5oQXpx9/2+m7KH0faLuVZREzO0xM1VrGgD nR2/UZy25WA/5XBrd9/ng78+R60B4kQgPyt91X8mJq2djkK5dWSafu1kE2As4eWxKNxi e/0/iQ66I7CHJpZJMlF3RH+3W7a7+EOdqKIlFWxgufZBOHD29/jlYO9w6t8kNpBeSBNZ zaiMwfXr4ByrhHW0ISjhZSZJYvNsQf3MqD7kkZ5CORptOEBu9pC6ll5y5kXzJkjWqSRH TZ/w== 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=t5FQ6C3Q0ByZ8nTBeqhxV747jIQ+DoMmg74ozHERMac=; b=Avr3JPBEfa2cSteivgTBmVaR0tBRDzuq9Fv380ix3WLUb+VjpEqYwuxEwNrg6aozZ5 vl/J7oLtzanOL1a0YbkFDF9C2b3JGBEVsDp7c1wjlz+ZHaQzTHGewFP75gV+OxY/37yS ya04AOO9b0S9vjnFecI8MwcgBrDoXnRnLHfN9Mt4KvKYOK8Qwhd0MfcWqnZ3nvcGlzl2 r33M0McA5ajHc0v2JTjm6YNegV2NcsIkCt+iJhXv46ETJlSQYX1LhOmY88vfL3IrlCU4 koJm8OiVqnuWHcS2UJxi2ZKF99hRxAMN/IMLlqFoxmGxlUIgWCrSZ3BS71hnWcid7EA3 GpGg== 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 r30si13544016pgu.500.2017.11.13.05.13.15; Mon, 13 Nov 2017 05:13:28 -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 S932130AbdKMNDa (ORCPT + 95 others); Mon, 13 Nov 2017 08:03:30 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:51436 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755043AbdKMNDW (ORCPT ); Mon, 13 Nov 2017 08:03:22 -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 9AA25ABB; Mon, 13 Nov 2017 13:03:21 +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 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Date: Mon, 13 Nov 2017 13:56:37 +0100 Message-Id: <20171113125622.429092050@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 4226d9b127cf4758ba0e07931b3f0d59f1b1a50c upstream. Thus this patch changes the EDID probing logic so that we re-use the __adv7511_power_on/off() calls instead of duplciating logic. This does change behavior slightly as it adds the HPD signal pulse to the EDID probe path, but Archit has had a patch to add HPD signal pulse to the EDID probe path before, so this should address the cases where that helped. Another difference is that regcache_mark_dirty() is also called in the power off path once EDID is probed. 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-6-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 | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -573,24 +573,13 @@ static int adv7511_get_modes(struct adv7 unsigned int count; /* Reading the EDID only works if the device is powered */ - if (!adv7511->powered) { - regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, - ADV7511_POWER_POWER_DOWN, 0); - if (adv7511->i2c_main->irq) { - regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0), - ADV7511_INT0_EDID_READY); - regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1), - ADV7511_INT1_DDC_ERROR); - } - adv7511->current_edid_segment = -1; - } + if (!adv7511->powered) + __adv7511_power_on(adv7511); edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511); if (!adv7511->powered) - regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, - ADV7511_POWER_POWER_DOWN, - ADV7511_POWER_POWER_DOWN); + __adv7511_power_off(adv7511); kfree(adv7511->edid); adv7511->edid = edid; From 1583948525626902169@xxx Mon Nov 13 11:03:47 +0000 2017 X-GM-THRID: 1583948525626902169 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread