From: Jani Nikula <jani.nikula@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
ville.syrjala@linux.intel.com
Subject: Re: [PATCH 02/12] drm/i915/wm: clarify logging on not finding CxSR latency config
Date: Thu, 30 May 2024 09:59:37 +0300 [thread overview]
Message-ID: <87ikyviy3q.fsf@intel.com> (raw)
In-Reply-To: <20240529210005.GQ4990@mdroper-desk1.amr.corp.intel.com>
On Wed, 29 May 2024, Matt Roper <matthew.d.roper@intel.com> wrote:
> On Tue, May 28, 2024 at 05:24:51PM +0300, Jani Nikula wrote:
>> Clarify and unify the logging on not finding PNV CxSR latency config.
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>> drivers/gpu/drm/i915/display/i9xx_wm.c | 17 +++++++----------
>> 1 file changed, 7 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/display/i9xx_wm.c b/drivers/gpu/drm/i915/display/i9xx_wm.c
>> index 8657ec0abd2d..8b8a0f305c3a 100644
>> --- a/drivers/gpu/drm/i915/display/i9xx_wm.c
>> +++ b/drivers/gpu/drm/i915/display/i9xx_wm.c
>> @@ -75,7 +75,7 @@ static const struct cxsr_latency *pnv_get_cxsr_latency(struct drm_i915_private *
>> int i;
>>
>> if (i915->fsb_freq == 0 || i915->mem_freq == 0)
>> - return NULL;
>> + goto err;
>
> Is there even a need for this check? 0/0 will fail to match anything in
> the table and will just drop through to the debug message anyway, right?
True, could be dropped. I just thought it was more explicit this way,
but maybe fewer lines is better.
BR,
Jani.
>
>
> Matt
>
>>
>> for (i = 0; i < ARRAY_SIZE(cxsr_latency_table); i++) {
>> const struct cxsr_latency *latency = &cxsr_latency_table[i];
>> @@ -88,7 +88,10 @@ static const struct cxsr_latency *pnv_get_cxsr_latency(struct drm_i915_private *
>> return latency;
>> }
>>
>> - drm_dbg_kms(&i915->drm, "Unknown FSB/MEM found, disable CxSR\n");
>> +err:
>> + drm_dbg_kms(&i915->drm,
>> + "Could not find CxSR latency for DDR%s, FSB %u MHz, MEM %u MHz\n",
>> + i915->is_ddr3 ? "3" : "2", i915->fsb_freq, i915->mem_freq);
>>
>> return NULL;
>> }
>> @@ -637,8 +640,7 @@ static void pnv_update_wm(struct drm_i915_private *dev_priv)
>>
>> latency = pnv_get_cxsr_latency(dev_priv);
>> if (!latency) {
>> - drm_dbg_kms(&dev_priv->drm,
>> - "Unknown FSB/MEM found, disable CxSR\n");
>> + drm_dbg_kms(&dev_priv->drm, "Unknown FSB/MEM, disabling CxSR\n");
>> intel_set_memory_cxsr(dev_priv, false);
>> return;
>> }
>> @@ -4023,12 +4025,7 @@ void i9xx_wm_init(struct drm_i915_private *dev_priv)
>> dev_priv->display.funcs.wm = &g4x_wm_funcs;
>> } else if (IS_PINEVIEW(dev_priv)) {
>> if (!pnv_get_cxsr_latency(dev_priv)) {
>> - drm_info(&dev_priv->drm,
>> - "failed to find known CxSR latency "
>> - "(found ddr%s fsb freq %d, mem freq %d), "
>> - "disabling CxSR\n",
>> - (dev_priv->is_ddr3 == 1) ? "3" : "2",
>> - dev_priv->fsb_freq, dev_priv->mem_freq);
>> + drm_info(&dev_priv->drm, "Unknown FSB/MEM, disabling CxSR\n");
>> /* Disable CxSR and never update its watermark again */
>> intel_set_memory_cxsr(dev_priv, false);
>> dev_priv->display.funcs.wm = &nop_funcs;
>> --
>> 2.39.2
>>
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-05-30 6:59 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-28 14:24 [PATCH 00/12] drm/i915: mem/fsb/rawclk freq cleanups Jani Nikula
2024-05-28 14:24 ` [PATCH 01/12] drm/i915/wm: rename intel_get_cxsr_latency -> pnv_get_cxsr_latency Jani Nikula
2024-05-29 20:53 ` Matt Roper
2024-05-28 14:24 ` [PATCH 02/12] drm/i915/wm: clarify logging on not finding CxSR latency config Jani Nikula
2024-05-29 21:00 ` Matt Roper
2024-05-30 6:59 ` Jani Nikula [this message]
2024-05-28 14:24 ` [PATCH 03/12] drm/i915/dram: separate fsb freq detection from mem freq Jani Nikula
2024-05-29 21:08 ` Matt Roper
2024-05-28 14:24 ` [PATCH 04/12] drm/i915/dram: split out pnv DDR3 detection Jani Nikula
2024-05-29 21:12 ` Matt Roper
2024-05-28 14:24 ` [PATCH 05/12] drm/i915/dram: rearrange mem freq init Jani Nikula
2024-05-29 21:13 ` Matt Roper
2024-05-28 14:24 ` [PATCH 06/12] drm/i915: convert fsb_freq and mem_freq to kHz Jani Nikula
2024-05-29 21:16 ` Matt Roper
2024-05-30 7:01 ` Jani Nikula
2024-06-05 10:12 ` Ville Syrjälä
2024-06-05 12:42 ` Jani Nikula
2024-05-28 14:24 ` [PATCH 07/12] drm/i915: extend the fsb_freq initialization to more platforms Jani Nikula
2024-05-29 21:39 ` Matt Roper
2024-05-30 7:14 ` Jani Nikula
2024-06-04 11:46 ` Jani Nikula
2024-06-05 10:18 ` Ville Syrjälä
2024-06-05 10:24 ` Ville Syrjälä
2024-06-06 10:37 ` Jani Nikula
2024-05-28 14:24 ` [PATCH 08/12] drm/i915: use i9xx_fsb_freq() for GT clock frequency Jani Nikula
2024-05-28 14:24 ` [PATCH 09/12] drm/i915/cdclk: use i9xx_fsb_freq() for rawclk_freq initialization Jani Nikula
2024-06-05 10:31 ` Ville Syrjälä
2024-05-28 14:24 ` [PATCH 10/12] drm/i915: move rawclk init to intel_cdclk_init() Jani Nikula
2024-05-29 10:26 ` Jani Nikula
2024-05-28 14:25 ` [PATCH 11/12] drm/i915: move rawclk from runtime to display runtime info Jani Nikula
2024-05-28 14:25 ` [PATCH 12/12] drm/xe/display: drop unused rawclk_freq and RUNTIME_INFO() Jani Nikula
2024-05-28 14:32 ` ✓ CI.Patch_applied: success for drm/i915: mem/fsb/rawclk freq cleanups Patchwork
2024-05-28 14:32 ` ✓ CI.checkpatch: " Patchwork
2024-05-28 14:33 ` ✗ CI.KUnit: 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=87ikyviy3q.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@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;
as well as URLs for NNTP newsgroup(s).