From patchwork Thu Nov 17 21:30:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sripada, Radhakrishna" X-Patchwork-Id: 13047327 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6169BC433FE for ; Thu, 17 Nov 2022 21:31:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3FC1510E68F; Thu, 17 Nov 2022 21:31:10 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id A4B7A10E693 for ; Thu, 17 Nov 2022 21:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668720667; x=1700256667; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=GnBQ0muGYOrxSXXXXPXrD8r3GO36x353WbYMg7RZAZQ=; b=Idusu6jWu6JRVFaDAcCGmpprw7gzeLeJLJ/WMJ3MIgf2spb/EMe+tZa6 TlMqM9LbKMAC7rlX6IdfuoxsazmhxCSCWD8CenYKuMFBp4LEh19yKti18 07LUSReiyeV14GQ9YhFbNaBjc/gN+jKg0zUG8LdVJdcVZn5a/pqwvVZi0 D1j+MH9FqW8tnUKl5EkeR9A1PQpREIZcmHf1U5yW1G/AtwOVUblYpm20D xoyNDyg9HFk4OLzLH0JqGL806K2L5NTthU6YhMuYgOIZdf0SNhJkxWfgu KTga+3jKO3DtiFeHmO/FgwYWFad8sd55aMLUsppoS6Sr4uw4NQi79BwBx g==; X-IronPort-AV: E=McAfee;i="6500,9779,10534"; a="300514789" X-IronPort-AV: E=Sophos;i="5.96,172,1665471600"; d="scan'208";a="300514789" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 13:31:04 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10534"; a="782397054" X-IronPort-AV: E=Sophos;i="5.96,172,1665471600"; d="scan'208";a="782397054" Received: from invictus.jf.intel.com ([10.165.21.134]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 13:31:04 -0800 From: Radhakrishna Sripada To: intel-gfx@lists.freedesktop.org Date: Thu, 17 Nov 2022 13:30:14 -0800 Message-Id: <20221117213015.584417-1-radhakrishna.sripada@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2 1/2] drm/i915/mtl: Fix dram info readout X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" Register info read from the hardware is being cleared out. Preserve the register value and use extracted fields in the logic. Fixes: 825477e77912 ("drm/i915/mtl: Obtain SAGV values from MMIO instead of GT pcode mailbox") Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/intel_dram.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_dram.c b/drivers/gpu/drm/i915/intel_dram.c index 2403ccd52c74..bba8cb6e8ae4 100644 --- a/drivers/gpu/drm/i915/intel_dram.c +++ b/drivers/gpu/drm/i915/intel_dram.c @@ -471,8 +471,7 @@ static int xelpdp_get_dram_info(struct drm_i915_private *i915) u32 val = intel_uncore_read(&i915->uncore, MTL_MEM_SS_INFO_GLOBAL); struct dram_info *dram_info = &i915->dram_info; - val = REG_FIELD_GET(MTL_DDR_TYPE_MASK, val); - switch (val) { + switch (REG_FIELD_GET(MTL_DDR_TYPE_MASK, val)) { case 0: dram_info->type = INTEL_DRAM_DDR4; break; From patchwork Thu Nov 17 21:30:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sripada, Radhakrishna" X-Patchwork-Id: 13047328 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3666C433FE for ; Thu, 17 Nov 2022 21:31:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D4A3410E693; Thu, 17 Nov 2022 21:31:11 +0000 (UTC) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7D1B610E68F for ; Thu, 17 Nov 2022 21:31:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668720667; x=1700256667; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=1B6iV+aS1uAFlD17IWPR9A0NVrwND/KluL/fZIUgUoA=; b=Rgxi6U+7RIBWLER47psrVoyuU0v7u2CSixeUsn5D35l+1mW8tGINTIvt vEgJhgQj0T2r7J7wLSaeuAGDJDOZli88RMXDyEj6AJ/Q7L+HphKtgorCM ORO5vLgHiAaXz5/ijp9Tqs28zpJHtPJLoqHTh1g6e3TwvLHn8GwX0tqdc XwPPHTRRunVyFhV1NVZVFJX2xbm3AhgH8xBqjzh77O9DT9tvWXmn3Vcsd mOiIqxihqnE7FFyB+Ihx/1TGLVhd+IWzcJj5YScMflDYexdsjCi2c7kfs nUiV4PUZxfMItcoismTrXr8VJ7aG5ofTUOY9vwflLtjCW3vmw14SpJM/H Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10534"; a="300514791" X-IronPort-AV: E=Sophos;i="5.96,172,1665471600"; d="scan'208";a="300514791" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 13:31:04 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10534"; a="782397060" X-IronPort-AV: E=Sophos;i="5.96,172,1665471600"; d="scan'208";a="782397060" Received: from invictus.jf.intel.com ([10.165.21.134]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2022 13:31:04 -0800 From: Radhakrishna Sripada To: intel-gfx@lists.freedesktop.org Date: Thu, 17 Nov 2022 13:30:15 -0800 Message-Id: <20221117213015.584417-2-radhakrishna.sripada@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221117213015.584417-1-radhakrishna.sripada@intel.com> References: <20221117213015.584417-1-radhakrishna.sripada@intel.com> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2 2/2] drm/i915/mtl: Skip doubling channel numbers for LPDDR4/LPDDDR5 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 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" MTL LPDDR5 reported 16b with 8 channels. Previous platforms reported 32b with 4 channels and hence needed a multiplication by a factor of 2. Skip increasing the channels for MTL. v2: Use version check instead of platform check(MattR) Bspec: 64631 Cc: Matt Roper Signed-off-by: Radhakrishna Sripada Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/display/intel_bw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c index 4ace026b29bd..1c236f02b380 100644 --- a/drivers/gpu/drm/i915/display/intel_bw.c +++ b/drivers/gpu/drm/i915/display/intel_bw.c @@ -439,7 +439,8 @@ static int tgl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel return ret; } - if (dram_info->type == INTEL_DRAM_LPDDR4 || dram_info->type == INTEL_DRAM_LPDDR5) + if (DISPLAY_VER(dev_priv) < 14 && + (dram_info->type == INTEL_DRAM_LPDDR4 || dram_info->type == INTEL_DRAM_LPDDR5)) num_channels *= 2; qi.deinterleave = qi.deinterleave ? : DIV_ROUND_UP(num_channels, is_y_tile ? 4 : 2);