Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp117178imm; Tue, 3 Jul 2018 15:09:22 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL96ZOvsFKNfopzlEd4D+SuLUIz7LzPfK77ueZGrgrerbzBH4pz9L/M0ZNMA8r4QC0bRkDJ X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr32336613plu.22.1530655762775; Tue, 03 Jul 2018 15:09:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530655762; cv=none; d=google.com; s=arc-20160816; b=F7kE+beDNikumXooNmvwNKL2MdvZxgcuu9Mddg6bauHGYpLRg2LUh3gPTByr2cNQSv +F1U+ktmWPuKi8NrNaBbTjNp2GM6Vns/5AOEVDQLLIht5x0/JM1QV3G5LFBzHsWGJgE/ iuylkZGTVBd5Q/E1X9fj6eFdr4yEAts/UdxsOcbRaUmT+UBuG3eo4WCPtM9F2DPKJDyi b1RwP0jZPB5PW6Spt/KxRi3Gcmq5cD3DpLXUh7KKHP+y1us2xcA2w2l8bgYUxdUIXrS+ J1MVkCrZbUxiK00k4N62W9Rl4XPautzxYdwNqe8/U6BIS9IA/K6so5f3iPcxag/hgZKu oVjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=NOs2LrWXvRHNvBKXyhVkJ6/q2h1LELvLhP68tsRrMc4=; b=mlsolw8iUoHUeFiZmvT/88s+VyUUiLFjusFXqm11Z/MCV2AAAQuTATZlnI9tcHcNFF 4GoLl92eG4hQQEg+DOLYAAIHxZ01zTj2K6LUJVbEFjzZbY2tcbaLmFOVdL/N7gJ4SXmn BArQr4qbiG5yvgYyZczxibXYsIsxZePnNOe2PNQvJkJcJyM35HubLmsWeb4+V3cOtiyO aaCGNWciKE87OeZMiF1SXWtkmmiFB6j+9YmL2kT79Dur18Cpe8pKFKlfCF653+Vt3Fyx x1jav44MIZDZPSpmXfmIQPUHAftNxzIXmgYjzIsfZ5xP7orTD30MvasyAQA+TSPlMe8p ROFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q13-v6si1915682plr.220.2018.07.03.15.09.07; Tue, 03 Jul 2018 15:09:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933589AbeGCWGb (ORCPT + 99 others); Tue, 3 Jul 2018 18:06:31 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35526 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933675AbeGCWGJ (ORCPT ); Tue, 3 Jul 2018 18:06:09 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 21FF7DFDD; Tue, 3 Jul 2018 22:06:09 +0000 (UTC) Received: from malachite.bss.redhat.com (dhcp-10-20-1-11.bss.redhat.com [10.20.1.11]) by smtp.corp.redhat.com (Postfix) with ESMTP id C318BFF5B; Tue, 3 Jul 2018 22:06:08 +0000 (UTC) From: Lyude Paul To: nouveau@lists.freedesktop.org Cc: stable@vger.kernel.org, Ben Skeggs , David Airlie , Daniel Vetter , Maarten Lankhorst , =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= , Archit Taneja , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm/nouveau: Fix runtime PM leak in nv50_disp_atomic_commit() Date: Tue, 3 Jul 2018 18:06:00 -0400 Message-Id: <20180703220602.16664-3-lyude@redhat.com> In-Reply-To: <20180703220602.16664-1-lyude@redhat.com> References: <20180703220602.16664-1-lyude@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 03 Jul 2018 22:06:09 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Tue, 03 Jul 2018 22:06:09 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lyude@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org A CRTC being enabled doesn't mean it's on! It doesn't even necessarily mean it's being used. This fixes runtime PM leaks on the P50 I've got next to me. Signed-off-by: Lyude Paul Cc: stable@vger.kernel.org --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index d9da69c83ae7..9bae4db84cfb 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1878,7 +1878,7 @@ nv50_disp_atomic_commit(struct drm_device *dev, nv50_disp_atomic_commit_tail(state); drm_for_each_crtc(crtc, dev) { - if (crtc->state->enable) { + if (crtc->state->active) { if (!drm->have_disp_power_ref) { drm->have_disp_power_ref = true; return 0; -- 2.17.1