All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 3/5] drm/i915/rps: use intel_fsb_freq() and intel_mem_freq()
Date: Tue, 5 Aug 2025 18:20:20 -0400	[thread overview]
Message-ID: <aJKDpAgs-c_iUUf5@intel.com> (raw)
In-Reply-To: <c97769ae07cf42dfc8358b7177ab889c048fee89.1753971617.git.jani.nikula@intel.com>

On Thu, Jul 31, 2025 at 05:21:23PM +0300, Jani Nikula wrote:
> The rps init only happens once, so it's not important to use the cached
> versions, and we can drop the dependency on them.

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/gpu/drm/i915/gt/intel_rps.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/gt/intel_rps.c b/drivers/gpu/drm/i915/gt/intel_rps.c
> index 0b35fdd461d4..006042e0b229 100644
> --- a/drivers/gpu/drm/i915/gt/intel_rps.c
> +++ b/drivers/gpu/drm/i915/gt/intel_rps.c
> @@ -9,6 +9,7 @@
>  
>  #include "display/intel_display.h"
>  #include "display/intel_display_rps.h"
> +#include "soc/intel_dram.h"
>  #include "i915_drv.h"
>  #include "i915_irq.h"
>  #include "i915_reg.h"
> @@ -276,20 +277,24 @@ static void gen5_rps_init(struct intel_rps *rps)
>  {
>  	struct drm_i915_private *i915 = rps_to_i915(rps);
>  	struct intel_uncore *uncore = rps_to_uncore(rps);
> +	unsigned int fsb_freq, mem_freq;
>  	u8 fmax, fmin, fstart;
>  	u32 rgvmodectl;
>  	int c_m, i;
>  
> -	if (i915->fsb_freq <= 3200000)
> +	fsb_freq = intel_fsb_freq(i915);
> +	mem_freq = intel_mem_freq(i915);
> +
> +	if (fsb_freq <= 3200000)
>  		c_m = 0;
> -	else if (i915->fsb_freq <= 4800000)
> +	else if (fsb_freq <= 4800000)
>  		c_m = 1;
>  	else
>  		c_m = 2;
>  
>  	for (i = 0; i < ARRAY_SIZE(cparams); i++) {
>  		if (cparams[i].i == c_m &&
> -		    cparams[i].t == DIV_ROUND_CLOSEST(i915->mem_freq, 1000)) {
> +		    cparams[i].t == DIV_ROUND_CLOSEST(mem_freq, 1000)) {
>  			rps->ips.m = cparams[i].m;
>  			rps->ips.c = cparams[i].c;
>  			break;
> -- 
> 2.39.5
> 

  reply	other threads:[~2025-08-05 22:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31 14:21 [PATCH 0/5] drm/i915 and drm/xe: remove fsb/mem freq cleanups Jani Nikula
2025-07-31 14:21 ` [PATCH 1/5] drm/i915/dram: add intel_fsb_freq() and use it Jani Nikula
2025-08-05 22:17   ` Rodrigo Vivi
2025-07-31 14:21 ` [PATCH 2/5] drm/i915/dram: add intel_mem_freq() Jani Nikula
2025-08-05 22:18   ` Rodrigo Vivi
2025-07-31 14:21 ` [PATCH 3/5] drm/i915/rps: use intel_fsb_freq() and intel_mem_freq() Jani Nikula
2025-08-05 22:20   ` Rodrigo Vivi [this message]
2025-07-31 14:21 ` [PATCH 4/5] drm/i915/dram: bypass fsb/mem freq detection on dg2 and no display Jani Nikula
2025-08-05 22:24   ` Rodrigo Vivi
2025-08-06 13:52     ` Jani Nikula
2025-08-15 15:43       ` Rodrigo Vivi
2025-07-31 14:21 ` [PATCH 5/5] drm/i915/dram: move fsb_freq and mem_freq to dram info Jani Nikula
2025-08-05 22:28   ` Rodrigo Vivi
2025-08-06 13:57     ` Jani Nikula
2025-08-15 15:49       ` Rodrigo Vivi
2025-07-31 16:58 ` ✗ i915.CI.BAT: failure for drm/i915 and drm/xe: remove fsb/mem freq cleanups Patchwork
2025-07-31 18:26 ` ✓ CI.KUnit: success " Patchwork
2025-07-31 19:44 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-31 21:01 ` ✗ 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=aJKDpAgs-c_iUUf5@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.