Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Tauro, Riana" <riana.tauro@intel.com>
To: "Poosa, Karthik" <karthik.poosa@intel.com>,
	<intel-xe@lists.freedesktop.org>
Cc: <rodrigo.vivi@intel.com>, <anshuman.gupta@intel.com>,
	<badal.nilawar@intel.com>, <raag.jadav@intel.com>,
	<sk.anirban@intel.com>, <mallesh.koujalagi@intel.com>,
	<soham.purkait@intel.com>
Subject: Re: [PATCH 2/2] drm/xe/hwmon: Increase timeout for mailbox power limits
Date: Mon, 31 Aug 2026 12:39:50 +0530	[thread overview]
Message-ID: <dc04b171-55dd-4a9d-9ba6-fb3960582e33@intel.com> (raw)
In-Reply-To: <2c61329e-a7d0-4524-b585-5d10fd970ffe@intel.com>


On 31-08-2026 12:24, Poosa, Karthik wrote:
>
> On 31-08-2026 10:59, Tauro, Riana wrote:
>>
>> On 29-07-2026 22:45, Karthik Poosa wrote:
>>> Mailbox power limit operations can occasionally take longer than the
>>> current 1 ms timeout, causing sporadic failures.
>>> Increase the timeout to 10 ms and rename PL_WRITE_MBX_TIMEOUT_MS to
>>> PL_MBX_TIMEOUT_MS to better reflect its usage.
>>
>> Why is the timeout applicable only for power and not the other 
>> attribute reads?
>>
>> Thanks
>> Riana
>
> Because the timeout is seen only with mailbox power limit commands 
> only, default 1ms timeout wasn't enough here.
>

Any reason why this is not seen for the other reads?

