Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Belgaumkar, Vinay" <vinay.belgaumkar@intel.com>
To: Matthew Auld <matthew.auld@intel.com>,
	"Poosa, Karthik" <karthik.poosa@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [1/3] drm/xe: Toggle the D3Cold enable flag at runtime resume
Date: Mon, 19 Oct 2026 09:14:35 -0700	[thread overview]
Message-ID: <dcda615d-7b40-4622-8bb8-32b15f3f8aff@intel.com> (raw)
In-Reply-To: <69d9e989-67a7-415b-9433-05df2bf8bad7@intel.com>


On 10/19/2026 3:08 AM, Matthew Auld wrote:
> On 16/10/2026 19:35, Belgaumkar, Vinay wrote:
>>
>> On 10/16/2026 11:23 AM, Poosa, Karthik wrote:
>>>
>>> On 15-10-2026 22:24, Vinay Belgaumkar wrote:
>>>> We enable this flag during runtime suspend,
>>> i think there should be Fixes tag for this.
>>>
>>> Fixes: f026520367be ("drm/xe: Only set PCI d3cold_allowed when we 
>>> are really allowing.")
>> ok.
>>>
>>>> need to set it back to
>>>> false early during resume to prevent any race with pci driver.
>>> What is race that seen without this ?
>>
>> While D0 is being programmed in xe_pci_runtime_resume(), pci driver's 
>> internal auto suspend timer could expire and, since this d3cold flag 
>> is still true, pci driver could try to put vsp into D3. This is probably 
>
> I think needs more info here? We are in the RPM resume callback at 
> this stage (RESUMING), so surely we are holding the required 
> usage_count refs etc here, so how can it enter D3 here?

That is correct. I don't think the upper bridge/root port can go into D3 
as the pci driver will hold a ref until the endpoint is active. I think 
this mainly resolves more of a book-keeping issue. While the device is 
in d3, querying the d3cold_allowed status via sysfs can show "true" if 
we don't have this fix. So, more of a code consistency change. I will 
update the patch desc with this and remove the part about any possible 
race with the pci driver.

Thanks,

Vinay.

>
>
>> why we toggle this flag as the very first thing in the S3 resume 
>> function xe_pci_resume().
>>
>> Thanks,
>>
>> Vinay.
>>
>>>>
>>>> Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
>>>> ---
>>>>   drivers/gpu/drm/xe/xe_pci.c | 3 +++
>>>>   1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
>>>> index 57c6f778ca24..2269e51868c1 100644
>>>> --- a/drivers/gpu/drm/xe/xe_pci.c
>>>> +++ b/drivers/gpu/drm/xe/xe_pci.c
>>>> @@ -1450,6 +1450,9 @@ static int xe_pci_runtime_resume(struct 
>>>> device *dev)
>>>>       struct xe_device *xe = pdev_to_xe_device(pdev);
>>>>       int err;
>>>>   +    if (xe->d3cold.allowed)
>>>> +        d3cold_toggle(pdev, D3COLD_DISABLE);
>>>> +
>>>>       err = pci_set_power_state(pdev, PCI_D0);
>>>>       if (err)
>>>>           return err;
>

  parent reply	other threads:[~2026-10-19 16:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-15 16:54 [PATCH 0/3] drm/xe: Some d3cold related fixes Vinay Belgaumkar
2026-10-15 16:54 ` [PATCH 1/3] drm/xe: Toggle the D3Cold enable flag at runtime resume Vinay Belgaumkar
2026-10-16 18:23   ` [1/3] " Poosa, Karthik
2026-10-16 18:35     ` Belgaumkar, Vinay
2026-10-19 10:08       ` Matthew Auld
2026-10-19 10:24         ` Matthew Auld
2026-10-19 16:14         ` Belgaumkar, Vinay [this message]
2026-10-15 16:54 ` [PATCH 2/3] drm/xe: Access MMIO after pcode init Vinay Belgaumkar
2026-10-15 23:43   ` sashiko-bot
2026-10-15 23:52     ` Belgaumkar, Vinay
2026-10-16 18:02   ` [2/3] " Poosa, Karthik
2026-10-16 18:05     ` Belgaumkar, Vinay
2026-10-15 16:54 ` [PATCH 3/3] drm/xe: Memset g2g buffer on resume Vinay Belgaumkar
2026-10-16 18:49   ` Matthew Brost
2026-10-16 18:56     ` Matthew Brost
2026-10-16 20:43     ` Belgaumkar, Vinay
2026-10-18  1:36       ` Matthew Brost
2026-10-16  0:03 ` ✓ CI.KUnit: success for drm/xe: Some d3cold related fixes Patchwork
2026-10-16  0:41 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-16 11:38 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dcda615d-7b40-4622-8bb8-32b15f3f8aff@intel.com \
    --to=vinay.belgaumkar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=matthew.auld@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox