From patchwork Fri Nov 13 13:45:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 7611521 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C24669F2F7 for ; Fri, 13 Nov 2015 13:46:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EC89E20619 for ; Fri, 13 Nov 2015 13:46:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EB9AB20461 for ; Fri, 13 Nov 2015 13:46:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753392AbbKMNqG (ORCPT ); Fri, 13 Nov 2015 08:46:06 -0500 Received: from mail-yk0-f175.google.com ([209.85.160.175]:33644 "EHLO mail-yk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753238AbbKMNqF (ORCPT ); Fri, 13 Nov 2015 08:46:05 -0500 Received: by ykdv3 with SMTP id v3so146319520ykd.0 for ; Fri, 13 Nov 2015 05:46:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=from:to:cc:subject:date:message-id; bh=u2Ay3OPDNOyxJYTRKFfW1sB7XcrW6qsVjLb012U90BI=; b=M5+J15Jn4oC0/jQ3IVczi0IgvzRUxC4ij8i9TxC63BpmQMaOnhAD1b8PUr9d9osTPv XCqENA3J/C4LTMGGIoz9lUspLqJaH1MSuEpMGVjYe5UpHdvEyza74GMhT9HKA1monVUN EAMKR5PI/2w3QV39v2BdRWhzuoCu46UmluXcgtsZTbp6I/OTwC5kVeHjl9503IMUoHmK d41kXfgWhFxYiObZ1xxBwO3qdRm4xFSNNUUwwlcpwtehPLTdXSLNSf/vn8wcyTqF90w3 gH4nueKLe9auObwCFeIRhSXsLxNa5WKjWxtQ3k99l1Y/oXql+eKKQSughN6dxsi2xljb q16A== X-Received: by 10.13.214.19 with SMTP id y19mr21744153ywd.63.1447422364153; Fri, 13 Nov 2015 05:46:04 -0800 (PST) Received: from jade.localdomain ([187.64.235.140]) by smtp.gmail.com with ESMTPSA id i201sm21440619ywe.10.2015.11.13.05.46.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Nov 2015 05:46:03 -0800 (PST) From: Gustavo Padovan To: linux-samsung-soc@vger.kernel.org Cc: dri-devel@lists.freedesktop.org, Gustavo Padovan Subject: [PATCH] drm/atomic: only run atomic_check() if crtc is active Date: Fri, 13 Nov 2015 11:45:58 -0200 Message-Id: <1447422358-18891-1-git-send-email-gustavo@padovan.org> X-Mailer: git-send-email 2.1.0 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Gustavo Padovan Fixes an regression added by 3ae2436 (drm/exynos/mixer: replace direct cross-driver call with drm mode) and while this regression was caused by a change in the exynos driver it makes sense to add the check on atomic core to benefit other drivers as well. The whole atomic update fails if the exynos hdmi display is not present/active. Add a test to only run atomic_check() if the CRTC is active. Signed-off-by: Gustavo Padovan --- 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 0c6f621..7e3cb48 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -510,6 +510,9 @@ drm_atomic_helper_check_planes(struct drm_device *dev, for_each_crtc_in_state(state, crtc, crtc_state, i) { const struct drm_crtc_helper_funcs *funcs; + if (!crtc_state->active) + continue; + funcs = crtc->helper_private; if (!funcs || !funcs->atomic_check)