From patchwork Wed Mar 18 19:15:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 6043611 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA540BF90F for ; Wed, 18 Mar 2015 19:15:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 30DA22043C for ; Wed, 18 Mar 2015 19:15:59 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 2A76120431 for ; Wed, 18 Mar 2015 19:15:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 523046E8C6; Wed, 18 Mar 2015 12:15:57 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qg0-f54.google.com (mail-qg0-f54.google.com [209.85.192.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 4F9716E8C6 for ; Wed, 18 Mar 2015 12:15:56 -0700 (PDT) Received: by qgh62 with SMTP id 62so46255440qgh.1 for ; Wed, 18 Mar 2015 12:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; bh=cGD32ER2kQ/mrEETTzI0AAzQTUo8PybiT30OQfphSM0=; b=zZ01irsEuTtkuUSfMjGEevDFpaAL05IcBnux8Tezz/7I0idCQbtJLnE4C13A4JOe06 rf7E5xfzUbmnzbnwJPXoW25DCNAMURnBEhJFjsU4DH94gnI9kN0+KAfxcY6M2uiHmErz HKInclJvcNVphnpCaZ3tb8T9pUC2lqnZatmtavihun7My8SSNyA5M5Fg/JT87ixxiD88 5kvNL44rVUwZy7QvNlYL3iOYy7c2A6T6+HQcb0J7KgdGmS4Bd0teNOe1O9T6l+fspoo0 w4Qv2PblNrxB4JppFJwxssPo+b/Tae8CwxVE1jGmBgz5h3oN2k8rWK3gnuamGj11YI6/ fKTQ== X-Received: by 10.140.147.66 with SMTP id 63mr90767754qht.35.1426706155973; Wed, 18 Mar 2015 12:15:55 -0700 (PDT) Received: from localhost.localdomain ([177.92.55.65]) by mx.google.com with ESMTPSA id f77sm12414165qka.9.2015.03.18.12.15.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Mar 2015 12:15:55 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Wed, 18 Mar 2015 16:15:07 -0300 Message-Id: <1426706107-1695-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Cc: Paulo Zanoni Subject: [Intel-gfx] [RFC] drm/i915: don't wait_for_vblank if the CRTC is disabled X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: Paulo Zanoni Otherwise we'll get a WARN from drm_wait_one_vblank() saying that vblanks are not available (since they were already disabled in crtc_disable()). This is certainly a regresison, but QA couldn't bisect it due to other regressions breaking the bisect. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89550 Testcase: igt/pm_rpm/legacy-planes Testcase: igt/pm_rpm/legacy-planes-dpms Testcase: igt/pm_rpm/universal-planes Testcase: igt/pm_rpm/universal-planes-dpms Cc: Ville Syrjälä Cc: Matt Roper Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) I'm not really sure if this is the best way to fix the regression. Ville and/or Matt should provide some comments here. diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f1c0295..f2f7e81 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -12193,7 +12193,7 @@ static void intel_finish_crtc_commit(struct drm_crtc *crtc) intel_runtime_pm_put(dev_priv); - if (intel_crtc->atomic.wait_vblank) + if (intel_crtc->active && intel_crtc->atomic.wait_vblank) intel_wait_for_vblank(dev, intel_crtc->pipe); intel_frontbuffer_flip(dev, intel_crtc->atomic.fb_bits);