All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Lisovskiy, Stanislav" <stanislav.lisovskiy@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 2/2] drm/i915: Make sure we have enough memory bandwidth on ICL
Date: Thu, 21 Mar 2019 12:32:18 +0200	[thread overview]
Message-ID: <20190321103218.GE3888@intel.com> (raw)
In-Reply-To: <97b68364fc0730c942d497d76c6f29ffd1a60a9c.camel@intel.com>

On Thu, Mar 21, 2019 at 09:34:00AM +0000, Lisovskiy, Stanislav wrote:
> On Wed, 2019-03-20 at 23:46 +0200, Ville Syrjala wrote:
> > +static void cnl_get_dram_timings(struct drm_i915_private *dev_priv,
> > +                                const struct dram_info *dram,
> > +                                struct intel_dram_timings *t)
> > +{
> > +       u32 val;
> > +
> > +       if (dram->channels & BIT(0)) {
> > +               val = I915_READ(MCHBAR_CH0_CR_TC_PRE_0_0_0_MCHBAR);
> > +               cnl_get_dram_ch_timings(t, 0, dram->type, val);
> > +       } else if (dram->channels & BIT(1)) {
> > +               val = I915_READ(MCHBAR_CH1_CR_TC_PRE_0_0_0_MCHBAR);
> > +               cnl_get_dram_ch_timings(t, 1, dram->type, val);
> > +       }
> > +}
> 
> So if have now dram->channels as a bit mask, can't it be so
> that we have both enabled and what will happen then?
> 
> This code will always use channel 0 timings in that case as I
> understand, is it expected to work this way?

It seemed to be fine when I tested it (ie. it always picked the slower
timings when I had mixed DIMMs in the system). But I think I have to
retest that one more time to make sure SAGV wasn't playing tricks on me.

> 
> Also, if it is always either one or another, then we probably don't
> need "else if" here.
> 
> Best Regards,
> 
> Lisovskiy Stanislav

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-03-21 10:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 21:46 [PATCH 1/2] drm/i915: Turn dram_info.num_channels into a bitmask Ville Syrjala
2019-03-20 21:46 ` [PATCH 2/2] drm/i915: Make sure we have enough memory bandwidth on ICL Ville Syrjala
2019-03-21  9:34   ` Lisovskiy, Stanislav
2019-03-21 10:32     ` Ville Syrjälä [this message]
2019-03-22 17:04   ` Ville Syrjälä
2019-03-27 14:12   ` Maarten Lankhorst
2019-03-20 23:43 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Turn dram_info.num_channels into a bitmask Patchwork
2019-03-20 23:44 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-21  0:12 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-21  5:24 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Turn dram_info.num_channels into a bitmask (rev2) Patchwork
2019-03-21  5:25 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-21  5:53 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-21  6:12 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] drm/i915: Turn dram_info.num_channels into a bitmask (rev3) Patchwork
2019-03-21  6:14 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-21  6:33 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-21  7:50   ` Saarinen, Jani
2019-03-21 13:36 ` ✗ Fi.CI.IGT: 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=20190321103218.GE3888@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=stanislav.lisovskiy@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.