From patchwork Thu Jul 17 14:16:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 4575851 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.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A504EC0514 for ; Thu, 17 Jul 2014 14:17:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF7C52011E for ; Thu, 17 Jul 2014 14:17:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id D16142010F for ; Thu, 17 Jul 2014 14:16:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 512916E688; Thu, 17 Jul 2014 07:16:59 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 9B8A86E688 for ; Thu, 17 Jul 2014 07:16:57 -0700 (PDT) Received: by mail-vc0-f177.google.com with SMTP id hy4so4689321vcb.36 for ; Thu, 17 Jul 2014 07:16: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:in-reply-to:references; bh=zWk0c+6P3jawojdRYQDT4KPKjPDXzD27GXRV1tle1zs=; b=LGkITMMAKvrE3u4Dx6c81kCQ5T9mtjurDq6a1Px/+TUpZXv2mitb5n6MOuNzXUWa3o I+HejaDA6BpSlDnIsr64TVXMBH2ZAUFsnCP3qunSLgAukU22LyaOLHtYf60VzmD0jgGo c/9XePXZEst/fmQw4CFSJ69kZFmroy3gig1jZwV1NHtduMwcyPxX76ptyIwUeH+CcpqD pNQsI8AqRiOj7/ILdWejWTyY5zwPJ3ZjJRlFIwdKHxAl97r+my8jflHMtGqNJD6pMGfH m/L8/xJpsspBDsCWJoQxPbwxkMTgWCpNyK2HiTDH9RdSE974x2XJ0lZbY+jHXo+S8ZGm Hz8Q== X-Received: by 10.52.164.11 with SMTP id ym11mr15308649vdb.74.1405606616174; Thu, 17 Jul 2014 07:16:56 -0700 (PDT) Received: from localhost.localdomain ([177.132.8.34]) by mx.google.com with ESMTPSA id po6sm4376716vdb.12.2014.07.17.07.16.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 17 Jul 2014 07:16:55 -0700 (PDT) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Thu, 17 Jul 2014 11:16:39 -0300 Message-Id: <1405606599-3248-1-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 2.0.0 In-Reply-To: References: Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH] drm/i915: remove plane/cursor/pipe assertions from intel_crtc_disable X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 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, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Since we merged runtime PM support for DPMS, it is possible that these assertions will be called when the power wells are disabled but a mode is "set", resulting in "failed assertion" and "device suspended while reading register" WARNs. To reproduce the bug: disable all screens using mode unset, do a modeset on one screen, disable it using DPMS, then try to do a mode unset on it again to see the WARNs. v2: The first version of this patch changed the assertions to also check the power domains. Daniel suggested that it would be better to just remove the assertions: "The modeset state checker will already notice when we've failed to turn off the pipe. And we check cursors and plane state in the enable sequence, too. Since we use these asserts a lot to lock down the precise modeset sequence I actually prefer if they're a bit dumb and don't check the power wells." Testcase: igt/rpm_rpm/dpms-mode-unset-lpsp Testcase: igt/rpm_rpm/dpms-mode-unset-non-lpsp Signed-off-by: Paulo Zanoni --- drivers/gpu/drm/i915/intel_display.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index cb40a94..f4ef59e 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -4930,10 +4930,6 @@ static void intel_crtc_disable(struct drm_crtc *crtc) intel_crtc_update_sarea(crtc, false); dev_priv->display.off(crtc); - assert_plane_disabled(dev->dev_private, to_intel_crtc(crtc)->plane); - assert_cursor_disabled(dev_priv, pipe); - assert_pipe_disabled(dev->dev_private, pipe); - if (crtc->primary->fb) { mutex_lock(&dev->struct_mutex); intel_unpin_fb_obj(old_obj);