From patchwork Thu Oct 12 21:15:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 10002941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4D0A8602BF for ; Thu, 12 Oct 2017 21:31:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3924128EE0 for ; Thu, 12 Oct 2017 21:31:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D2AB28EE2; Thu, 12 Oct 2017 21:31:07 +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=-4.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 1E2E128EE0 for ; Thu, 12 Oct 2017 21:31:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 784746E98F; Thu, 12 Oct 2017 21:31:05 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0054.outbound.protection.outlook.com [104.47.32.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3D346E98E; Thu, 12 Oct 2017 21:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=uEhvud1cqYS1kVcl0ABCWIKcrbLTvhmdy7DL5nqA7RY=; b=xgWmjPzVRW9Q5vlPTkJs0o+iM7qQ1T3RFy4/wHDKRGzokWzCqpSRN3oxwqiKgiScnYWKn6CtWyq01gqCsxNx4Kz5FxHGrfdJ8bY+6baJUZQ2sIMz0WWLvMTQdAOIQ0Fs3f+PE7a714JPKJ/ykTdewPa+F6+mMOYCGwgQzJr8IY8= Received: from CY1PR1201CA0007.namprd12.prod.outlook.com (10.169.17.145) by BN6PR12MB1441.namprd12.prod.outlook.com (10.172.24.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 12 Oct 2017 21:15:42 +0000 Received: from CO1NAM03FT003.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e48::200) by CY1PR1201CA0007.outlook.office365.com (2a01:111:e400:5b9a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.77.21 via Frontend Transport; Thu, 12 Oct 2017 21:15:41 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; gmail.com; dkim=none (message not signed) header.d=none; gmail.com; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by CO1NAM03FT003.mail.protection.outlook.com (10.152.80.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.77.10 via Frontend Transport; Thu, 12 Oct 2017 21:15:41 +0000 Received: from SATLEXDAG04.amd.com (10.181.40.9) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.361.1; Thu, 12 Oct 2017 16:15:31 -0500 Received: from leodev.amd.com (10.180.168.240) by satlexdag04.amd.com (10.181.40.9) with Microsoft SMTP Server id 14.3.361.1; Thu, 12 Oct 2017 17:15:31 -0400 From: To: , Subject: [PATCH 3/6] drm/amd/display: Unify DRM state variable namings. Date: Thu, 12 Oct 2017 17:15:08 -0400 Message-ID: <1507842911-16975-4-git-send-email-sunpeng.li@amd.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507842911-16975-1-git-send-email-sunpeng.li@amd.com> References: <1507842911-16975-1-git-send-email-sunpeng.li@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(2980300002)(428002)(199003)(189002)(189998001)(86152003)(106466001)(575784001)(105586002)(53936002)(5003940100001)(86362001)(8676002)(8936002)(4326008)(39060400002)(50226002)(5660300001)(81156014)(305945005)(76176999)(356003)(53416004)(68736007)(2950100002)(101416001)(33646002)(81166006)(36756003)(50986999)(77096006)(6666003)(47776003)(2906002)(2876002)(50466002)(48376002)(72206003)(478600001)(54906003)(316002)(110136005)(97736004)(16586007)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1441; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; CO1NAM03FT003; 1:GJgYuv4z2+BtX7hckzr3Vfaph41Mc3cCNlKiveAsyltMJx9YWKDYGU+NZ1+0hWMJNMHldSn0toqdCk6CnIGNa5X8823b2Ehwhr06379LmDjJ90u/4j4nIDnSglComyXG X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cf0161bc-0e7f-4296-6478-08d511b664ca X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BN6PR12MB1441; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1441; 3:nMU7xuVVeWWZ0bJiySnW9qRZmdIJfgdogzfxbo9oWIlpiko+huHO7/ZU+drUF9ZNDugZnRoKP7LAFvgVLzSR13e/2oJjMg6JOEPR0RgsdgoBNFlsDq30Ak3zztpx2FFBbEChSi2cFy1GNtei4jzIi/ZmRIXCqrGrDp8USIzLvgzrXM49L8KCpILrlamWlZnTQqwkfiCxSeeWr44EZzWr5cF172Id9vCFKEY5oFtnecdlAGefszicNvAYaFhwTK0VPMmW0tR6QvZQaDaJsaUQHHmhjTgSGf8dLIl7kYK/vsHNH+sdn8k9EpW3AqwQtY9w0C2rHYfebR18AkZYRQ6q/YdlkWi+xiV/7VEfPy9c9zc=; 25:ElMH+bUhB/u9g5tq+KFP/1x3nYBEE040FHeGYqAd+jRkFm0oheyZg5K3okXkWB0XJRsHQPQKXS40anpJNsCRyv8GCY8W+fA+T3Z94f+20r2wuxSumQgmmxB+95NJGiHzjBw2JydZEzuZaS74tbVELsDHl/h71F3J1Dyeoxcazwrr5BVAL+E/Haq1geyb1o/5UJH7C0AY6E+Wklpg7jaTYqcX5audl0F5zvjDCTyFMNwHljwV7DlT37kDrWhViVjBd1i6nHz/jxH1LzS84PpUJ4iC5E6K/fXg4B3NX06N5kwdxu994tPPrbuHE6wQwNREfyTP+7l6XQWXy/vNdr2tTw== X-MS-TrafficTypeDiagnostic: BN6PR12MB1441: X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1441; 31:I3Y0CLkTCORaNswMSeXz6VoaoiJ0QbPP9CzPyzNt05Bbalsq3wAzL8OICcNgyBiRRBFdTD2Tm9ui4EXz3IpyYpLmcIARHOGERsKuiKDzhkhs8dz+z3qJe8RRMCkypkzDaBfNAEtEEUtlKxTrZNYtKkohzHKTprM/CNhq7SW7bqACEpm+BJONubd23vG0ZFOCjabLARRTmTSnFWDYK/LJPE6Pq0OMxrZKflXqyq/KGRs=; 20:rvGOWt4xogrZtBU4r0/BwpvlmEHg8cnH1qLaIJJ/x4ahccuPr7WSHjEWoFig0U60NWIO1Q2ZdD7bMGeDd0kaBlQqaExemKa6PL32fs7SBcIKi0WR/qKb7gGjB0FeV+OnbHpcts4uXlYi5U4Z3osMPJthwShs4I3zjFM19uiUi9SLMAu+zIn2MfnI2LCzSfII9Ro/4fnHdvfNpGhXGLLeMt2V5djcifEysBAc9SIp/J+Ms+EbNQ9TUtB3aF+d28BQB1nu7pJyRKnm5XEdcR1EYHBWW/EdYhAaV/jlVpgecG7uPbAL1kvY5/7o3hJM23cBshr7ehwrOt0ClnzcDxQYeBdtG9jHPKUuU/XCszGgqtDXTrYT6+QY5A0QHSo4MTVP5L9em1OoFL60tQhWb2UhuyEZb+WT7lm3WAQi7FisqwuEs4Ou8hLc9skgyj0IYFKf4ueKS4gdDHGjM3erDn3Gd/4gzXecOtrScj0/HbQmUOFyKucu4pnGO55UtHeXa6MH X-Exchange-Antispam-Report-Test: UriScan:(767451399110); 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)(93003095)(10201501046)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1441; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1441; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1441; 4:Pt8cOhHz85BqfxuY8tl01YWPowCpE9pB6YY15iBjWNZ46P4hOzJliZWuRlbm1PdYw1ZySEaxT3Oi4/RtwiLAvpjq+dPzK9pA0sf3b0WtItaLt/qg85qtMNSP/C2mYiDPKw+uzks1nuc3ek7K6gvDPW9ETyJkm8vbCEmT9DXfPfYYuEhAU7AhB6JhDgDlih7pQVt2mS1LuhSEIjqQQ4265T/qMnUD7CJ6nVq9rbLks2fqIMwZMOJ6rDpDkVFmEp6/rXm2Ik/U0CiI6ZIYPTqVtxwA3v53Su4kVSMcR/px9PA= X-Forefront-PRVS: 04583CED1A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1441; 23:hI0OAFzna38bTNRHyqM/bvIRRAtlIRUXkognkl5lr?= =?us-ascii?Q?qPsKOz7uya7t3dw4QD+StMBr3VM7wvcpD6153yDE5Zw29reKEQWL1uuK6PbJ?= =?us-ascii?Q?3JS9yDiBQ/h2CRJT3C1KmxY2aZS5XAgnqIHAkencawe1JBBA79YBvWyC1Hia?= =?us-ascii?Q?foAsDim/VQwMwtsU1iXi/gyllQh6sSGXLQCFYD7kzeyJRlQGYT6tMUEsvyzL?= =?us-ascii?Q?x4i9n5x2N7FiOBAHVXqSmok5oYLl+iW0vC9nxSwBkcFaOV/A+XeVYXdvWJbV?= =?us-ascii?Q?cmOx7foMNluYYcL9Sizp34SPUQbfPAVDoJCNlc23Rpoyn3MsTXB15O6riJej?= =?us-ascii?Q?TWpo39wxdtKwLt97vwpQhCU0iLDotybAmALZ9LliPF2nwZ69FOgr6TJi8UKm?= =?us-ascii?Q?h2+1A4fXMxcIuavxjq5WO5nA3WE52ZpYSgNAE4w+s7vFtWmEvcKNrKfvASG1?= =?us-ascii?Q?9/qk9ghQzH24BLBfi0wyi91MCdjADOAd3OGRoiXJ3QM6dvjlK3pHeYtMdfKn?= =?us-ascii?Q?0XRE6CzhioVxjEvt9peBQC7I1EVQbC53UlYhvH1t4MmebcnFf+g6fXDEeWHA?= =?us-ascii?Q?8SUnzKbwJ9t9EgZMHVgBU33BBOUl1gsUHMwMR7hkcOp1rlt7WMJWf+neumct?= =?us-ascii?Q?9ld83/0jdwxRdWAqvbIpEKcgbt80Shx32ZLA96K/czbnncrm11hxenD6gaI8?= =?us-ascii?Q?KtfINl6qfYoyX0XDAD4vXLaQQlbmIIU7B/frjJMcz5fpmfXlyLXxYlq6eKGB?= =?us-ascii?Q?PGvAJPPEASetOxuDU/+RgLI6fUobbwz4tKxFzVNS6ULT67XWUdN42GS4ehSy?= =?us-ascii?Q?REslj8pQDKpMDbMIVMYAcYsAWJGzMHTxhv2cTxkXzWSDFIpMp34WKTAOjNh+?= =?us-ascii?Q?jLzAIiRHF8rPubPAGrPv+6nLCdPjdl5fksUjQ9NroLT9a0pubhrwUi+p13jO?= =?us-ascii?Q?DyyhmVBsyxgg0kdPgG5dW78NqWortc3uW5bKUeutrv45jfBfmlH3N0+/yUpg?= =?us-ascii?Q?Dj6XsyATYszAEu0BCzoPgKtvUQaYkBBnG2de/P3r75vroJ9vpDoWRmULU7h8?= =?us-ascii?Q?cU5frDeIM9/zqKUzKsETS91tQGo3apR1XdxnQCFCu+E3j1fbUkvDsunQLLsL?= =?us-ascii?Q?aW69DYp0QwhXyOccBoTO7OHWmyO6n0G?= X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1441; 6:6C9iMZSnFFxU1ApgjCZWTAvyA8wMPp8+93QLknnmkRs/yblwkjxsbtb7diBhbbshi5ecJ2oGqcHX32RJ+VzKq+uyg6N+DcmDVrGip2GepyOOgP3x9VnCeN502QuQiPSxJshB/m803ldaskTZOt25Uid3IW77fnoE+ZaHz4rsf4K7BTIjCKQ/KnohDL8gz4v93SRLOKznU9bFzc7/xB4JqqI44hKE3FADtv5dOMl/YaCl1C5bS761GlpkOfzVORouL99PYeYDV044gixfGMfxcc8TGVAwnTxhtBZlB8gQFbZD8ulWK22f3p6oqZVvv12UqQP+M8FSmDUGwDgzI3Rssg==; 5:yowPMWcrM9wlS9UpnJT6tojHi+9PA9x5dsHq5Y7qWinz5s0V5YvyCzfinc0LTZrodFQ60VrfcLKVwgVsc0Zq39v7hG8/9gKYV2zqqBYddwepJa3ZDgR8ZNRDjyW91TtqXilSFCWjuWYl3E4EHWLOi6+Y1fOwOmN4JIJgavPVj4w=; 24:FM/py5sjTHQbBI45VWuV61Aqim+LADzDyAFV6MImycpGjj8c5eytF6qio8n9KzdStOwu1Y780gY5z29cXL4o4Wc8O7DX4YgB10cZlydkzhs=; 7:CXYj++hxxiYC5hQrqRT6dOtmEgWuw5hnWSfGwR2gKpVL4DgmBvECH8kjYiqFFlG3D49JWugnMfnXR8SHM9wW7OtfT0jx5RZpSd/tvn4EByZ20Tq2s2DiKA945iD4lQUveweu7QPDXe39iyYcl/s8szqpgWkhz1hj1HuOKwswjlUtr43CWlGl9qXGRjWt+UrLKm0//ru+f5Rl0efzGidtYVRF6+/cOmTv0bIcvMcIJ04= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1441; 20:OI2RumNbhq3Ri0xuRcwXtWDtixU/zg28dGw6JeiGG2btDhalKw5P0whJONfvvSOF9khlFnZFGfWRKdhMrk7ol10tdWjYgAJZ+67cYFzxIgbmm9Y0jss7Wa74AUT5rZYR04lDRfN7vvz1qvWmOyA8mAGYfDv7w53l24yqdfRAB6tsX8BbLVMwIOIyOYN1ZCUoqExbozA/BuxOniU5K973/6ce7xLuWu7TBBORx1S3cOD9mFRknw2gkq8MM35sEgqo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2017 21:15:41.2998 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1441 Cc: "Leo \(Sunpeng\) Li" , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Leo (Sunpeng) Li" Use new_*_state and old_*_state for their respective new/old DRM object states. Signed-off-by: Leo (Sunpeng) Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 80 +++++++++++------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index d4426b3..fe0b658 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -573,12 +573,12 @@ struct amdgpu_dm_connector *amdgpu_dm_find_first_crct_matching_connector( struct drm_crtc *crtc) { uint32_t i; - struct drm_connector_state *conn_state; + struct drm_connector_state *new_con_state; struct drm_connector *connector; struct drm_crtc *crtc_from_state; - for_each_new_connector_in_state(state, connector, conn_state, i) { - crtc_from_state = conn_state->crtc; + for_each_new_connector_in_state(state, connector, new_con_state, i) { + crtc_from_state = new_con_state->crtc; if (crtc_from_state == crtc) return to_amdgpu_dm_connector(connector); @@ -608,7 +608,7 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev) struct amdgpu_dm_connector *aconnector; struct drm_connector *connector; struct drm_crtc *crtc; - struct drm_crtc_state *crtc_state; + struct drm_crtc_state *new_crtc_state; int ret = 0; int i; @@ -644,8 +644,8 @@ int amdgpu_dm_display_resume(struct amdgpu_device *adev) } /* Force mode set in atomic comit */ - for_each_new_crtc_in_state(adev->dm.cached_state, crtc, crtc_state, i) - crtc_state->active_changed = true; + for_each_new_crtc_in_state(adev->dm.cached_state, crtc, new_crtc_state, i) + new_crtc_state->active_changed = true; ret = drm_atomic_helper_resume(ddev, adev->dm.cached_state); @@ -3971,7 +3971,7 @@ int amdgpu_dm_atomic_commit( bool nonblock) { struct drm_crtc *crtc; - struct drm_crtc_state *old_crtc_state, *new_state; + struct drm_crtc_state *old_crtc_state, *new_crtc_state; struct amdgpu_device *adev = dev->dev_private; int i; @@ -3982,11 +3982,11 @@ int amdgpu_dm_atomic_commit( * it will update crtc->dm_crtc_state->stream pointer which is used in * the ISRs. */ - for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_state, i) { + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { struct dm_crtc_state *old_acrtc_state = to_dm_crtc_state(old_crtc_state); struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc); - if (drm_atomic_crtc_needs_modeset(new_state) && old_acrtc_state->stream) + if (drm_atomic_crtc_needs_modeset(new_crtc_state) && old_acrtc_state->stream) manage_dm_interrupts(adev, acrtc, false); } @@ -4011,7 +4011,7 @@ void amdgpu_dm_atomic_commit_tail( unsigned long flags; bool wait_for_vblank = true; struct drm_connector *connector; - struct drm_connector_state *old_conn_state, *new_con_state; + struct drm_connector_state *old_con_state, *new_con_state; struct dm_crtc_state *old_acrtc_state, *new_acrtc_state; drm_atomic_helper_update_legacy_modeset_state(dev, state); @@ -4145,9 +4145,9 @@ void amdgpu_dm_atomic_commit_tail( } /* Handle scaling and undersacn changes*/ - for_each_oldnew_connector_in_state(state, connector, old_conn_state, new_con_state, i) { + for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) { struct dm_connector_state *con_new_state = to_dm_connector_state(new_con_state); - struct dm_connector_state *con_old_state = to_dm_connector_state(old_conn_state); + struct dm_connector_state *con_old_state = to_dm_connector_state(old_con_state); struct amdgpu_crtc *acrtc = to_amdgpu_crtc(con_new_state->base.crtc); struct dc_stream_status *status = NULL; @@ -4375,7 +4375,7 @@ static int dm_update_crtcs_state( bool *lock_and_validation_needed) { struct drm_crtc *crtc; - struct drm_crtc_state *old_crtc_state, *crtc_state; + struct drm_crtc_state *old_crtc_state, *new_crtc_state; int i; struct dm_crtc_state *old_acrtc_state, *new_acrtc_state; struct dm_atomic_state *dm_state = to_dm_atomic_state(state); @@ -4384,34 +4384,34 @@ static int dm_update_crtcs_state( /*TODO Move this code into dm_crtc_atomic_check once we get rid of dc_validation_set */ /* update changed items */ - for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, crtc_state, i) { + for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state, new_crtc_state, i) { struct amdgpu_crtc *acrtc = NULL; struct amdgpu_dm_connector *aconnector = NULL; - struct drm_connector_state *conn_state = NULL; + struct drm_connector_state *new_con_state = NULL; struct dm_connector_state *dm_conn_state = NULL; new_stream = NULL; old_acrtc_state = to_dm_crtc_state(old_crtc_state); - new_acrtc_state = to_dm_crtc_state(crtc_state); + new_acrtc_state = to_dm_crtc_state(new_crtc_state); acrtc = to_amdgpu_crtc(crtc); aconnector = amdgpu_dm_find_first_crct_matching_connector(state, crtc); /* TODO This hack should go away */ if (aconnector) { - conn_state = drm_atomic_get_connector_state(state, - &aconnector->base); + new_con_state = drm_atomic_get_connector_state(state, + &aconnector->base); - if (IS_ERR(conn_state)) { - ret = PTR_ERR_OR_ZERO(conn_state); + if (IS_ERR(new_con_state)) { + ret = PTR_ERR_OR_ZERO(new_con_state); break; } - dm_conn_state = to_dm_connector_state(conn_state); + dm_conn_state = to_dm_connector_state(new_con_state); new_stream = create_stream_for_sink(aconnector, - &crtc_state->mode, + &new_crtc_state->mode, dm_conn_state); /* @@ -4431,14 +4431,14 @@ static int dm_update_crtcs_state( if (dc_is_stream_unchanged(new_stream, old_acrtc_state->stream)) { - crtc_state->mode_changed = false; + new_crtc_state->mode_changed = false; - DRM_DEBUG_DRIVER("Mode change not required, setting mode_changed to %d", - crtc_state->mode_changed); + DRM_DEBUG_DRIVER("Mode change not required, setting mode_changed to %d", + new_crtc_state->mode_changed); } - if (!drm_atomic_crtc_needs_modeset(crtc_state)) + if (!drm_atomic_crtc_needs_modeset(new_crtc_state)) goto next_crtc; DRM_DEBUG_DRIVER( @@ -4446,12 +4446,12 @@ static int dm_update_crtcs_state( "planes_changed:%d, mode_changed:%d,active_changed:%d," "connectors_changed:%d\n", acrtc->crtc_id, - crtc_state->enable, - crtc_state->active, - crtc_state->planes_changed, - crtc_state->mode_changed, - crtc_state->active_changed, - crtc_state->connectors_changed); + new_crtc_state->enable, + new_crtc_state->active, + new_crtc_state->planes_changed, + new_crtc_state->mode_changed, + new_crtc_state->active_changed, + new_crtc_state->connectors_changed); /* Remove stream for any changed/disabled CRTC */ if (!enable) { @@ -4478,10 +4478,10 @@ static int dm_update_crtcs_state( } else {/* Add stream for any updated/enabled CRTC */ - if (modereset_required(crtc_state)) + if (modereset_required(new_crtc_state)) goto next_crtc; - if (modeset_required(crtc_state, new_stream, + if (modeset_required(new_crtc_state, new_stream, old_acrtc_state->stream)) { WARN_ON(new_acrtc_state->stream); @@ -4646,9 +4646,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, struct dc *dc = adev->dm.dc; struct dm_atomic_state *dm_state = to_dm_atomic_state(state); struct drm_connector *connector; - struct drm_connector_state *old_con_state, *conn_state; + struct drm_connector_state *old_con_state, *new_con_state; struct drm_crtc *crtc; - struct drm_crtc_state *crtc_state; + struct drm_crtc_state *new_crtc_state; /* * This bool will be set for true for any modeset/reset @@ -4667,8 +4667,8 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, * Hack: Commit needs planes right now, specifically for gamma * TODO rework commit to check CRTC for gamma change */ - for_each_new_crtc_in_state(state, crtc, crtc_state, i) { - if (crtc_state->color_mgmt_changed) { + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + if (new_crtc_state->color_mgmt_changed) { ret = drm_atomic_add_affected_planes(state, crtc); if (ret) goto fail; @@ -4713,9 +4713,9 @@ int amdgpu_dm_atomic_check(struct drm_device *dev, * new stream into context w\o causing full reset. Need to * decide how to handle. */ - for_each_oldnew_connector_in_state(state, connector, old_con_state, conn_state, i) { + for_each_oldnew_connector_in_state(state, connector, old_con_state, new_con_state, i) { struct dm_connector_state *con_old_state = to_dm_connector_state(old_con_state); - struct dm_connector_state *con_new_state = to_dm_connector_state(conn_state); + struct dm_connector_state *con_new_state = to_dm_connector_state(new_con_state); struct amdgpu_crtc *acrtc = to_amdgpu_crtc(con_new_state->base.crtc); /* Skip any modesets/resets */