From patchwork Fri Nov 3 03:10:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nhan Ngoc. Nguyen" X-Patchwork-Id: 117848 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2929247qgn; Thu, 2 Nov 2017 20:10:20 -0700 (PDT) X-Google-Smtp-Source: ABhQp+RtSYWpu9e/7gAz4lniWpmvy7BMkBSmzXKC8Sza62+vG6JBvYcMCebjQTDQDfgFrglzRUff X-Received: by 10.98.206.68 with SMTP id y65mr6165581pfg.138.1509678620105; Thu, 02 Nov 2017 20:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509678620; cv=none; d=google.com; s=arc-20160816; b=gp+ERUs+OvpDTwv73A6QH9JMv+yXrgQ3W6CycFAqmfFLl32aGkphOHw0Ygx/Ug8Z9d GOR5fjmMAWxlOJ9gqK6+lD63S/DfnSEwZWEkZ0DGnnoLnBCyxNQvgzdY8EJ12mJtn9TJ R+YbHxamJoexOJ4WmFsugT34WX9tCkLy35x6PWa6UV5VkfrwQhh6E8cJb9HAxgh1R76M U8XJfgING834JVPjhhgcZnI+U9S8LQjldQFLB9oq/LhdsFQtutHgH7VOvPBuJQSZtqzm zVS+qsR9tuzVSJCoOMuLsno5EpdhzIYYIIzVa4+xQCOSE9P3oX+dgEQ++1eMSZy6P7nw cZvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=QdaeBohb3/t+TyC8a4NL4iDCUjYyRWbBm0EUdGFs4bI=; b=DskE8rtRlLimyx01d7b5OovSKqaumnZMo4IgNsZpgis8kBlcbJC0sgfQm7kC0F73Qq JIamgqP+qhuFsQRafbYGi7R5e42US9lFBJI0EzYIKUDwojlcrHBCMasVx5hMRYSoOm3J 77ppCy4fkiZsfs4y6xN2K4FCU2o5uPhfXasYBusGvYq8NfbfWdyKIA7rCS454nxSsau+ qegmoSsiLlYx4LAUQYBLkj3SD3X92o0JgsyPPlQknaaQRaSWe7F7x7usxYWD4hH12QU2 9PcQwVT1USGpTZ3AdsxiK9+dpbc8L3Gpdv+DOZ7TJ1TEGQzgQ4JLQPOqxjDQqwSrY6Ug urmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@renesasgroup.onmicrosoft.com header.s=selector1-renesas-com header.b=pTYgSedN; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 z72si5332730pff.170.2017.11.02.20.10.19; Thu, 02 Nov 2017 20:10:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@renesasgroup.onmicrosoft.com header.s=selector1-renesas-com header.b=pTYgSedN; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934708AbdKCDKS (ORCPT + 9 others); Thu, 2 Nov 2017 23:10:18 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:64733 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751507AbdKCDKR (ORCPT ); Thu, 2 Nov 2017 23:10:17 -0400 Received: from unknown (HELO relmlir4.idc.renesas.com) ([10.200.68.154]) by relmlie1.idc.renesas.com with ESMTP; 03 Nov 2017 12:10:15 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir4.idc.renesas.com (Postfix) with ESMTP id 6DF7D5DAE0; Fri, 3 Nov 2017 12:10:15 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.44,336,1505746800"; d="scan'208";a="261197307" Received: from mail-hk2apc01lp0212.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.212]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 03 Nov 2017 12:10:14 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=QdaeBohb3/t+TyC8a4NL4iDCUjYyRWbBm0EUdGFs4bI=; b=pTYgSedNqoVfpI9w9Sbd6tUECJNXHzgvDuokdosoOUFuOxriLOMx8fZdQslfZ4Lk7A6aWCCDmmb0szd5iyUeuhRMI7O8IdjSy+2LgP2mTW3Niy+cEz5yYO7A2ht5dNc0U1RR5/hm39pNQC/4qYImbLRtr97jn3aYHvYX64big2w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nhan.nguyen.yb@renesas.com; Received: from RVC-LT-408230.rvc.renesas.com (210.245.28.11) by PS1PR0601MB1337.apcprd06.prod.outlook.com (2a01:111:e400:7a37::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Fri, 3 Nov 2017 03:10:07 +0000 From: Nhan Nguyen To: gregkh@linuxfoundation.org Cc: toru.oishi.zj@renesas.com, John Stultz , David Airlie , Archit Taneja , Wolfram Sang , Lars-Peter Clausen , Laurent Pinchart , dri-devel@lists.freedesktop.org, stable@vger.kernel.org, Thong Ho , Nhan Nguyen Subject: [PATCH 4.9.y 1/3] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Date: Fri, 3 Nov 2017 10:10:26 +0700 Message-Id: <20171103031026.11224-1-nhan.nguyen.yb@renesas.com> X-Mailer: git-send-email 2.9.3.windows.1 MIME-Version: 1.0 X-Originating-IP: [210.245.28.11] X-ClientProxiedBy: SG2PR01CA0089.apcprd01.prod.exchangelabs.com (2603:1096:3:15::15) To PS1PR0601MB1337.apcprd06.prod.outlook.com (2a01:111:e400:7a37::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9fa309ff-c726-4e5d-ea50-08d522686414 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199); SRVR:PS1PR0601MB1337; X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1337; 3:+OOJXcTTbihC7fK//C1vivlpwlJDztcg5/MYPZDcVYiNVVmlJYJH9YlRMivlZqGbSgg7Xg/0P2f/mTBc+asMHT/lyVllABh3fZT/EVNrW20WVL+T21zBVL6UnOrwaCslJqLuVUXvVQkX2hNmw3j4YCw8xxd7BQUC2z6YGNq2C7i0V5s4eIQ0NHahaTDyOHm+aPuULNIwWfuTmI9N1EC6VdrBeqIPBw/5KOMZymMwCCMAaUoXOO91U9wvDL1+4w6O; 25:EICgXpcAPXYXYptmoesCLvlk7Q0sYgsv6O6+hwNyufp5pSABttqeuzhqEQw+QU0Wv87rHhY4XU8R8S1JL2K5hXrTmsphhWudFOYXGxPs6/8T5UtgJKxtveDd4wTI2cIiagqeKjdZnbhz/YoyQGkBDNNnorKFB9IxNol6XpooII9HA4hTOhKEQ4IGJLXv+jvp0nX1qwLOFdcQd12t05lIek2jsGXQJ0eDSvru0IvbAupoVzo9Z+D08sjB9irdamlgvipikgqs1PBBmcT6WiSivj+Z63clTvmm1W2hEkNtHragowJL2jKvDPIpXC9zLbDafO0iUrJDwkiUMi1r66WIfg==; 31:j0DauHdsq2timD/ilIwle4vDfcYpZrxb/r02mTDh8oIrT4m4tyumxcmvZtEsL0DYfCPSUlcbpYVZN+dsSUqeVDwAByTXE+GG5Fk5+/dekYtVHPMXEYpketxHM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Test: UriScan:(9452136761055)(217544274631240); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231021)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(20161123564025)(20161123560025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:PS1PR0601MB1337; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:PS1PR0601MB1337; X-Forefront-PRVS: 0480A51D4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(346002)(376002)(189002)(199003)(86362001)(50986999)(33646002)(189998001)(6486002)(4326008)(97736004)(6916009)(53936002)(2361001)(6306002)(107886003)(103116003)(6666003)(2351001)(101416001)(106356001)(3846002)(1076002)(6116002)(5660300001)(105586002)(316002)(16586007)(54906003)(305945005)(2906002)(7736002)(8676002)(50466002)(25786009)(50226002)(36756003)(5003940100001)(15760500003)(8936002)(478600001)(68736007)(47776003)(966005)(81166006)(48376002)(16526018)(81156014)(66066001); DIR:OUT; SFP:1102; SCL:1; SRVR:PS1PR0601MB1337; H:RVC-LT-408230.rvc.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1337; 23:alSqUuRW4fiBzHqaDhYY+c06hMJAvziPgHVmDB7Ch5IJQkPboEiavTLMkqzjXlyrrXrgeHAwlZhJpgNdtdRz1g5DqP1BeK6SqRdCDc8PzTkjO8yGcDTeh2SrLHpe/CHZKmPtY0u27e+ysGe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; PS1PR0601MB1337; 6:bIEv6zQgHHq9h/G2xbvNsqinB/62V9tnqx+mUnaXicdTl3xNXjfYzvbASCYYRGbD2zuQ7YTPf3/vrwMhwAU3uk84NABPgTRUVeYDMDbK8lLUCvDGr4KZIjaH5ObWl03Ks8YPK+LQcEQT2esMNeBWQHtCxXjHcndTz8WiB6M067ley7T8Eby1ZUpBCsehAMVxbTHhutHf7BBZq5ZDcFKder5gvWph7XqCObFcW3h6YdmRX9f6BNXtqvR4Lik3gzs38sgEaTFLZbSEM0TStS716ZpKmpVAptzVLKqj5NbrMwdoa9zVgoTNolou2dSDN+36zi8vtsjEStgVnR8vZJIdzdTnywa5YRiW+lrsoAbFJpE=; 5:7UwXqX4i8aj3QmaXIduQoi9MlIYFijFae4ZFztwZiSbjGjVzSkO2WbiaLVZNPwu1j7cwFfZrLNCNFo5yEBtwQ/B96rvMAd1E0mnTN7td54EDcRtniNTQZhKEi9H0pasKMFi5p01DMR89npGt8y74/PJuW+16LOyHx9N1DrF0KsQ=; 24:1lcljkJr31WSVB64EdeEaQ18bQ9T4mAneSNSDorXwmH522hBH4c+sRzi6zPmoL3WXc+YnH5LnwEPkqlmCcH91L5IKR6XhfenuzvOwwLo3fc=; 7:W5Ggor4iqKb/6bQK2ToPxLdISLlVsW/c1D4G55Igqp11yVLQN57LJ3UCXSO7MhDvdoPhFrS5mY9ACP7674dNAo3G94KayKPc9VcaY8SjDLs5ynL6OKwPJ6uCbU75e9mjQQUb8kzqcfJPEBwtN7hfuw7unASdiwlnZ+eC4MdGyseMpY0abfAtTX/pEvlSlCwJb/Tt40wQpCRpXGa9X19e4R1ZaJJB91CTkF0vcao8Z4wntAdzrRUqmU2cknjDHjty SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; PS1PR0601MB1337; 20:BTHWuPE9jT4s+WvO6pldYcjrs3jK7HtjIaQNgW/uBx2hWZJXYhcfCWhMhzm8MJITHWjqIqq94fI1dG+mySjzWfIvtfB7fmqctpYCt2h2mrXXeC7Qcl7y/ZtjlddfhWQmIBbztd9V5APIibDJPHxjATPTHCQIcOvZHKSZL32TCeI= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2017 03:10:07.6640 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9fa309ff-c726-4e5d-ea50-08d522686414 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS1PR0601MB1337 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: John Stultz commit 651e4769ba2a9f20c4b8a823ae2727bf7fa9c9f0 upstream. In chasing down issues with EDID probing, I found some duplicated but incomplete logic used to power the chip on and off. This patch refactors the adv7511_power_on/off functions, so they can be used for internal needs. Cc: David Airlie Cc: Archit Taneja Cc: Wolfram Sang Cc: Lars-Peter Clausen Cc: Laurent Pinchart Cc: dri-devel@lists.freedesktop.org Cc: stable@vger.kernel.org Signed-off-by: John Stultz Signed-off-by: Archit Taneja Signed-off-by: Thong Ho Signed-off-by: Nhan Nguyen Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-5-git-send-email-john.stultz@linaro.org --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 72939d4..545ceff 100644 --- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c @@ -325,7 +325,7 @@ static void adv7511_set_link_config(struct adv7511 *adv7511, adv7511->rgb = config->input_colorspace == HDMI_COLORSPACE_RGB; } -static void adv7511_power_on(struct adv7511 *adv7511) +static void __adv7511_power_on(struct adv7511 *adv7511) { adv7511->current_edid_segment = -1; @@ -354,6 +354,11 @@ static void adv7511_power_on(struct adv7511 *adv7511) regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER2, ADV7511_REG_POWER2_HPD_SRC_MASK, ADV7511_REG_POWER2_HPD_SRC_NONE); +} + +static void adv7511_power_on(struct adv7511 *adv7511) +{ + __adv7511_power_on(adv7511); /* * Most of the registers are reset during power down or when HPD is low. @@ -362,21 +367,23 @@ static void adv7511_power_on(struct adv7511 *adv7511) if (adv7511->type == ADV7533) adv7533_dsi_power_on(adv7511); - adv7511->powered = true; } -static void adv7511_power_off(struct adv7511 *adv7511) +static void __adv7511_power_off(struct adv7511 *adv7511) { /* TODO: setup additional power down modes */ regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER, ADV7511_POWER_POWER_DOWN, ADV7511_POWER_POWER_DOWN); regcache_mark_dirty(adv7511->regmap); +} +static void adv7511_power_off(struct adv7511 *adv7511) +{ + __adv7511_power_off(adv7511); if (adv7511->type == ADV7533) adv7533_dsi_power_off(adv7511); - adv7511->powered = false; } From patchwork Fri Nov 3 03:11:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nhan Ngoc. Nguyen" X-Patchwork-Id: 117849 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2929989qgn; Thu, 2 Nov 2017 20:11:15 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TFR40DGaGo/SqRyUSMTtHgnqvzAHQcUSbSPT1OZqRsawtMO2OmUPEr4Ty6eg5DHrA0hq71 X-Received: by 10.98.61.85 with SMTP id k82mr6130651pfa.84.1509678675754; Thu, 02 Nov 2017 20:11:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509678675; cv=none; d=google.com; s=arc-20160816; b=X0O4ke/OFYAb46/JE6KQ3KptOkwgf9BCAackHd+4BlWruMI0W9e69iV+dqKIgaTCQy y50E7l1m3pUH0cEQgJciyAWIZ/ilRDG1dKi16a3iTOT+MOkwx7nhMX/tZwuA75eGeBKr 0tSWRINzsEIOEGLkIzALpKm79UKGhAcpRI9d7C5em4yTYfwQzgEJ3y50kIznEvAVbRgW t1WUacvp0C/jrVvavMc3MTe5U5GObuPqqWxjUcu7bKEa2Lq0PKb2tucVs7yecpTrGH8F 3kcGDyT02ItzmlRXioUZ0+nk3yC7kn/19jz6cPu0jJ0+AnYyRSqckfjShdszPOR2TMHt JT6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=X5qPfylmRcmskCqOHibUdo7QpogaWHhdeDg7WNk8z1g=; b=YkpQ/RpTXW9HlRT46oGWgATS6Gtz7jXcWfKkfrHo+gFpR91uILN9D6ioSntPAG+g+N HTOijgfYifP3wBCvsf/DPfCAEj+hckPXEgjDQ+AP6/tshPXZyaIzZUHeDG1Z4Q7qTPeh Zv5qhfI1+aOJTYHt7tNfAuTxByaIQn7vfdnSr+kHnj3y+3nwdQgAsDmR3FEN03fQPAJg ViWVEChzjI3Dr2cdeDdvgcHRwWr1itgblUnggc8ebAJnuDM5svk+7RMB7z02OXFQP/n6 DsEliESbVbFsrdG2BlD/cR0bLhg3aXDYH87Puefj4SoEXntl5Pvi77Wzq9+k0ay7HwcS fZIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@renesasgroup.onmicrosoft.com header.s=selector1-renesas-com header.b=i3/6jhc9; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 k8si3684416pli.74.2017.11.02.20.11.15; Thu, 02 Nov 2017 20:11:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@renesasgroup.onmicrosoft.com header.s=selector1-renesas-com header.b=i3/6jhc9; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934726AbdKCDLO (ORCPT + 9 others); Thu, 2 Nov 2017 23:11:14 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:11765 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S934725AbdKCDLN (ORCPT ); Thu, 2 Nov 2017 23:11:13 -0400 Received: from unknown (HELO relmlir1.idc.renesas.com) ([10.200.68.151]) by relmlie1.idc.renesas.com with ESMTP; 03 Nov 2017 12:11:12 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir1.idc.renesas.com (Postfix) with ESMTP id 6FCB554111; Fri, 3 Nov 2017 12:11:12 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.44,336,1505746800"; d="scan'208";a="261197363" Received: from mail-hk2apc01lp0213.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.213]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 03 Nov 2017 12:11:11 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=X5qPfylmRcmskCqOHibUdo7QpogaWHhdeDg7WNk8z1g=; b=i3/6jhc90Kgs1D5T7GXVlIyCKw5SlQVhK9csA87otHU5GmchCzvUwlvbnkGg59AZpDHAgAkdjOyaRaOte337smoQNQ9HA6202FPZxLk8U23urkJtWDqyb1oPE0FK3tpP82r3baort2GBIwHZN4u1Da4JoShgU1VtF0Ugrgsb/dw= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nhan.nguyen.yb@renesas.com; Received: from RVC-LT-408230.rvc.renesas.com (210.245.28.11) by KL1PR0601MB1335.apcprd06.prod.outlook.com (2a01:111:e400:7910::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Fri, 3 Nov 2017 03:11:07 +0000 From: Nhan Nguyen To: gregkh@linuxfoundation.org Cc: toru.oishi.zj@renesas.com, John Stultz , David Airlie , Archit Taneja , Wolfram Sang , Lars-Peter Clausen , Laurent Pinchart , dri-devel@lists.freedesktop.org, stable@vger.kernel.org, Thong Ho , Nhan Nguyen Subject: [PATCH 4.9.y 2/3] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Date: Fri, 3 Nov 2017 10:11:31 +0700 Message-Id: <20171103031131.14024-1-nhan.nguyen.yb@renesas.com> X-Mailer: git-send-email 2.9.3.windows.1 MIME-Version: 1.0 X-Originating-IP: [210.245.28.11] X-ClientProxiedBy: HK2PR02CA0200.apcprd02.prod.outlook.com (2603:1096:201:20::12) To KL1PR0601MB1335.apcprd06.prod.outlook.com (2a01:111:e400:7910::17) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f8e6a62-4026-4417-cbe9-08d522688753 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199); SRVR:KL1PR0601MB1335; X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1335; 3:+0P+TYmO0Fho10+rw28PbYAM98wmLoRE80ru+EeXjTal2/5m+cNxtL7e4vi35E7+YH7b9IB9kBgn7q1WScctRooTygkZlnLncIAOkqkSCbeSs3NGPLhCNpuJBNsLtXCprhWVShFM4FTtxUTymIAY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VRX1YDY3IeAxIVGHPCc4mxhpBb7A12GtLzT22hv9la5MtuN3JsfupYz65Cg9HIg3rxNOdV/AHbY9nDXNC35UHaTu7vDc0tBreqxZ9+FeNrut9Thdsu+vwnZ21qw5WrLDlcwRLPgKHF/t421tvM8w1/7Xr0LbsPlK+Lie1iqBXjI2PnpWemdUZKWbuA44dypILCujF8KSL0GBn2Gk6BN8Zt; 4:+Jbd0KrDBm0mvIPz7XRNRmt0aMgcmDlN8apRtyqNqijK1NX0TXKvJEwi6tytC5dgpEOlGhAqcEVlx2DTnOEi79vzUte+G1xAm5ZxgSwgqkSdiL931hQJniRQ6fxT1UMJ8bUoPHIk5ShoNiKteJ0n+JWR/RJ2WfSnrBY3mWJjLMp8au979Kfd7pslVON8lQ9te1VgaphAeM9kWq3Ihhi7SEdk9byAw9qa24SK2mXZnQ55MfzRr2KlaYoFfpEATgSGW1TNZatbuKJnoXEkHzyaOGvGECLGeh5Yw9kx6u0fTY7usJtU6sxTE1NyuV9XiPSD5UUgTXMA9B15RyyBzy7C6J26mtOu8uwDJSqfA0/MyTw= X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(217544274631240); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(3231021)(6055026)(6041248)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:KL1PR0601MB1335; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:KL1PR0601MB1335; X-Forefront-PRVS: 0480A51D4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(979002)(6009001)(39860400002)(346002)(376002)(199003)(189002)(16526018)(36756003)(15760500003)(50986999)(2351001)(6916009)(33646002)(2906002)(5660300001)(103116003)(4326008)(105586002)(106356001)(3846002)(101416001)(1076002)(2361001)(6666003)(6116002)(6486002)(107886003)(6306002)(53936002)(68736007)(8676002)(81166006)(25786009)(8936002)(81156014)(7736002)(305945005)(5003940100001)(478600001)(575784001)(966005)(189998001)(50226002)(66066001)(47776003)(54906003)(16586007)(48376002)(50466002)(86362001)(97736004)(316002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:KL1PR0601MB1335; H:RVC-LT-408230.rvc.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1335; 23:VGCP0ou+XtkXg/t2GY0tZDKPpY6D8JW74iQgKIVRz0AqUzIQIc83+b4j3KGDuCInQv+81hxLUVnfKQD3znVd1Ff5ahVXOCt5b+7ddbTQ/rYzg/F40BYc/NqIC+xVwyyys1cqQZrn8zP8lDXYna3DwBFEMuhG7s8T4GDwXfQGKKd4A9C51VJSAM5fIiGWkgWMMECa5lMzxHmOXLNdXvYaisqkq+BpTF2M4fiM3zJ3GTy72sEwGpd8TMBdE0harnlcTg/2UhMcMbc6n860ssnWwBcrO1md7BmFL/51ZbMVOkIGl0/OdixYlMtVZMzbyVpsEEDjzIPmDXjmuUiD6nqma6kWB/+WD6iNNl/d/UXKMGNu1BxZTkcYhJOhqpvSPj1B+PHyTyCBJQONvPMLLcayep8O74mpV7+Om8nSyfOZk0JMe6wFEjx1/n5ZnTaUFCVJR3lU+71jCcVMbe4nkojhwZsKUwCPxlOKb4n21VusfWIlRAUKVStVslmP2JGvju5uUY6hgra041SLLezinT9/RuSjUB0zFAcBjluety4qmvpGQZihVApGieXblTfKk6MyoDlRzr4YyqEtS07sc2azvB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UZOpaibryUs58OH8RuiZ5XlxaD9gLYbbgCXKo=; 5:Hje1LsTmJfq6anXj09Y6tVulpJnbRrJZzXnY/yKj8kwEHSYbgLb/WDcs7UTtFKtPD2RJ6kqX/gW1A86uvw3Hrk9D/DCs9ZQyXFHUtp9XssOZd7Afvq+/e714xFTfm5pDRl0uW9GpszrOcxq3zaU9YfW5+i4qTLcj9vzyxkry2RI=; 24:/5XoYphkDx7GTivhfhynVQ7puiWgJrUqA3WZ/K9pfToAZvNd8SZ0YFcVX+bnmoDoQqP5qLOc57zSyVuuKkoL7kVNLl3NS7Jh93u1RzLkKKw=; 7:9vze3M6c/7+LYhix2MZz0CAK3FliFdLXGyM0TgIc4g/YAkh8TEHmv7ysi9M0L4/vTgxo0qKPjKk0S8EwXqJr4KvBwmjYTJnz7WedrMx06P6Gol/lsV/HzSaaBaUTgCncERXbBuUnKgDdqHSDKWYzXmHxiD/sAE5vhRtxpAo1GHuC5IMLgOejZvOHzHV/mshkIIUQ/e82PyfhloOQUaQbly+3EjVHOQwoBA4XaCsJoUt5xtCzd4YiHViXRl2ffJQW SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; KL1PR0601MB1335; 20:KLiE9eBdynt6Uwt2MxVOtlxREHuhZEhcGaunBVeO/B46n95kPvEmo5AFHx4iNe0kBqRUa7i+9XnZ7gDbwZlR4mDF+KBTPnaWBnmF7mG06i7wXR8TQctv/2TFveQ8dfM8N267myfitmuftP+q5Z63r0LOiWTz1Qoq3bn9nGOf5VE= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2017 03:11:07.5308 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f8e6a62-4026-4417-cbe9-08d522688753 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: KL1PR0601MB1335 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 Cc: stable@vger.kernel.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Signed-off-by: Thong Ho Signed-off-by: Nhan Nguyen Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-6-git-send-email-john.stultz@linaro.org --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 545ceff..17b9e98 100644 --- 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 adv7511 *adv7511, 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 patchwork Fri Nov 3 03:12:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Nhan Ngoc. Nguyen" X-Patchwork-Id: 117850 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2955909qgn; Thu, 2 Nov 2017 20:45:18 -0700 (PDT) X-Google-Smtp-Source: ABhQp+SXJApsByEYXnVznOejxN2Kd5yypx55Kc+ipw3bsXBf5S6VMIODmTI0ec54Pl4vMVNcdOcP X-Received: by 10.101.78.138 with SMTP id b10mr5737767pgs.160.1509680718184; Thu, 02 Nov 2017 20:45:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509680718; cv=none; d=google.com; s=arc-20160816; b=eSHhYG59sKl8nn1+jNDnrzrvXE/GWW/lMRLE+xPnFmmyi2IZ7eUdLfsLCJ+o8vIdHD BINVFMNXANGhPJ2IjQvMFlWgA2PrmZoaMMkb6eojFIFBB4zAVYzMwTydL9LbBTfQT8g5 fMJXUUbwdY2A/zULzx0VCiXwv8Wg18t06IHuJ1sz2YTWZARN77Gj8Y+f1DU9CdohlqiU XmaoFELvljrTjOxbrqOxAHpqCYD6hf+i00r5d3efTSc3Uda2CFvTQWcUMrLun0cVCmnO beF9XInz+9ycnrS3jAYvODzjRNyEKcoM/XNNPyX8GlqXeWf/4aPwzK/hkprybh/2QbY4 GFwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=AenLPEV3hWPG177FGHRqEc5hpHPuj1qPi/l6QlbwxqM=; b=FH0QBWWnJobOE4/VZLVYh7zA9dlHpy4AXTj280T4QMbfcgx6dqjG7X9nXnObgU8bt8 Ar0g93wtHPC9olAjCOc87DsLEFqW4Bydk6CYQ1VSGRT9WG5OkLlDlTdxzOnMCAo32md7 cgVlpe7cLEqRNEgJyQqELiDV77ua9tVnNO5jiKxtlfRtp3pW3NSSsVv4QJDG3xgerxjO atwQkWU3wjRte9dcwqzHeWFv51kYgzSWkyK06w+BAOrBZFOcwjeZvTYeyEK9GTzq0F4Y 9JaseL/bzC9c9Q0LKajgxHlLcH5wLKvE8hRf2O00fJiWPNOce7cy37JD8t2s7Ih0Nytb VcNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@renesasgroup.onmicrosoft.com header.s=selector1-renesas-com header.b=IN3YkcFk; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-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 h185si4798224pgc.164.2017.11.02.20.45.17; Thu, 02 Nov 2017 20:45:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@renesasgroup.onmicrosoft.com header.s=selector1-renesas-com header.b=IN3YkcFk; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751737AbdKCDpR (ORCPT + 9 others); Thu, 2 Nov 2017 23:45:17 -0400 Received: from relmlor2.renesas.com ([210.160.252.172]:25179 "EHLO relmlie1.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751297AbdKCDpQ (ORCPT ); Thu, 2 Nov 2017 23:45:16 -0400 Received: from unknown (HELO relmlir3.idc.renesas.com) ([10.200.68.153]) by relmlie1.idc.renesas.com with ESMTP; 03 Nov 2017 12:45:14 +0900 Received: from relmlii1.idc.renesas.com (relmlii1.idc.renesas.com [10.200.68.65]) by relmlir3.idc.renesas.com (Postfix) with ESMTP id 7889F5DFC7; Fri, 3 Nov 2017 12:45:14 +0900 (JST) X-IronPort-AV: E=Sophos;i="5.44,336,1505746800"; d="scan'208";a="261199385" Received: from mail-hk2apc01lp0208.outbound.protection.outlook.com (HELO APC01-HK2-obe.outbound.protection.outlook.com) ([65.55.88.208]) by relmlii1.idc.renesas.com with ESMTP/TLS/AES256-SHA256; 03 Nov 2017 12:45:13 +0900 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=renesasgroup.onmicrosoft.com; s=selector1-renesas-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=AenLPEV3hWPG177FGHRqEc5hpHPuj1qPi/l6QlbwxqM=; b=IN3YkcFkULEXrlc7/P+CiIf9Y1JFxfyGzhNb+J0n9h97B2PfldNfVLgiSi5YPiV53Ot3RpTdL1fNLHQkfdIxbKllMFR7l07iLfMs419Xp9xAwUDeMFaM6NlGNAS4oLsT3oSsNSKHRvtRTwEMWyi9CiICLOdrB0KFhuMSbax3f+8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=nhan.nguyen.yb@renesas.com; Received: from RVC-LT-408230.rvc.renesas.com (210.245.28.11) by SG2PR0601MB1342.apcprd06.prod.outlook.com (2a01:111:e400:79fe::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Fri, 3 Nov 2017 03:45:11 +0000 From: Nhan Nguyen To: gregkh@linuxfoundation.org Cc: toru.oishi.zj@renesas.com, John Stultz , David Airlie , Archit Taneja , Wolfram Sang , Lars-Peter Clausen , Laurent Pinchart , dri-devel@lists.freedesktop.org, stable@vger.kernel.org, Thong Ho , Nhan Nguyen Subject: [PATCH 4.9.y 3/3] drm/bridge: adv7511: Re-write the i2c address before EDID probing Date: Fri, 3 Nov 2017 10:12:04 +0700 Message-Id: <20171103031204.8324-1-nhan.nguyen.yb@renesas.com> X-Mailer: git-send-email 2.9.3.windows.1 MIME-Version: 1.0 X-Originating-IP: [210.245.28.11] X-ClientProxiedBy: SG2PR06CA0113.apcprd06.prod.outlook.com (2603:1096:1:1d::15) To SG2PR0601MB1342.apcprd06.prod.outlook.com (2a01:111:e400:79fe::12) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 8bc805de-4bd2-49a7-82c4-08d5226d498e X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(48565401081)(2017052603199); SRVR:SG2PR0601MB1342; X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1342; 3:/xhadDIu9yjT8rY0pA8ndLHMuYbmlZ1Cy8oJEwXk9mHHO6bSJ8HOqWeDl3qW/4Ml9nXhFfSIYFRBov19fSt0EMwgt+J37lI6G8qgzsiaVSL7H99JE6B9yTflrBbr3PKj4HkzqTbgK/sBo5MFan1nBxxMFCu+CeaElGYIUaqH/emd9xJwr6ekUgvZSlV3++8dDW6UqxChRskxSZUqN2t70Q4gJCOlrPmOymtlnYeV46+e4A20348ZAwc5K8f1Zt0t; 25:B+14L9laBBLQzBmXe5JVnYneBM1ErR5UW3nmw4jaHgD2knaDEp8QU4/oJuKYU2yEIHeX4bXSgZBvtI944/XNu98hRrE4QtXwxz9u++zJOFq7OjqfDA8b3xsICwjNLxG8oFex1PwpBZoT0rnwm7CrSg/pbpeWblUT/NN+fZY1TzqCZ2YC76ICrpzdY2v2CU4fz5yhujXt2H0a8gPjfl1nmYq2uZYYMMC2+j/INYPNnD+0Kx+5SC8EBv0Ko3YuS6z6Lykx44+FDvAefcjrgw/ZUTCOQk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25tbxil13BD3yEnnSTo2eowYA3SAd5AqyLCb8pHd/Bz0CItiP0dMK8VLGohP7jqHw6Sql/nXfdfC3aR4D5mkGElVBI7t+qQ3GQHsXNBjlAmnJmrTTq6lnn6xsf+RKKgZkVgOvGKYjnCkq8V98WaTqoiUQ9kfejbwU4RNIUMMNingzFpn+McZI+VgNHHRvG32cYdSU= X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(217544274631240); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(100000703101)(100105400095)(93006095)(93001095)(10201501046)(3231021)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:SG2PR0601MB1342; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:SG2PR0601MB1342; X-Forefront-PRVS: 0480A51D4A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(6009001)(39860400002)(346002)(376002)(189002)(199003)(66066001)(50466002)(48376002)(478600001)(2361001)(966005)(86362001)(5660300001)(4326008)(7736002)(36756003)(305945005)(50226002)(189998001)(6666003)(68736007)(97736004)(6916009)(47776003)(6306002)(6116002)(101416001)(5003940100001)(3846002)(1076002)(81166006)(81156014)(50986999)(54906003)(106356001)(103116003)(33646002)(105586002)(6486002)(2906002)(8676002)(53936002)(107886003)(2351001)(16526018)(25786009)(16586007)(316002)(8936002); DIR:OUT; SFP:1102; SCL:1; SRVR:SG2PR0601MB1342; H:RVC-LT-408230.rvc.renesas.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: renesas.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1342; 23:dPIi1U2llOGZ7PpdKjlrZ26/O84tdo4sl+EmQ09byR2gfwKE0r4LWXPmxEY5M0F1uKBe1wIrSBLq0efbRT8q9wwwyiWXTYxje66wAa/5TRCaJjk4jPtSWTl1i+cDYd0NoImTeKw4XmRB1RcK0heeViMUByBEB9zV951NnCcpP49Pf5YT8TBmszod//RsG5PlXDpjLpZ4qMt3+A15aIsHfBSUsxvdluD6SvgvIY+xXiofHqnHXopat7QvqIitFbLM+XgCsqpojnT/EXiL2wKdJWHASkGJ4goAH74eomlq1jy9IzToqjim83WfUQDZXuDlf6siCFbc77M8iyLOix5puKUZdtiYGbXFwAqC6RUErDz+7OqKfsKAl4QJh6nLp5i4f5rsOL+RNuMB3SwFQEEoTtnq4yXYP/PW0gBxpZ7GZ97Bz97NRqQ/U0yNDTzQtmfljVLobXCYJE9P3DoltC66w3ddPgHXyEjAmGKf7zQKnJz6SEFOZTJnaJ1hq0ROZentIXRYVXQwtNdvftM1sp0+vNJsiY1QXD52ppQrWR9oMA7Tv+QPtBr04dNfsie56HUkaHDF741RQnmCI3Wbcoep/ehKpVwrAax4cOyImeiNzKvea4VJ2bfwZgTd5Km8SVxwz8tCmI8MiIF2/bTPnp9diDeJk1quVJIdTbgPPnYFaBqih3XHmMb0vsZwraYHzB5kIj4lcXJgguSfcpsZK/PXGqnU6uFuwav2KDJXWJD58Q0E55QaV35QdOcLgDMnMGReKLwCYHq2aozFvazEDhP+Kr5YAQfe54TUY3V+V2/Cqr2wY+XqHattMIy7MgjEX2iH3V51I3XLQQmF1Xs/6Jjckz+VCNss5MmJyj0geS5hrBj20qhAW0ErqEI+0h3DUQklXNmt19PqdH9pZSg8+zI+gQ4TjGZbN4f0O/2Ibhhr2UFB6Yor7bjvkBkamk7Ga/NuFovw9HdmbInLsSytomuoQJ5dEmNBIzt4uIKxKowcWQFBP41NS5+gtYq146Xoh/W5sulebo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amDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SG2PR0601MB1342; 20:3ve7mM3SkqhvEgKA+f4unL3vqWupwnvg+rYCUQDCPz+dgAri2cc3hf7Kq9sUd5JEmFz3VCTUEMfw/+r1BQoC/SJGhosD4oy6AJBRFZZiPjJKyHkg6L+4GT2tZ6TIuSzwOPWS6W+ORFFmXcWTBvJ17UGOTUMh5TJa2mnCDjps+BQ= X-OriginatorOrg: renesas.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2017 03:45:11.5055 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8bc805de-4bd2-49a7-82c4-08d5226d498e X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 53d82571-da19-47e4-9cb4-625a166a4a2a X-MS-Exchange-Transport-CrossTenantHeadersStamped: SG2PR0601MB1342 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 Cc: stable@vger.kernel.org Reviewed-by: Laurent Pinchart Tested-by: Laurent Pinchart Signed-off-by: John Stultz Signed-off-by: Archit Taneja Signed-off-by: Thong Ho Signed-off-by: Nhan Nguyen Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-7-git-send-email-john.stultz@linaro.org --- drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c index 17b9e98..f75ab62 100644 --- 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 adv7511 *adv7511, 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)