Commit 1f1257a6 authored by Clint Taylor's avatar Clint Taylor Committed by José Roberto de Souza

drm/i915/display: support ddr5 mem types

Add DDR5 and LPDDR5 return values from punit fw.

BSPEC: 54023
Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarClint Taylor <clinton.a.taylor@intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210204200458.21875-1-clinton.a.taylor@intel.com
parent 41751b3e
...@@ -78,7 +78,17 @@ static int icl_get_qgv_points(struct drm_i915_private *dev_priv, ...@@ -78,7 +78,17 @@ static int icl_get_qgv_points(struct drm_i915_private *dev_priv,
qi->num_points = dram_info->num_qgv_points; qi->num_points = dram_info->num_qgv_points;
if (IS_GEN(dev_priv, 12)) if (IS_GEN(dev_priv, 12))
qi->t_bl = dev_priv->dram_info.type == INTEL_DRAM_DDR4 ? 4 : 16; switch (dram_info->type) {
case INTEL_DRAM_DDR4:
qi->t_bl = 4;
break;
case INTEL_DRAM_DDR5:
qi->t_bl = 8;
break;
default:
qi->t_bl = 16;
break;
}
else if (IS_GEN(dev_priv, 11)) else if (IS_GEN(dev_priv, 11))
qi->t_bl = dev_priv->dram_info.type == INTEL_DRAM_DDR4 ? 4 : 8; qi->t_bl = dev_priv->dram_info.type == INTEL_DRAM_DDR4 ? 4 : 8;
......
...@@ -1133,7 +1133,9 @@ struct drm_i915_private { ...@@ -1133,7 +1133,9 @@ struct drm_i915_private {
INTEL_DRAM_DDR3, INTEL_DRAM_DDR3,
INTEL_DRAM_DDR4, INTEL_DRAM_DDR4,
INTEL_DRAM_LPDDR3, INTEL_DRAM_LPDDR3,
INTEL_DRAM_LPDDR4 INTEL_DRAM_LPDDR4,
INTEL_DRAM_DDR5,
INTEL_DRAM_LPDDR5,
} type; } type;
u8 num_qgv_points; u8 num_qgv_points;
} dram_info; } dram_info;
......
...@@ -427,6 +427,12 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv) ...@@ -427,6 +427,12 @@ static int icl_pcode_read_mem_global_info(struct drm_i915_private *dev_priv)
case 0: case 0:
dram_info->type = INTEL_DRAM_DDR4; dram_info->type = INTEL_DRAM_DDR4;
break; break;
case 1:
dram_info->type = INTEL_DRAM_DDR5;
break;
case 2:
dram_info->type = INTEL_DRAM_LPDDR5;
break;
case 3: case 3:
dram_info->type = INTEL_DRAM_LPDDR4; dram_info->type = INTEL_DRAM_LPDDR4;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment