Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: "Kahola, Mika" <mika.kahola@intel.com>,
	"Garg, Nemesa" <nemesa.garg@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm/i915/display: Implement wa_14024400148
Date: Fri, 2 May 2025 17:10:24 +0530	[thread overview]
Message-ID: <ee572f3e-7c7a-49f1-a476-c5720cee2971@intel.com> (raw)
In-Reply-To: <MW4PR11MB70543F96650ADFB9AF628FFCEFBB2@MW4PR11MB7054.namprd11.prod.outlook.com>


On 4/22/2025 9:02 PM, Kahola, Mika wrote:
>> -----Original Message-----
>> From: Garg, Nemesa <nemesa.garg@intel.com>
>> Sent: Wednesday, 16 April 2025 18.21
>> To: intel-gfx@lists.freedesktop.org; intel-xe@lists.freedesktop.org; Kahola, Mika
>> <mika.kahola@intel.com>
>> Cc: Garg, Nemesa <nemesa.garg@intel.com>
>> Subject: [PATCH v2] drm/i915/display: Implement wa_14024400148
>>
>> Workaround recommend use polling method
>> for pm_demand to finish as to avoid timeout.
>>
>> v2: Add polling method within pmdemand_wait.
>>      Update error message[Jani]
>>
>> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_pmdemand.c | 31 ++++++++++++++++---
>>   1 file changed, 26 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_pmdemand.c
>> b/drivers/gpu/drm/i915/display/intel_pmdemand.c
>> index d22b5469672d..1253376c7654 100644
>> --- a/drivers/gpu/drm/i915/display/intel_pmdemand.c
>> +++ b/drivers/gpu/drm/i915/display/intel_pmdemand.c
>> @@ -478,13 +478,34 @@ static bool intel_pmdemand_req_complete(struct
>> intel_display *display)
>>   		 XELPDP_PMDEMAND_REQ_ENABLE);
>>   }
>>
>> -static void intel_pmdemand_wait(struct intel_display *display)
>> +static void intel_pmdemand_poll(struct intel_display *display)
>>   {
>> -	if (!wait_event_timeout(display->pmdemand.waitqueue,
>> -				intel_pmdemand_req_complete(display),
>> -				msecs_to_jiffies_timeout(10)))
>> +	const unsigned int timeout_ms = 10;
>> +	u32 status;
>> +	int ret;
>> +
>> +	ret = intel_de_wait_custom(display,
>> XELPDP_INITIATE_PMDEMAND_REQUEST(1),
>> +				   XELPDP_PMDEMAND_REQ_ENABLE, 0,
>> +				   50, timeout_ms, &status);
>> +
>> +	if (ret == -ETIMEDOUT)
>>   		drm_err(display->drm,
>> -			"timed out waiting for Punit PM Demand Response\n");
>> +			"timed out waiting for Punit PM Demand Response
>> within %ums (status 0x%08x)\n",
>> +			timeout_ms, status);
>> +}
>> +
>> +static void intel_pmdemand_wait(struct intel_display *display) {
>> +	/* Wa_14024400148 For lnl use polling method */
>> +	if (DISPLAY_VER(display) == 20) {
>> +		intel_pmdemand_poll(display);
>> +	} else {
> Maybe this else branch could be written as its own function as with if branch. Anyway, this might be a topic for follow up patch.
>
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>

Thanks for the patch and review. Pushed to drm-intel-next.

Regards,

Ankit

>
>> +		if (!wait_event_timeout(display->pmdemand.waitqueue,
>> +
>> 	intel_pmdemand_req_complete(display),
>> +					msecs_to_jiffies_timeout(10)))
>> +			drm_err(display->drm,
>> +				"timed out waiting for Punit PM Demand
>> Response\n");
>> +	}
>>   }
>>
>>   /* Required to be programmed during Display Init Sequences. */
>> --
>> 2.25.1

      reply	other threads:[~2025-05-02 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-16 15:20 [PATCH v2] drm/i915/display: Implement wa_14024400148 Nemesa Garg
2025-04-16 16:32 ` ✓ i915.CI.BAT: success for drm/i915/display: Implement wa_14024400148 (rev2) Patchwork
2025-04-17  2:47 ` ✗ i915.CI.Full: failure " Patchwork
2025-04-17 12:52 ` ✓ i915.CI.Full: success " Patchwork
2025-04-22 15:32 ` [PATCH v2] drm/i915/display: Implement wa_14024400148 Kahola, Mika
2025-05-02 11:40   ` Nautiyal, Ankit K [this message]

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=ee572f3e-7c7a-49f1-a476-c5720cee2971@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.kahola@intel.com \
    --cc=nemesa.garg@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