From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 09/12] drm/i914: s/l_info/dimm_l/ etc.
Date: Wed, 6 Mar 2019 22:35:48 +0200 [thread overview]
Message-ID: <20190306203551.24592-10-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20190306203551.24592-1-ville.syrjala@linux.intel.com>
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Rename the dimm info structs for clarity.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_drv.c | 18 +++++++++---------
drivers/gpu/drm/i915/i915_drv.h | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 08914761303d..54b40c9ea1f7 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1130,24 +1130,24 @@ static int
skl_dram_get_channel_info(struct dram_channel_info *ch,
int channel, u32 val)
{
- skl_dram_get_dimm_info(&ch->l_info, channel, 'L', val & 0xffff);
- skl_dram_get_dimm_info(&ch->s_info, channel, 'S', val >> 16);
+ skl_dram_get_dimm_info(&ch->dimm_l, channel, 'L', val & 0xffff);
+ skl_dram_get_dimm_info(&ch->dimm_s, channel, 'S', val >> 16);
- if (ch->l_info.size == 0 && ch->s_info.size == 0) {
+ if (ch->dimm_l.size == 0 && ch->dimm_s.size == 0) {
DRM_DEBUG_KMS("CH%u not populated\n", channel);
return -EINVAL;
}
- if (ch->l_info.ranks == 2 || ch->s_info.ranks == 2)
+ if (ch->dimm_l.ranks == 2 || ch->dimm_s.ranks == 2)
ch->ranks = 2;
- else if (ch->l_info.ranks == 1 && ch->s_info.ranks == 1)
+ else if (ch->dimm_l.ranks == 1 && ch->dimm_s.ranks == 1)
ch->ranks = 2;
else
ch->ranks = 1;
ch->is_16gb_dimm =
- skl_is_16gb_dimm(&ch->l_info) ||
- skl_is_16gb_dimm(&ch->s_info);
+ skl_is_16gb_dimm(&ch->dimm_l) ||
+ skl_is_16gb_dimm(&ch->dimm_s);
DRM_DEBUG_KMS("CH%u ranks: %u, 16Gb DIMMs: %s\n",
channel, ch->ranks, yesno(ch->is_16gb_dimm));
@@ -1160,8 +1160,8 @@ intel_is_dram_symmetric(const struct dram_channel_info *ch0,
const struct dram_channel_info *ch1)
{
return !memcmp(ch0, ch1, sizeof(*ch0)) &&
- (ch0->s_info.size == 0 ||
- !memcmp(&ch0->l_info, &ch0->s_info, sizeof(ch0->l_info)));
+ (ch0->dimm_s.size == 0 ||
+ !memcmp(&ch0->dimm_l, &ch0->dimm_s, sizeof(ch0->dimm_l)));
}
static int
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 84e3e3a0bd1e..41b7530b3d05 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -2057,7 +2057,7 @@ struct dram_dimm_info {
};
struct dram_channel_info {
- struct dram_dimm_info l_info, s_info;
+ struct dram_dimm_info dimm_l, dimm_s;
u8 ranks;
bool is_16gb_dimm;
};
--
2.19.2
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2019-03-06 20:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-06 20:35 [PATCH v2 00/12] Polish DRAM information readout code Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 01/12] drm/i915: Store DIMM rank information as a number Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 02/12] drm/i915: Extract functions to derive SKL+ DIMM info Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 03/12] drm/i915: Polish skl_is_16gb_dimm() Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 04/12] drm/i915: Extract BXT DIMM helpers Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 05/12] drm/i915: Fix DRAM size reporting for BXT Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 06/12] drm/i915: Extract DIMM info on GLK too Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 07/12] drm/i915: Use dram_dimm_info more Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 08/12] drm/i915: Generalize intel_is_dram_symmetric() Ville Syrjala
2019-03-06 20:35 ` Ville Syrjala [this message]
2019-03-06 20:35 ` [PATCH v2 10/12] drm/i915: Clean up intel_get_dram_info() a bit Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 11/12] drm/i915: Extract DIMM info on cnl+ Ville Syrjala
2019-03-06 20:35 ` [PATCH v2 12/12] drm/i915: Read out memory type Ville Syrjala
2019-03-06 20:57 ` ✗ Fi.CI.CHECKPATCH: warning for Polish DRAM information readout code (rev6) Patchwork
2019-03-06 21:02 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-03-06 21:21 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-06 23:51 ` ✓ Fi.CI.IGT: " 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=20190306203551.24592-10-ville.syrjala@linux.intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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