Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2690169pxj; Mon, 31 May 2021 08:19:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJykMm45DU3+KmJZ7bX7ETSK4RK6IH+DTZJU6eE9e7HjseV4iR/vfbKPCwYvacfZ9MYmlfqt X-Received: by 2002:a17:907:2bd6:: with SMTP id gv22mr6522532ejc.431.1622474389976; Mon, 31 May 2021 08:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622474389; cv=none; d=google.com; s=arc-20160816; b=Zwpv9OEy+vv9kAh+KKmO8HxAzbS4N6h2ZbkYRmU/a1nm7TxRmFKkElL4i6On/RRrmx himxOjydlLcA4MBwjo3KIQKRatllxVsewVGQa4naDVs3Z4Z1KMNH/R40jVWSCykc0lby EyhScAR3L0FU8xrV3YIjvZasA7sxDiq9a3OOHFsO44a4Ml/3oW2zaetbZxNmNcd0D70v PaxpFzftCM6tW/28KXdPtT5ahf4M/OoQ12ZUxxCjcMlsL+kkvZqHaySSkU/3h1WuqssF 9hvbjpNkyRjMcANQhFvsYO9K7uDuAl2uU1eoAMFLEk2imexwS77HckS1Q8dmnwZ4jdwU RroQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=JeKxx9w977x1QKZ03nKmueaNNldf64MK6GxKvOLbhOs=; b=MUMousWBsAFBnwJS4Uln0zW0j2g4k7H0ph005Nxf6IOBQrX1TQjC/E+fowJlHiPjcb 33gvyaamvPreU2QhSnYbeRHrXTxkG1V+g2/SCJvNfeM0h/0pyBjC8D5qPAos4unImjTM 67ovP2y8eMvMhFUenKwb+PaZWfmuxOJ2JbXH5e1aG1ZqvtMaiM9EVJK60gs35O6naIwI tpbX/jNgWPPEzzqs9MUIxTyOkPLmBGM4nDKYh8OBcakCEXduMvAbAzfwMsRxkqyxgc9k HFIhGiYyaS/PIz4vle6Cj+crh2m8mP+BEfSvSL4MHNeWvINtRUBjGcudfkX9V/TzuPhV TWIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="u30/iWSr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gb35si12286025ejc.209.2021.05.31.08.19.26; Mon, 31 May 2021 08:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="u30/iWSr"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234290AbhEaPTY (ORCPT + 99 others); Mon, 31 May 2021 11:19:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:43916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233664AbhEaOO4 (ORCPT ); Mon, 31 May 2021 10:14:56 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7100961999; Mon, 31 May 2021 13:42:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468551; bh=3N0ezVeZkrEOInXsqK+PFhmFlFUqU5U/DaZLgbTEMLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u30/iWSrSiCfHggXhNmboHutJUWzhL1VPR87hHnaqtD8pISjj+D35brzMJue1nKTU wxzjZkzdmXmlpd633C3G/32ilENTpyDhiAgAN4ujLVqSkUOo49Cum3zHt68MJOsOi6 jxrqRl6uU3OQoJDUV0gc0ikDEHcfsjkc5cx8z7sQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, James Zhu , Leo Liu , =?UTF-8?q?Christian=20K=C3=B6nig?= , Alex Deucher Subject: [PATCH 5.4 033/177] drm/amdgpu/vcn2.5: add cancel_delayed_work_sync before power gate Date: Mon, 31 May 2021 15:13:10 +0200 Message-Id: <20210531130649.068609990@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130647.887605866@linuxfoundation.org> References: <20210531130647.887605866@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: James Zhu commit 2fb536ea42d557f39f70c755f68e1aa1ad466c55 upstream. Add cancel_delayed_work_sync before set power gating state to avoid race condition issue when power gating. Signed-off-by: James Zhu Reviewed-by: Leo Liu Acked-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c +++ b/drivers/gpu/drm/amd/amdgpu/vcn_v2_5.c @@ -302,6 +302,8 @@ static int vcn_v2_5_hw_fini(void *handle struct amdgpu_ring *ring; int i; + cancel_delayed_work_sync(&adev->vcn.idle_work); + for (i = 0; i < adev->vcn.num_vcn_inst; ++i) { if (adev->vcn.harvest_config & (1 << i)) continue;