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 2/5] drm/i915/dram: add intel_mem_freq()
Date: Tue, 5 Aug 2025 18:18:43 -0400 [thread overview]
Message-ID: <aJKDQ7IODcSx9iDR@intel.com> (raw)
In-Reply-To: <eeb7aa7e22e9b7eb68d958605650aeea1a6bbec4.1753971617.git.jani.nikula@intel.com>
On Thu, Jul 31, 2025 at 05:21:22PM +0300, Jani Nikula wrote:
> Add a more generic intel_mem_freq() function instead of platform
> specific ones. Expose it for future use outside of intel_dram.c.
>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/soc/intel_dram.c | 17 ++++++++++++-----
> drivers/gpu/drm/i915/soc/intel_dram.h | 1 +
> 2 files changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
> index 6be3618d4885..193e7f71a356 100644
> --- a/drivers/gpu/drm/i915/soc/intel_dram.c
> +++ b/drivers/gpu/drm/i915/soc/intel_dram.c
> @@ -135,16 +135,23 @@ static unsigned int vlv_mem_freq(struct drm_i915_private *i915)
> return 0;
> }
>
> -static void detect_mem_freq(struct drm_i915_private *i915)
> +unsigned int intel_mem_freq(struct drm_i915_private *i915)
> {
> if (IS_PINEVIEW(i915))
> - i915->mem_freq = pnv_mem_freq(i915);
> + return pnv_mem_freq(i915);
> else if (GRAPHICS_VER(i915) == 5)
> - i915->mem_freq = ilk_mem_freq(i915);
> + return ilk_mem_freq(i915);
> else if (IS_CHERRYVIEW(i915))
> - i915->mem_freq = chv_mem_freq(i915);
> + return chv_mem_freq(i915);
> else if (IS_VALLEYVIEW(i915))
> - i915->mem_freq = vlv_mem_freq(i915);
> + return vlv_mem_freq(i915);
> + else
> + return 0;
> +}
> +
> +static void detect_mem_freq(struct drm_i915_private *i915)
> +{
> + i915->mem_freq = intel_mem_freq(i915);
>
> if (IS_PINEVIEW(i915))
> i915->is_ddr3 = pnv_is_ddr3(i915);
> diff --git a/drivers/gpu/drm/i915/soc/intel_dram.h b/drivers/gpu/drm/i915/soc/intel_dram.h
> index 09a7a581d949..5ba75e279e84 100644
> --- a/drivers/gpu/drm/i915/soc/intel_dram.h
> +++ b/drivers/gpu/drm/i915/soc/intel_dram.h
> @@ -34,6 +34,7 @@ struct dram_info {
> void intel_dram_edram_detect(struct drm_i915_private *i915);
> int intel_dram_detect(struct drm_i915_private *i915);
> unsigned int intel_fsb_freq(struct drm_i915_private *i915);
> +unsigned int intel_mem_freq(struct drm_i915_private *i915);
> const struct dram_info *intel_dram_info(struct drm_device *drm);
>
> #endif /* __INTEL_DRAM_H__ */
> --
> 2.39.5
>
next prev parent reply other threads:[~2025-08-05 22:19 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 [this message]
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
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=aJKDQ7IODcSx9iDR@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.