From patchwork Mon Feb 25 20:29:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ville Syrjala X-Patchwork-Id: 10829133 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D3F9139A for ; Mon, 25 Feb 2019 20:29:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3E8012B687 for ; Mon, 25 Feb 2019 20:29:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 333982B769; Mon, 25 Feb 2019 20:29:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DE8112B687 for ; Mon, 25 Feb 2019 20:29:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7041A89BF4; Mon, 25 Feb 2019 20:29:36 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5BCC989BF4 for ; Mon, 25 Feb 2019 20:29:35 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Feb 2019 12:29:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,412,1544515200"; d="scan'208";a="146451479" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga002.fm.intel.com with SMTP; 25 Feb 2019 12:29:32 -0800 Received: by stinkbox (sSMTP sendmail emulation); Mon, 25 Feb 2019 22:29:32 +0200 From: Ville Syrjala To: intel-gfx@lists.freedesktop.org Date: Mon, 25 Feb 2019 22:29:04 +0200 Message-Id: <20190225202907.731-10-ville.syrjala@linux.intel.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190225202907.731-1-ville.syrjala@linux.intel.com> References: <20190225202907.731-1-ville.syrjala@linux.intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 09/12] drm/i914: s/l_info/dimm_l/ etc. X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP From: Ville Syrjälä Rename the dimm info structs for clarity. Signed-off-by: Ville Syrjälä Reviewed-by: Jani Nikula --- 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 9261bd0dccd6..21413069a480 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1129,24 +1129,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%d 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%d ranks: %d, 16Gb DIMMs: %s\n", channel, ch->ranks, yesno(ch->is_16gb_dimm)); @@ -1159,8 +1159,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 fcde09934bb5..89881b68dcb4 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2070,7 +2070,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; };