>
>>
>>> Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
>>> ---
>>>   drivers/gpu/drm/xe/xe_hwmon.c | 28 +++++++++++++++-------------
>>>   1 file changed, 15 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/xe/xe_hwmon.c 
>>> b/drivers/gpu/drm/xe/xe_hwmon.c
>>> index de3f2aeffc3f..459ad953dfc8 100644
>>> --- a/drivers/gpu/drm/xe/xe_hwmon.c
>>> +++ b/drivers/gpu/drm/xe/xe_hwmon.c
>>> @@ -102,9 +102,9 @@ enum sensor_attr_power {
>>>   #define PWR_ATTR_TO_STR(attr)    (((attr) == hwmon_power_max) ? 
>>> "PL1" : "PL2")
>>>     /*
>>> - * Timeout for power limit write mailbox command.
>>> + * Timeout for power limit mailbox commands.
>>>    */
>>> -#define PL_WRITE_MBX_TIMEOUT_MS    (1)
>>> +#define PL_MBX_TIMEOUT_MS    (10)
>>>     /* Index of memory controller in READ_THERMAL_DATA output */
>>>   #define TEMP_INDEX_MCTRL    2
>>> @@ -199,11 +199,12 @@ static int 
>>> xe_hwmon_pcode_read_power_limit(const struct xe_hwmon *hwmon, u32 att
>>>       u32 val0 = 0, val1 = 0;
>>>       int ret = 0;
>>>   -    ret = xe_pcode_read(root_tile, PCODE_MBOX(PCODE_POWER_SETUP,
>>> -                          (channel == CHANNEL_CARD) ?
>>> -                          READ_PSYSGPU_POWER_LIMIT :
>>> -                          READ_PACKAGE_POWER_LIMIT,
>>> -                          prepare_power_limit_param2(hwmon)), 
>>> &val0, &val1);
>>> +    ret = xe_pcode_read_timeout(root_tile, 
>>> PCODE_MBOX(PCODE_POWER_SETUP,
>>> +                              (channel == CHANNEL_CARD) ?
>>> +                              READ_PSYSGPU_POWER_LIMIT :
>>> +                              READ_PACKAGE_POWER_LIMIT,
>>> + prepare_power_limit_param2(hwmon)),
>>> +                              &val0, &val1, PL_MBX_TIMEOUT_MS);
>>>         if (ret) {
>>>           drm_dbg(&hwmon->xe->drm, "read failed ch %d val0 0x%08x, 
>>> val1 0x%08x, ret %d\n",
>>> @@ -232,11 +233,12 @@ static int 
>>> xe_hwmon_pcode_rmw_power_limit(const struct xe_hwmon *hwmon, u32 attr
>>>       u32 val0 = 0, val1 = 0;
>>>       int ret = 0;
>>>   -    ret = xe_pcode_read(root_tile, PCODE_MBOX(PCODE_POWER_SETUP,
>>> -                          (channel == CHANNEL_CARD) ?
>>> -                          READ_PSYSGPU_POWER_LIMIT :
>>> -                          READ_PACKAGE_POWER_LIMIT,
>>> -                          prepare_power_limit_param2(hwmon)), 
>>> &val0, &val1);
>>> +    ret = xe_pcode_read_timeout(root_tile, 
>>> PCODE_MBOX(PCODE_POWER_SETUP,
>>> +                              (channel == CHANNEL_CARD) ?
>>> +                              READ_PSYSGPU_POWER_LIMIT :
>>> +                              READ_PACKAGE_POWER_LIMIT,
>>> + prepare_power_limit_param2(hwmon)),
>>> +                              &val0, &val1, PL_MBX_TIMEOUT_MS);
>>>       if (ret)
>>>           drm_dbg(&hwmon->xe->drm, "read failed ch %d val0 0x%08x, 
>>> val1 0x%08x, ret %d\n",
>>>               channel, val0, val1, ret);
>>> @@ -252,7 +254,7 @@ static int xe_hwmon_pcode_rmw_power_limit(const 
>>> struct xe_hwmon *hwmon, u32 attr
>>>                                    (channel == CHANNEL_CARD) ?
>>>                                    WRITE_PSYSGPU_POWER_LIMIT :
>>>                                    WRITE_PACKAGE_POWER_LIMIT, 0),
>>> -                                 val0, val1, PL_WRITE_MBX_TIMEOUT_MS);
>>> +                                 val0, val1, PL_MBX_TIMEOUT_MS);
>>>       if (ret)
>>>           drm_dbg(&hwmon->xe->drm, "write failed ch %d val0 0x%08x, 
>>> val1 0x%08x, ret %d\n",
>>>               channel, val0, val1, ret);

  reply	other threads:[~2026-08-31  7:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 17:15 [PATCH 0/2] drm/xe: Increase timeout for hwmon power limit mailbox operations Karthik Poosa
2026-07-29 17:14 ` ✓ CI.KUnit: success for " Patchwork
2026-07-29 17:15 ` [PATCH 1/2] drm/xe/pcode: Introduce xe_pcode_read_timeout() API Karthik Poosa
2026-08-31  5:32   ` Tauro, Riana
2026-08-31  6:50     ` Poosa, Karthik
2026-07-29 17:15 ` [PATCH 2/2] drm/xe/hwmon: Increase timeout for mailbox power limits Karthik Poosa
2026-08-31  5:29   ` Tauro, Riana
2026-08-31  6:54     ` Poosa, Karthik
2026-08-31  7:09       ` Tauro, Riana [this message]
2026-08-31  7:41         ` Raag Jadav
2026-08-31 13:58           ` Rodrigo Vivi
2026-08-31 16:27             ` Poosa, Karthik
2026-08-31 16:48               ` Rodrigo Vivi
2026-08-31 13:59   ` Rodrigo Vivi
2026-07-29 18:07 ` ✓ Xe.CI.BAT: success for drm/xe: Increase timeout for hwmon power limit mailbox operations Patchwork
2026-07-29 22:58 ` ✗ Xe.CI.FULL: failure " 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=dc04b171-55dd-4a9d-9ba6-fb3960582e33@intel.com \
    --to=riana.tauro@intel.com \
    --cc=anshuman.gupta@intel.com \
    --cc=badal.nilawar@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=karthik.poosa@intel.com \
    --cc=mallesh.koujalagi@intel.com \
    --cc=raag.jadav@intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=sk.anirban@intel.com \
    --cc=soham.purkait@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