Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2727532pxj; Mon, 31 May 2021 09:13:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxWCT5KX3ihQjkddKCiZoOe27AwBAkdJGKalp+POoKZkArkSjvV6KWZiFyyPqM+f48Bv6fu X-Received: by 2002:a92:7303:: with SMTP id o3mr5494614ilc.203.1622477612993; Mon, 31 May 2021 09:13:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477612; cv=none; d=google.com; s=arc-20160816; b=hKjkS7tCvQDkTxG+BcOnoot4TYK/DhOX0Hwe/mgN9bFsXnm8mZNS+mf3IdhBmQcYPL 2YUxa3YSirD0Vj/xQ8AnGdFXp8eGlf9wm8wwd3Z4Nq5MRuUospABaDgTnCrFic9OBbC7 MrGL+VMJDnEvEGFX0VdbI8htVfZj7ULIHXmTmy4u0eg/Fv7zTqmF2hTN9MsLdVmguDtT ZhaHQG4Ik6YpLqtgmz3xjeqxt5QPNt6kBfe3X3feaL1IoRLIhBBJ5SvJCxqi5rvG7Rh0 9FBxtJDmbWmGC52ebqVWHsl2nSngcgi5YWDYj+OzdMTlZAlLL4lU6ua+RYWXvod1pZIs 0zsA== 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=ebL99+IUWub/OCUGnYFdLKm5jCMyNgUTjMm/9bAvZ6c=; b=XrsLh1c75k4nrLm3fK2nT9rdh1HkR58hWG81b2nJNVe1Tw68655t63Z/jJfZUTAaXN 29DLAOag4issq+w1H5YNU+MX2P4uAEaka+WCrpeASOKfH8JDRnV0qiokLXIaPTCbojMX mmROCLNyBEqdAPEh/yhLSLDZHzsQ8ityc6bnu54rtj267IDsUpVIpRDOjMdX9WmCDZwd 7XnrmI+yl11rXvbBSVWcFlGMGYDwPF55/rincsNqQK2CDfS9mZKhAtIxT5GsiDUgpie8 czL5Np06ZXqSGdHO27JQHgvRY/NNL7cWYt+0/+aBskEt1z1Krqt+Ud5M/iAzvMSQpQWa sIVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PGLGEFmI; 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 m1si14058655ilu.13.2021.05.31.09.13.19; Mon, 31 May 2021 09:13:32 -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=PGLGEFmI; 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 S232032AbhEaQN4 (ORCPT + 99 others); Mon, 31 May 2021 12:13:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:37858 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234080AbhEaOjT (ORCPT ); Mon, 31 May 2021 10:39:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A075761C63; Mon, 31 May 2021 13:52:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469145; bh=Ps76DS1T4sFPdqYytBA5U7j/Qf19R72Ajv+0LVHvBgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PGLGEFmI5M/rhVgk2onmDBvYayT09xBpeZRMXmutiILekfljNWFlQ7Y0N+hhECbQE qNvAVxLldis7HznyQM/4Nsd1Lgvz5D91/GHebGgsffBdWl4daP3V4E2HAgyrqzEO7i y2p6Saif1CnTMnJK/S1ryG0BGnnjHOKGtm7ZijZs= 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.12 059/296] drm/amdgpu/vcn2.5: add cancel_delayed_work_sync before power gate Date: Mon, 31 May 2021 15:11:54 +0200 Message-Id: <20210531130705.811871400@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@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 @@ -321,6 +321,8 @@ static int vcn_v2_5_hw_fini(void *handle struct amdgpu_device *adev = (struct amdgpu_device *)handle; 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;