Received: by 10.213.65.68 with SMTP id h4csp2120614imn; Sun, 8 Apr 2018 20:12:46 -0700 (PDT) X-Google-Smtp-Source: AIpwx48+PIOxaZG4kKtdjWy1JqdAPVIcaQ80pwmDf5o0m7ssHMtxKSrz5oF4zGpVU4HchUXRjSnB X-Received: by 2002:a17:902:934c:: with SMTP id g12-v6mr37159265plp.275.1523243470315; Sun, 08 Apr 2018 20:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243470; cv=none; d=google.com; s=arc-20160816; b=WDwNp0zMl8ZKXE/sFzsWttUnED6hFizvtttS0i3DzZnzvItIrcSmCg9DK0oi0NzO6g jI6f56YzAXIC42IqSnnOSiADvet5B/xFyNs6PhBXTMbwGJ7DjLddt4wpeosaoQVQMZIv kRq7k2XiQboxHt6oasxRU9kywwSf7qHk4V9wfwHKsC6rVA3m1+040NHeJbdMD8/XoHpG hBg8tPcb4Te5FydF6KRzarOAIi9XCIT0QCGhkzjAJQk/mO5GNRnMEFQwpZUsYyqAQLkg dzqSqSORto0aairIofaZHRRRP3uNlJwezsZJSGp09VWtXIlzoCCyvOywIpL0AHpdmGKg s5AQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=Oi72D9fSeR4ugLTPPq+SF3ZLBoN/fBgwXv54z2mNkOY=; b=b1/C4XvG2P14pcifjtLqE9WWgSFf+7O2pPus1+xP42MMk24Zyekp8K1VbeH/g0xLg2 JTbGdKatI3ST8QZKlwSfNTo5RCqGDZeBLjsfHzsp1ddyaCgWbtwhJbuFaN51Cjk42jN/ DPJjWo1NlUeOpE8RO2pRtHEkQM9u+kjDAb25OjlgFFHNO/ZevW8kXDW7mvlA+07ptz9S yfU+4J8D26iP+3vlwDi7RipoBp7mL4O6LYhCV9lDx4qPReImEev42//gM9NzjUDFuLdk fU/gyom0p4gTgpZLWV0AxZmFyxOdvAWXGjJdkzG0lMgWJm9gfrSZ9k33ZJf83aNqJmlA GzDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=lWoCJzX9; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7si10299121pgv.558.2018.04.08.20.10.33; Sun, 08 Apr 2018 20:11:10 -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=@microsoft.com header.s=selector1 header.b=lWoCJzX9; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757827AbeDIC3E (ORCPT + 98 others); Sun, 8 Apr 2018 22:29:04 -0400 Received: from mail-bn3nam01on0096.outbound.protection.outlook.com ([104.47.33.96]:38912 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755876AbeDIA2h (ORCPT ); Sun, 8 Apr 2018 20:28:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Oi72D9fSeR4ugLTPPq+SF3ZLBoN/fBgwXv54z2mNkOY=; b=lWoCJzX9aMEAMCYI+pDDpoHnV8RvK/Mbdl0eQZSQw6omCCIFJ0hy2HxcuDGYWiwilH/CgcVmaZhvYAq84agv+1G4WJW0I79FUAvhrfy+wP22HoyvLw880SXb+8QAfD7DZwF7Jcenq60/j8+zrRq3/l0jgIHsFUq8p378kHF9ee8= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0807.namprd21.prod.outlook.com (10.167.110.154) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.3; Mon, 9 Apr 2018 00:28:30 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:28:30 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Dmitry Osipenko , Thierry Reding , Sasha Levin Subject: [PATCH AUTOSEL for 4.9 079/293] drm/tegra: dc: Avoid reset asserts on Tegra20 Thread-Topic: [PATCH AUTOSEL for 4.9 079/293] drm/tegra: dc: Avoid reset asserts on Tegra20 Thread-Index: AQHTz5kLut1pB1vMx0mgTow+kJ0Jaw== Date: Mon, 9 Apr 2018 00:23:55 +0000 Message-ID: <20180409002239.163177-79-alexander.levin@microsoft.com> References: <20180409002239.163177-1-alexander.levin@microsoft.com> In-Reply-To: <20180409002239.163177-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0807;7:j9IR29RjQMbripygwsUKMs4FgLN2XDSj0Yf5+NF92saN0h0vlK9lIeOlPy8kP0D823wrw7yZAZgucMtA8U/amWD5eH2F69gIbgghUJ4XmsEQv7qG39BKS5NFnOoOW/Z3IQF2kxAX8jiHFef1lzc29hne8zs7yzA8wSYdt6Nhes87FkdbBXywgGRSv/J6cWZhWPX5ebjqusRlb8SPyNPPN8B3hXpjZxLkrdQN+OM5DPmXeqU7DR0UAbo1TOhncoeo;20:2pIGrMzC6xSJYIx64GQeQIlGQLlqam9Q7325Xm+DQh4mPZJNhwIBvnfWKdZIIStwKKU206K9Y1OKYNeT+J0MRNmL59XWQ0XMFE36urjqUbi1tIFiVCef4EuBF5NqGA1HWGyBC0Zbfa0JiGMefi5kaiHkVyA3FgZjL8J4royxx3s= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: ceca2d17-a039-467c-34b9-08d59db0d22b x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0807; x-ms-traffictypediagnostic: DM5PR2101MB0807: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(85827821059158)(18589796830644); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231221)(944501327)(52105095)(3002001)(6055026)(61426038)(61427038)(6041310)(20161123562045)(20161123558120)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:DM5PR2101MB0807;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0807; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(39860400002)(396003)(366004)(376002)(346002)(199004)(189003)(14454004)(4326008)(54906003)(25786009)(53936002)(2900100001)(1076002)(3280700002)(6486002)(186003)(2616005)(68736007)(110136005)(11346002)(10090500001)(6116002)(107886003)(3846002)(36756003)(8676002)(72206003)(22452003)(66066001)(26005)(39060400002)(6512007)(478600001)(3660700001)(81156014)(86362001)(81166006)(86612001)(7736002)(305945005)(8936002)(10290500003)(6436002)(105586002)(6666003)(316002)(59450400001)(76176011)(5660300001)(476003)(106356001)(2906002)(6506007)(446003)(2501003)(99286004)(5250100002)(486006)(102836004)(97736004)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0807;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: vGFV9DujRMbwer7TU4yyviY/5sdRPVBiXn0rviwreY00bmONRXt3b7NSFuAnHCsqU63EehWkACK5eeUUuYuOJBPP+qmwk/ZkXZVfcpBjvpa/DXlmfTOn6A8jrqKPwIdmNMMZ8gusZhSXZEsA1Jdtk7jbUA4ueVnlixlbbJ5V5WAMV/6tXGsdjOirncsdZpua781zvs6ev31KLDpmxhJJehjUcmx6SDGFjwYYdtPHutlvJnkcy49gqcoUctXM5RaTmkSjDROhCewfHXTt84KG7jvdUHai6t36l9PN0KUm99zLeUTEmb7hlyjPc76B5YYVJIxjMsAliSs/CD/sUEcDIc2bbJHiTpG94esMxVoR5efBIT1q9N4kB+PIJU0RaCcl/OZXta06utQNBbTNheXo7byF/C3yIsEMRMOjbrzYPVg= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: ceca2d17-a039-467c-34b9-08d59db0d22b X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:23:55.9562 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0807 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Osipenko [ Upstream commit 6ac1571b4c60cb73a1f174b15ea93f7e38d74a88 ] Commit 33a8eb8d40ee ("drm/tegra: dc: Implement runtime PM") introduced HW reset control. It causes a hang on Tegra20 if both display controllers are utilized (RGB panel and HDMI). The TRM suggests that each display controller has its own reset control, apparently it is not correct. Fixes: 33a8eb8d40ee ("drm/tegra: dc: Implement runtime PM") Signed-off-by: Dmitry Osipenko Reviewed-by: Erik Faye-Lund Signed-off-by: Thierry Reding Signed-off-by: Sasha Levin --- drivers/gpu/drm/tegra/dc.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c index 4010d69cbd08..e93cbe7e8f5c 100644 --- a/drivers/gpu/drm/tegra/dc.c +++ b/drivers/gpu/drm/tegra/dc.c @@ -30,6 +30,7 @@ struct tegra_dc_soc_info { bool supports_block_linear; unsigned int pitch_align; bool has_powergate; + bool broken_reset; }; =20 struct tegra_plane { @@ -1847,6 +1848,7 @@ static const struct tegra_dc_soc_info tegra20_dc_soc_= info =3D { .supports_block_linear =3D false, .pitch_align =3D 8, .has_powergate =3D false, + .broken_reset =3D true, }; =20 static const struct tegra_dc_soc_info tegra30_dc_soc_info =3D { @@ -1856,6 +1858,7 @@ static const struct tegra_dc_soc_info tegra30_dc_soc_= info =3D { .supports_block_linear =3D false, .pitch_align =3D 8, .has_powergate =3D false, + .broken_reset =3D false, }; =20 static const struct tegra_dc_soc_info tegra114_dc_soc_info =3D { @@ -1865,6 +1868,7 @@ static const struct tegra_dc_soc_info tegra114_dc_soc= _info =3D { .supports_block_linear =3D false, .pitch_align =3D 64, .has_powergate =3D true, + .broken_reset =3D false, }; =20 static const struct tegra_dc_soc_info tegra124_dc_soc_info =3D { @@ -1874,6 +1878,7 @@ static const struct tegra_dc_soc_info tegra124_dc_soc= _info =3D { .supports_block_linear =3D true, .pitch_align =3D 64, .has_powergate =3D true, + .broken_reset =3D false, }; =20 static const struct tegra_dc_soc_info tegra210_dc_soc_info =3D { @@ -1883,6 +1888,7 @@ static const struct tegra_dc_soc_info tegra210_dc_soc= _info =3D { .supports_block_linear =3D true, .pitch_align =3D 64, .has_powergate =3D true, + .broken_reset =3D false, }; =20 static const struct of_device_id tegra_dc_of_match[] =3D { @@ -1980,7 +1986,8 @@ static int tegra_dc_probe(struct platform_device *pde= v) return PTR_ERR(dc->rst); } =20 - reset_control_assert(dc->rst); + if (!dc->soc->broken_reset) + reset_control_assert(dc->rst); =20 if (dc->soc->has_powergate) { if (dc->pipe =3D=3D 0) @@ -2054,10 +2061,12 @@ static int tegra_dc_suspend(struct device *dev) struct tegra_dc *dc =3D dev_get_drvdata(dev); int err; =20 - err =3D reset_control_assert(dc->rst); - if (err < 0) { - dev_err(dev, "failed to assert reset: %d\n", err); - return err; + if (!dc->soc->broken_reset) { + err =3D reset_control_assert(dc->rst); + if (err < 0) { + dev_err(dev, "failed to assert reset: %d\n", err); + return err; + } } =20 if (dc->soc->has_powergate) @@ -2087,10 +2096,13 @@ static int tegra_dc_resume(struct device *dev) return err; } =20 - err =3D reset_control_deassert(dc->rst); - if (err < 0) { - dev_err(dev, "failed to deassert reset: %d\n", err); - return err; + if (!dc->soc->broken_reset) { + err =3D reset_control_deassert(dc->rst); + if (err < 0) { + dev_err(dev, + "failed to deassert reset: %d\n", err); + return err; + } } } =20 --=20 2.15.1