From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3ADB0CCD1AB for ; Tue, 21 Oct 2025 07:12:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CFCE610E585; Tue, 21 Oct 2025 07:12:15 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="SNT0ptMz"; dkim-atps=neutral Received: from bali.collaboradmins.com (bali.collaboradmins.com [148.251.105.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6B37410E498; Mon, 20 Oct 2025 16:59:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1760979553; bh=YfnKeMKwhtaKKkpqNf8xO08h+LVL7gFtv+Wvu1LExHw=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=SNT0ptMzU1hGPApmR8M2TMZlhqbcmlE0R5tihYF3NoQci7wE9LRQuAH/CTyInqqag yUEws0h2RGdw94IQxdbHwqE74XZHVVGHnp4Zv5ns1BgKumAuICW5z4lnn8WPtgYvnh XYtNsVNxc5V300f3zZqN3PrfY8J3J3fCR/EDUEgCrEvQXIIZjDsvjzEb14EM5T1ARM HcBiBs7kRemcyb96M8jDvEbW/g8OVac773ez7B1loYim1vXepQwJvVqd8ngudI09gt yQhNhmwP+QPZRGHSpzw3RCt+Zh8M4VmIlNT6cOuVlc593aoFEhqkYRnbgRzxBsun5w expjkHJGVndEg== Received: from [192.168.200.105] (unknown [182.181.201.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: usama.anjum) by bali.collaboradmins.com (Postfix) with ESMTPSA id 3D02917E1278; Mon, 20 Oct 2025 18:59:10 +0200 (CEST) Message-ID: Date: Mon, 20 Oct 2025 21:59:04 +0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: usama.anjum@collabora.com, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-pm@vger.kernel.org Subject: Re: [RFC 3/3] drm/amd: Return -EBUSY for amdgpu_pmops_thaw() on success To: "Mario Limonciello (AMD)" , mario.limonciello@amd.com, airlied@gmail.com, alexander.deucher@amd.com, christian.koenig@amd.com, dakr@kernel.org, gregkh@linuxfoundation.org, lenb@kernel.org, pavel@kernel.org, rafael@kernel.org, simona@ffwll.ch References: <20251020165317.3992933-1-superm1@kernel.org> <20251020165317.3992933-4-superm1@kernel.org> Content-Language: en-US From: Muhammad Usama Anjum In-Reply-To: <20251020165317.3992933-4-superm1@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Tue, 21 Oct 2025 07:12:09 +0000 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" On 10/20/25 9:50 PM, Mario Limonciello (AMD) wrote: > From: Mario Limonciello > > The PM core should be notified that thaw was skipped for the device > so that if it's tried to be resumed (such as an aborted hibernate) > that it gets another chance to resume. > > Cc: Muhammad Usama Anjum > Signed-off-by: Mario Limonciello Tested-by: Muhammad Usama Anjum > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > index 61268aa82df4d..d40af069f24dd 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c > @@ -2681,7 +2681,7 @@ static int amdgpu_pmops_thaw(struct device *dev) > > /* do not resume device if it's normal hibernation */ > if (!pm_hibernate_is_recovering() && !pm_hibernation_mode_is_suspend()) > - return 0; > + return -EBUSY; > > return amdgpu_device_resume(drm_dev, true); > } -- --- Thanks, Usama