From patchwork Fri May 27 09:35:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ying Liu X-Patchwork-Id: 9137979 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 EC80B6075C for ; Fri, 27 May 2016 09:36:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DCE4D28093 for ; Fri, 27 May 2016 09:36:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D1EC328160; Fri, 27 May 2016 09:36:25 +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.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E96628093 for ; Fri, 27 May 2016 09:36:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8191C6E10D; Fri, 27 May 2016 09:36:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1on0056.outbound.protection.outlook.com [157.56.110.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 528AF6E10D for ; Fri, 27 May 2016 09:36:21 +0000 (UTC) Received: from BN3PR0301CA0046.namprd03.prod.outlook.com (10.160.152.142) by BY2PR03MB474.namprd03.prod.outlook.com (10.141.141.149) with Microsoft SMTP Server (TLS) id 15.1.492.11; Fri, 27 May 2016 09:36:18 +0000 Received: from BN1BFFO11FD053.protection.gbl (2a01:111:f400:7c10::1:120) by BN3PR0301CA0046.outlook.office365.com (2a01:111:e400:401e::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.506.9 via Frontend Transport; Fri, 27 May 2016 09:36:18 +0000 Authentication-Results: spf=softfail (sender IP is 192.88.168.50) smtp.mailfrom=gmail.com; linux.ie; dkim=none (message not signed) header.d=none; linux.ie; dmarc=fail action=none header.from=gmail.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning gmail.com discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD053.mail.protection.outlook.com (10.58.145.8) with Microsoft SMTP Server (TLS) id 15.1.497.8 via Frontend Transport; Fri, 27 May 2016 09:36:17 +0000 Received: from victor.ap.freescale.net (victor.ap.freescale.net [10.192.241.62]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u4R9aBUZ023514; Fri, 27 May 2016 02:36:13 -0700 From: Liu Ying To: Subject: [PATCH] drm/atomic-helper: Do not call ->mode_fixup for CRTC which will be disabled Date: Fri, 27 May 2016 17:35:54 +0800 Message-ID: <1464341754-7087-1-git-send-email-gnuiyl@gmail.com> X-Mailer: git-send-email 2.7.4 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131088153779467967; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(189002)(9170700003)(189998001)(86362001)(575784001)(4326007)(6806005)(87936001)(87572001)(104016004)(105596002)(8936002)(229853001)(2351001)(50986999)(33646002)(110136002)(50226002)(8676002)(81166006)(36756003)(11100500001)(76482005)(92566002)(82202001)(5003940100001)(19580395003)(5008740100001)(61266001)(47776003)(19580405001)(6260500002)(2906002)(48376002)(50466002)(586003)(73392002)(81442002)(73972006)(106466001)(83322999)(1220700001)(77096005); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB474; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; MLV:sfv; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD053; 1:PeqY/1RJAgH7kwWFvUUB6Nrh1n2M7y6LnoQPJwgZ1yXQZHzBQ6NQ7L1v4v68MnLHtBOxDM1HcoFwEY8N95Qq/SDZDrj+X45mWO89jybGlbr46xKprZJBVobBhC4nlcwjm7hbp8OSsCR4r5n+nxfDItmdTjOGQeExE9meANqfcALR1fgQNNDPaRaStDV/HnijKCVyuHzRSEtqAnPQMgr1B5MvPZc8ljaUbQlR6iQ2dpS81pvvY7IHEefaAb9h/p5HV0KfNF6/ozCoocnkv5AJU5VPAHvQE+E+2cn1UZKJWOsqkSjvJafa7nJDqY1AnvHQ1m30CsD8lZCL1QoogTtYJMzYIo6m2YFNzQbfyVVoqszvMLRYLDZYGXMNxuOiboGTSigyE5CmNpBdmdyMB+xlQe7OSexYW2iEtUXPTC93GuO+PAGyvUXZu3OIGY6YaLyf6SYK2/QY6P8dt9qvXsTVT7pvI0ewS+lxXZSM04nkea35DbhIDrnMoDsUr2opCLfV0c0XQF4+vDoJsE3Wk2UQPIK7g3Ql8BHWAgEHeCzMd4W19BA6oRWcotPDqTCQ/8HZ MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 891537fe-f8b2-400b-1562-08d386125abe X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB474; 2:WNatmKojNzS8vBiNcv/HMi2xp/wk4Czm7Oc1uQQ6Aeewn45rVjGqeSO06H1B0MDCc67a+DfjDQO682NCaPvnQDyPeZE2vukSFNRIDVNaexzFSZBKVUl1e1a1QOetadc63IRHpLuRSQcAnco2UovNYvS15UYXm+1JHBJl1TSSRRpDulEvKYS5WUrGfrjccoRF; 3:iGLnIHT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-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13024025)(13023025)(13015025)(13018025)(13017025)(8121501046)(5005006)(3002001)(10201501046)(6055026); SRVR:BY2PR03MB474; BCL:0; PCL:0; RULEID:(400006); SRVR:BY2PR03MB474; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB474; 4:fINp87hymn2hj8V0l0OYxEyqGCVVPsm4hwQTtNkIEQN6MQBH4UjH58RjP30JCqwnQ7ILNnmUpUX44FxqgCMz1VAVZEays2p0yrnu/XESo26ts0qtU/9e71jAL/kTm39Ow/tDZofTNF1LGiZyNhNHbWhFrAcagQBUZ+oRJkc4QZO+AhT1Hf9fHvU46zkCTIH6mLapGRPKn8Y6Hqm6nvYwkneRSiizE3dJrPWdoVWNEkPC+QyTdQc4707pgbGAPJXarUDHAobBDZ/jOIub7DNeqP+WVTrg10I2EqEWhpw6c7lCEs1bb0mrHXL5Xp+HdtQyixjNa6lnaMtQ8Zzm9F1g7QtdEmECmvz7U03t9dLNhoe049JSx+nahAMaWWMvgdbGvF9Oo2X+OBX1WL9tpaRUFl4QFcM7yk/UKKNw1+A16qhPbACm6hgMDEhzVejkOC1wgUEx81NJ89tVd+ikuXtELhXI9llfmULTrGCsEV3Lj9I= X-Forefront-PRVS: 09555FB1AD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB474; 23:HrqJSpIHR/IkH6uqaOva9enMTbnFMd4MkltvByWmF7?= =?us-ascii?Q?vx/GorxH2DPNybPJvDc4Oz8Fq4jHy68/kHDMlpbrNcrDjljwLbWWRAcPXnJv?= =?us-ascii?Q?Dr0bu2bWU4sL7Yh08HEO66qlABEy5ymPi2cw+A8Wset0PSwxF+2L6/nG3K6F?= =?us-ascii?Q?JbV7kALs8cJYSgL6mqR8o+asH3D6DRmBHhDKwWg8ratZ/M/mZLbnfzLskqq3?= =?us-ascii?Q?6odd1amuIOronEsh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= =?us-ascii?Q?i40gz1NAzJLoG0rVQ3Kb0QFzbEixEBEQoMpPqrDj2fAdG7kkKkBJ7tBLEvyf?= =?us-ascii?Q?mfuam8pvhbgK0=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB474; 5:3/KQK75JZ4BH30wj3b1IAMFibiHnFvH+XO6LWDTR7ttWwCAyYYwWHmJg6h5ZdqrScrr+mjBEY/0T5zK4VLgVurBDPCYOS5afEyRkF+8oA4p0xmMx81FUOV85FCLh/4bxoVMb9iWbB30ku9cWSMT8uKYKBL7uQEUC6ntIJDhckKY=; 24:d66m7tqriQmysb9iWxmAutuW4bfsbCeUoJPiaGuKRtvHamQPSQFMu6mhQ2kMy/Ro6mesK/iH5ns7W94bhKQ0WKo1D63iZegGn0aimobDDKY=; 7:dVTllmH7slNMEz7ZfG9vUMidfhM5+nF3tnoppsX1Rv/9mUa/6xOxYkPWbvsX2ZdtINFukAwzyIWUVgg8uZm5BhwMCsateku0p0dTkq7fIzJ/UsoG2i1mq2p2RYfM4L8+XX69su50bLBn38SJtYxe28yDc6Q91bbNbTFJ+yLiryG5Hw0aRG1ztK5YUvfqRr5t SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2016 09:36:17.7596 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB474 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 When a CRTC is going to be disabled, it's state may contain a display mode with zeroed content. This could be reproduced by HDMI cable hotplug out operation with legacy fbdev support in dual display cases. It would confuse driver's CRTC callback ->mode_fixup and make the total state be rejected. So, let's don't call the callback for the CRTC. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_atomic_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index ddfa0d1..939df90 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -414,6 +414,9 @@ mode_fixup(struct drm_atomic_state *state) for_each_crtc_in_state(state, crtc, crtc_state, i) { const struct drm_crtc_helper_funcs *funcs; + if (!crtc_state->enable) + continue; + if (!crtc_state->mode_changed && !crtc_state->connectors_changed) continue;