From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52F50171A9 for ; Mon, 22 May 2023 19:36:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C2EB1C433D2; Mon, 22 May 2023 19:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1684784211; bh=C0p4SOYWxBZj7g7+KsOgjeAIHM6D9O9UL5KINSlusoE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k5xZeKsqHq+A4vpch91kcSY3fx2tf03Fp7Dycd/w4dMy1WNjGF3t29TuJwXqBJ1AK PdKnDg8LnEstsP7qfoK5toG4bW5uRynWMelBiNI6Z7kHBBpcITDlsBfOsx3R7yfuIX ayXSNE/9xPwcBi74r455t+G7yu5s61G/YvjerlXE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Guilherme G. Piccoli" , Bas Nieuwenhuizen , Alex Deucher Subject: [PATCH 6.1 273/292] drm/amdgpu/gfx11: Adjust gfxoff before powergating on gfx11 as well Date: Mon, 22 May 2023 20:10:30 +0100 Message-Id: <20230522190412.764065750@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230522190405.880733338@linuxfoundation.org> References: <20230522190405.880733338@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Guilherme G. Piccoli commit 11fbdda2ab6bf049e2869139c07016022b4e045b upstream. (Bas: speculative change to mirror gfx10/gfx9) Signed-off-by: Guilherme G. Piccoli Signed-off-by: Bas Nieuwenhuizen Cc: Alex Deucher Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org # 6.1.x Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- a/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c @@ -5085,8 +5085,14 @@ static int gfx_v11_0_set_powergating_sta break; case IP_VERSION(11, 0, 1): case IP_VERSION(11, 0, 4): + if (!enable) + amdgpu_gfx_off_ctrl(adev, false); + gfx_v11_cntl_pg(adev, enable); - amdgpu_gfx_off_ctrl(adev, enable); + + if (enable) + amdgpu_gfx_off_ctrl(adev, true); + break; default: break;