Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp538431imm; Fri, 22 Jun 2018 00:40:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJIASL4en+W0qfQNzHtaLdykRJxz2fDFIE1OkP93Lt3EI+b/W161vl+qFpvbGLfUIrGGh6Y X-Received: by 2002:a17:902:5402:: with SMTP id d2-v6mr543372pli.38.1529653201497; Fri, 22 Jun 2018 00:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529653201; cv=none; d=google.com; s=arc-20160816; b=bPQ8oOBp5Ph2s/vfp0f22adJ2R28zouc4YoCH5lkk7w9ofqibOw7kx8DBqb+508PVz zL8ubdLwhV9RzGFelI7y3cOAyig92oduL+4wxmmuf2b/mOcP+zPWBKFJ9vKIq6OhBmXJ n3usPbkRZI2AR0ePYkPX20UyOlQV/8DYhqkWXevTg2rGcn6sBVE4vB2WBaUbksbFizUF T4s38czTo/mWs6G3Bz1rdF8pLdwoPlRFtTKstPzHq6J3aHb8t8GmPYa6K10SN5fiujpF JlBVYJMd82VnHJFp1i2v05Hs1CptDJJ/Sscl+rphPbQLfe+6GUad/SDMNsIZHIj5Fiwx nkBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=BVgDlAd5dn/OMHCEAee32wHQPjposFaQRQtqEx5N+EA=; b=AUzQQX39NFyWB7e1/FUzqsiVZlMHEWFLMh9J9W7HMp6HhZ9LwfVy39X7wg+mYERXcd OfMe+FAvGce3jG3thq+yCd4fjadsngB6dEVfL308A5rXBd/vw7H7S5mU6IK2f4P9dK3Z R7EM3WPPs9M+WtkhT+zm5AJ3dKwLGTdHUk/qZwaKWHkyag3joW1n8EWa6AS3Y+jxuPNR S65VHc9F55NfzFN+3WslZPcMvxJ3SPMlI0yrmujBF7+QrRuMdyL2ZRg1rB7K2GW5sieh JZ+f0BVM/AZeFVpHE6ry2L/hURiTrxkbOTpFidL7YfFBhNixoxfdeoAwk5Eux/A1f7Uh Uriw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si1452179plc.452.2018.06.22.00.39.47; Fri, 22 Jun 2018 00:40:01 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751394AbeFVHig (ORCPT + 99 others); Fri, 22 Jun 2018 03:38:36 -0400 Received: from mail.netline.ch ([148.251.143.178]:44816 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbeFVHie (ORCPT ); Fri, 22 Jun 2018 03:38:34 -0400 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 9AE3B2A6046; Fri, 22 Jun 2018 09:38:32 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id iWk7uzzz1_Y3; Fri, 22 Jun 2018 09:38:32 +0200 (CEST) Received: from thor (252.228.127.176.dynamic.wline.res.cust.swisscom.ch [176.127.228.252]) by netline-mail3.netline.ch (Postfix) with ESMTPSA id 611812A6045; Fri, 22 Jun 2018 09:38:31 +0200 (CEST) Received: from localhost ([::1]) by thor with esmtp (Exim 4.91) (envelope-from ) id 1fWGeM-00086r-Rf; Fri, 22 Jun 2018 09:38:30 +0200 Subject: Re: [PATCH] drm/amdgpu: Count disabled CRTCs in commit tail earlier To: Lyude Paul Cc: amd-gfx@lists.freedesktop.org, "David (ChunMing) Zhou" , Andrey Grodzovsky , David Airlie , Tony Cheng , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Shirish S , "Leo (Sunpeng) Li" , Alex Deucher , Harry Wentland , =?UTF-8?Q?Christian_K=c3=b6nig?= References: <20180621204832.22448-1-lyude@redhat.com> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Message-ID: Date: Fri, 22 Jun 2018 09:38:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180621204832.22448-1-lyude@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-06-21 10:48 PM, Lyude Paul wrote: > This fixes a regression I accidentally reduced that was picked up by > kasan, where we were checking the CRTC atomic states after DRM's helpers > had already freed them. Example: > > [...] > > So, we fix this by counting the number of CRTCs this atomic commit disabled > early on in the function before their atomic states have been freed, then use > that count later to do the appropriate number of RPM puts at the end of the > function. > > Fixes: 97028037a38ae ("drm/amdgpu: Grab/put runtime PM references in atomic_commit_tail()") > Signed-off-by: Lyude Paul > Cc: Michel Dänzer > Reported-by: Michel Dänzer Actually, it was reported by Tom St Denis . With that fixed, Acked-by: Michel Dänzer (needs review by DC folks) -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer