Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2654764pxj; Mon, 31 May 2021 07:30:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZ30x7t7QGBw4and8MJPIUpE0a8aTg1smEy6MAR5gRwa99UYlusFC+vnqgYgd66q8hiTdA X-Received: by 2002:a92:c149:: with SMTP id b9mr18035831ilh.195.1622471426452; Mon, 31 May 2021 07:30:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622471426; cv=none; d=google.com; s=arc-20160816; b=WCWHrXSeJEwRsgcp3lRFdl9VLptoiye92ZwkT0LB7AICMMP9QwrsVPSIAF1CXNyIM6 YlX9cgosjQtgIrIRKUUlOW5JLRXr15/t14kAQuv21gbMD6lCWbX4JalvnPm+bEGzhZBX lykJd3nB+gi7vDQJa0nz2gJpZXGJgPNHlAVMwWSxhUNjT8MJW5RrIipGHpduH4eY2rOa YyS/ur1i5ybY2ZO9uAXg/oOElN2BBcLmL7a/3EUwciEIpmMRaJSgJRJzigrE7npsX40z APbZwlKooprwe5BjBJkH126hvwWQ7D6G/3sX8AM9Fupq7UK0bNig+2I8SPG6cHKHBxjA 3E2g== 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=siIXsgEfLNtDum8NWx4LPvKPCnHxGNlMlho8AFz6oqocA//7PwQOkhGQ3SabvQymCf 9H5XmWQnNYn8xXwUN2xJLbVjfu5E9jl2zh204c4x+3LlMeLAolL9G0StqoC99kZLhD8o E7gMzRpjg8RCC341l5lYqvMBEITNi2Zq8gxI1qynDzP/PFQtaQKnN/U3627S3Cl+LETK 38bFy0CMgxbM8BdqJC7u6h929j4hCLQHOYDfEADLJJkITsVf67x3AftHu0Oq+9byRU7l phNnj8St/11g4OtiSnPuxDMC5qjiGG48PoZQ7Uzsj6/97zIw8oV8QvvC59Agxl9nfWRH lcMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=S71ILp88; 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 k8si13494449iov.91.2021.05.31.07.30.13; Mon, 31 May 2021 07:30:26 -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=S71ILp88; 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 S231644AbhEaOap (ORCPT + 99 others); Mon, 31 May 2021 10:30:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:55222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232268AbhEaNxa (ORCPT ); Mon, 31 May 2021 09:53:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A4C976191A; Mon, 31 May 2021 13:33:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622468003; bh=Ps76DS1T4sFPdqYytBA5U7j/Qf19R72Ajv+0LVHvBgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S71ILp88M2sTxRwNO/Ralk7ltsV9dkyFLmLxzRwxQNE4Rg8gqOw4ZTW2ucXstdpiT cAumjoxu37pntkei9oph7PFjPcyCvGqNtJ9EGJ/yj/TpSvKJT1woAs1FO4KLM3wOpy bdVWuT9XQUMaIwpXf8h+95XRukE//qCcNEpbeIGc= 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.10 045/252] drm/amdgpu/vcn2.5: add cancel_delayed_work_sync before power gate Date: Mon, 31 May 2021 15:11:50 +0200 Message-Id: <20210531130659.518130266@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130657.971257589@linuxfoundation.org> References: <20210531130657.971257589@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;