From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Subject: [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support
Date: Tue, 4 Jul 2023 09:09:07 -0700 [thread overview]
Message-ID: <20230704160907.2173428-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20230704160907.2173428-1-lucas.demarchi@intel.com>
Synchronize ext/intel_dram.c with the i915 source.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
drivers/gpu/drm/xe/display/ext/intel_dram.c | 40 ++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/xe/display/ext/intel_dram.c b/drivers/gpu/drm/xe/display/ext/intel_dram.c
index 3e8c413280a5..77b874ef4f22 100644
--- a/drivers/gpu/drm/xe/display/ext/intel_dram.c
+++ b/drivers/gpu/drm/xe/display/ext/intel_dram.c
@@ -464,6 +464,42 @@ static int gen12_get_dram_info(struct drm_i915_private *i915)
return icl_pcode_read_mem_global_info(i915);
}
+static int xelpdp_get_dram_info(struct drm_i915_private *i915)
+{
+ u32 val = intel_de_read(i915, MTL_MEM_SS_INFO_GLOBAL);
+ struct dram_info *dram_info = &i915->dram_info;
+
+ switch (REG_FIELD_GET(MTL_DDR_TYPE_MASK, val)) {
+ case 0:
+ dram_info->type = INTEL_DRAM_DDR4;
+ break;
+ case 1:
+ dram_info->type = INTEL_DRAM_DDR5;
+ break;
+ case 2:
+ dram_info->type = INTEL_DRAM_LPDDR5;
+ break;
+ case 3:
+ dram_info->type = INTEL_DRAM_LPDDR4;
+ break;
+ case 4:
+ dram_info->type = INTEL_DRAM_DDR3;
+ break;
+ case 5:
+ dram_info->type = INTEL_DRAM_LPDDR3;
+ break;
+ default:
+ MISSING_CASE(val);
+ return -EINVAL;
+ }
+
+ dram_info->num_channels = REG_FIELD_GET(MTL_N_OF_POPULATED_CH_MASK, val);
+ dram_info->num_qgv_points = REG_FIELD_GET(MTL_N_OF_ENABLED_QGV_POINTS_MASK, val);
+ /* PSF GV points not supported in D14+ */
+
+ return 0;
+}
+
void intel_dram_detect(struct drm_i915_private *i915)
{
struct dram_info *dram_info = &i915->dram_info;
@@ -478,7 +514,9 @@ void intel_dram_detect(struct drm_i915_private *i915)
*/
dram_info->wm_lv_0_adjust_needed = !IS_GEN9_LP(i915);
- if (GRAPHICS_VER(i915) >= 12)
+ if (DISPLAY_VER(i915) >= 14)
+ ret = xelpdp_get_dram_info(i915);
+ else if (GRAPHICS_VER(i915) >= 12)
ret = gen12_get_dram_info(i915);
else if (GRAPHICS_VER(i915) >= 11)
ret = gen11_get_dram_info(i915);
--
2.40.1
next prev parent reply other threads:[~2023-07-04 16:09 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 16:09 [Intel-xe] [PATCH 0/1] Synchronize ext/intel_dram.c with the i915 source Lucas De Marchi
2023-07-04 16:09 ` Lucas De Marchi [this message]
2023-07-04 18:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-07-04 18:23 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-07-04 18:24 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-07-04 18:28 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-07-04 18:28 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-07-04 18:29 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-07-04 19:14 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-07-05 10:13 ` [Intel-xe] [PATCH 0/1] " Jani Nikula
-- strict thread matches above, loose matches on Subject: below --
2023-09-06 20:00 [Intel-xe] [PATCH 0/1] Return -EPROBE_DEFER from xe_display_driver_probe_defer() Gustavo Sousa
2023-09-06 20:00 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
2023-09-06 20:49 ` Lucas De Marchi
2023-09-06 21:26 ` Gustavo Sousa
2023-09-08 14:42 [Intel-xe] [PATCH 0/1] Turn display finalizers into static functions Gustavo Sousa
2023-09-08 14:42 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
2023-09-08 17:41 ` Lucas De Marchi
2023-09-08 18:49 [Intel-xe] [PATCH 0/1] Remove redundant call to intel_init_display_hooks() Gustavo Sousa
2023-09-08 18:49 ` [Intel-xe] [PATCH 1/1] fixup! drm/xe/display: Implement display support Gustavo Sousa
2023-09-21 6:50 ` Balasubramani Vivekanandan
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=20230704160907.2173428-2-lucas.demarchi@intel.com \
--to=lucas.demarchi@intel.com \
--cc=intel-xe@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