From patchwork Wed Sep 23 14:44:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 7250311 Return-Path: X-Original-To: patchwork-dri-devel@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 9B4619F40A for ; Wed, 23 Sep 2015 14:42:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF3C920AD9 for ; Wed, 23 Sep 2015 14:42:03 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id F0C6720AD7 for ; Wed, 23 Sep 2015 14:42:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C92B6E2B9; Wed, 23 Sep 2015 07:42:01 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by gabe.freedesktop.org (Postfix) with ESMTPS id E18696E2B9 for ; Wed, 23 Sep 2015 07:41:59 -0700 (PDT) Received: by wicgb1 with SMTP id gb1so209048649wic.1 for ; Wed, 23 Sep 2015 07:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=2kGzK/ZPGJAi3HIqH5SszOlP+UBM9fBzAxhSoJjlVqM=; b=lURqKoKtM7vKN2V9YpO41mZAqtcu0X2DmHrI9kIaYgTFOxIBjPCCBe3Xs6uZRO7wYw rWLp9t0o+4F2rGB2ETFQjGO0AzayfNx5d3MxZTY/D+jsY90DLEx7cYj3Bx2JiorJv8Li XKPPoa81XfDIU4Zp0mdelveVxSPD2cI88heHY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=2kGzK/ZPGJAi3HIqH5SszOlP+UBM9fBzAxhSoJjlVqM=; b=M43FaeR5OiGqtpxXzyA9wvb7Nn4EMtCvBKlgMQf/rdIPWbCVCNouUaDVcpJaMbI6TF fsY6X+x1549IPy+ZH9niDRotZDfZVeC38a10IPsWRXksxgJWiMoMXD2hHlTbOjgy5lyQ pTG8FwDMHaST7jKtAEtbEyorSN+NhgMbiS8An3lIyZF0RimYU8263cF1/VJptUvbp0BB QrveE7t+BdPHhYkf9CesoL8KI7I+OKnZ8TP6R+CTmXyeQlS0E7yXEhRj3VZdWtU4oq+U CIBk5Q10dv9IkKYLGNbxRgRY+wb1sKRLoTGU+DlXLcglN5Vt7RSsEUTzcybKrzg63Fx4 J0sA== X-Gm-Message-State: ALoCoQn1gV/njEw9okfDydLTEXQipFk8P4J0gxIGQAA4/gjQES5B9Qa5TEgxZ06qbzBMTJpoIPeS X-Received: by 10.194.123.2 with SMTP id lw2mr25552281wjb.48.1443019318448; Wed, 23 Sep 2015 07:41:58 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:56c9:0:22cf:30ff:fe4c:37d6]) by smtp.gmail.com with ESMTPSA id r9sm7580274wjz.35.2015.09.23.07.41.57 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 07:41:57 -0700 (PDT) Date: Wed, 23 Sep 2015 16:44:50 +0200 From: Daniel Vetter To: Borislav Petkov Subject: Re: WARNING: CPU: 4 PID: 863 at include/drm/drm_crtc.h:1577 drm_helper_choose_encoder_dpms+0x88/0x90() Message-ID: <20150923144450.GD3383@phenom.ffwll.local> Mail-Followup-To: Borislav Petkov , Alex Deucher , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , Maling list - DRI developers , lkml References: <20150921133126.GA25475@nazgul.tnic> <20150922202105.GB3453@pd.tnic> <20150923072523.GB3383@phenom.ffwll.local> <20150923085950.GA3440@pd.tnic> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20150923085950.GA3440@pd.tnic> X-Operating-System: Linux phenom 4.1.0-2-amd64 User-Agent: Mutt/1.5.23 (2014-03-12) Cc: lkml , Maling list - DRI developers , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 On Wed, Sep 23, 2015 at 10:59:51AM +0200, Borislav Petkov wrote: > On Wed, Sep 23, 2015 at 09:25:23AM +0200, Daniel Vetter wrote: > > Strange thing is that I've tested this on a radeon over here and I don't > > see this backtrace ... wut. Below diff should appease the backtraces at > > least. > > Doesn't look like it. sorry I sprinkled the locking stuff in the wrong places. Still confused why the resume side doesn't blow up anywhere ... Oh well. New patch below. Thanks, Daniel diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index d8319dae8358..f3f562f6d848 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1573,10 +1573,12 @@ int radeon_suspend_kms(struct drm_device *dev, bool suspend, bool fbcon) drm_kms_helper_poll_disable(dev); + drm_modeset_lock_all(dev); /* turn off display hw */ list_for_each_entry(connector, &dev->mode_config.connector_list, head) { drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); } + drm_modeset_unlock_all(dev); /* unpin the front buffers and cursors */ list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { @@ -1734,9 +1736,11 @@ int radeon_resume_kms(struct drm_device *dev, bool resume, bool fbcon) if (fbcon) { drm_helper_resume_force_mode(dev); /* turn on display hw */ + drm_modeset_lock_all(dev); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); } + drm_modeset_unlock_all(dev); } drm_kms_helper_poll_enable(dev);