Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Naladala, Ramanaidu" <Ramanaidu.naladala@intel.com>
To: "Kahola, Mika" <mika.kahola@intel.com>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "ville.syrjala@linux.intel.com" <ville.syrjala@linux.intel.com>,
	"Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
Subject: Re: [PATCH v2] drm/i915: Add fallback for CDCLK selection when min_cdclk is too high
Date: Wed, 29 Oct 2025 13:35:57 +0530	[thread overview]
Message-ID: <a3467ad3-3298-482d-a474-7288c75f7e14@intel.com> (raw)
In-Reply-To: <DS4PPF69154114FCDAF27E638E26ED4D423EFFDA@DS4PPF69154114F.namprd11.prod.outlook.com>

Hi Mika,

Thanks for the review.

On 10/28/2025 5:37 PM, Kahola, Mika wrote:
>> -----Original Message-----
>> From: Intel-xe <intel-xe-bounces@lists.freedesktop.org> On Behalf Of Naladala Ramanaidu
>> Sent: Friday, 17 October 2025 18.05
>> To: intel-xe@lists.freedesktop.org; intel-gfx@lists.freedesktop.org
>> Cc: ville.syrjala@linux.intel.com; Nautiyal, Ankit K <ankit.k.nautiyal@intel.com>; Naladala, Ramanaidu
>> <ramanaidu.naladala@intel.com>
>> Subject: [PATCH v2] drm/i915: Add fallback for CDCLK selection when min_cdclk is too high
>>
>> In cases where the requested minimum CDCLK exceeds all available values for the current reference clock, the CDCLK selection
>> logic previously returned 0. This could result coverity division or modulo by zero issue.
>>
>> This change introduces a fallback mechanism that returns the platform's max_cdclk_freq instead of 0.
>>
>> v2: Update safe fallback value to max cdclk.
>>
>> Fixes: Coverity CID 2628056
> We shouldn't mention the static analysis error ids as most of the audience cannot trace it back.
>
> With this change, this is
Sure. I will remove this Fixes tag while merging the patch.
>
> Reviewed-by: Mika Kahola <mika.kahola@intel.com>
>
>> Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala@intel.com>
>> ---
>>   drivers/gpu/drm/i915/display/intel_cdclk.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/intel_cdclk.c b/drivers/gpu/drm/i915/display/intel_cdclk.c
>> index e92e7fd9fd13..da97c38cca14 100644
>> --- a/drivers/gpu/drm/i915/display/intel_cdclk.c
>> +++ b/drivers/gpu/drm/i915/display/intel_cdclk.c
>> @@ -1561,7 +1561,7 @@ static int bxt_calc_cdclk(struct intel_display *display, int min_cdclk)
>>   	drm_WARN(display->drm, 1,
>>   		 "Cannot satisfy minimum cdclk %d with refclk %u\n",
>>   		 min_cdclk, display->cdclk.hw.ref);
>> -	return 0;
>> +	return display->cdclk.max_cdclk_freq;
>>   }
>>
>>   static int bxt_calc_cdclk_pll_vco(struct intel_display *display, int cdclk)
>> --
>> 2.43.0

  reply	other threads:[~2025-10-29  8:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-17 11:48 [PATCH v1] drm/i915: Add fallback for CDCLK selection when min_cdclk is too high Naladala Ramanaidu
2025-10-17 11:57 ` ✓ CI.KUnit: success for " Patchwork
2025-10-17 12:37 ` ✗ Xe.CI.BAT: failure " Patchwork
2025-10-17 13:22 ` [PATCH v1] " Ville Syrjälä
2025-10-17 15:05 ` [PATCH v2] " Naladala Ramanaidu
2025-10-28 12:07   ` Kahola, Mika
2025-10-29  8:05     ` Naladala, Ramanaidu [this message]
2025-10-17 15:32 ` ✓ CI.KUnit: success for drm/i915: Add fallback for CDCLK selection when min_cdclk is too high (rev2) Patchwork
2025-10-17 16:26 ` ✓ Xe.CI.BAT: " Patchwork
2025-10-18  9:07 ` ✗ Xe.CI.Full: failure for drm/i915: Add fallback for CDCLK selection when min_cdclk is too high Patchwork
2025-10-18 14:26 ` ✗ Xe.CI.Full: failure for drm/i915: Add fallback for CDCLK selection when min_cdclk is too high (rev2) 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=a3467ad3-3298-482d-a474-7288c75f7e14@intel.com \
    --to=ramanaidu.naladala@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.kahola@intel.com \
    --cc=ville.syrjala@linux.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