Skip to content

Commit bc1feb8

Browse files
vivekkreddyjnikula
authored andcommitted
drm/i915/xe2hpd: Identify the memory type for SKUs with GDDR + ECC
Some SKUs of Xe2_HPD platforms (such as BMG) have GDDR memory type with ECC enabled. We need to identify this scenario and add a new case in xelpdp_get_dram_info() to handle it. In addition, the derating value needs to be adjusted accordingly to compensate for the limited bandwidth. Bspec: 64602 Cc: Matt Roper <matthew.d.roper@intel.com> Fixes: 3adcf97 ("drm/xe/bmg: Drop force_probe requirement") Cc: stable@vger.kernel.org Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Acked-by: Lucas De Marchi <lucas.demarchi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250324-tip-v2-1-38397de319f8@intel.com (cherry picked from commit 327e301) Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
1 parent 584cf61 commit bc1feb8

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

drivers/gpu/drm/i915/display/intel_bw.c

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ static int icl_get_qgv_points(struct drm_i915_private *dev_priv,
244244
qi->deinterleave = 4;
245245
break;
246246
case INTEL_DRAM_GDDR:
247+
case INTEL_DRAM_GDDR_ECC:
247248
qi->channel_width = 32;
248249
break;
249250
default:
@@ -398,6 +399,12 @@ static const struct intel_sa_info xe2_hpd_sa_info = {
398399
/* Other values not used by simplified algorithm */
399400
};
400401

402+
static const struct intel_sa_info xe2_hpd_ecc_sa_info = {
403+
.derating = 45,
404+
.deprogbwlimit = 53,
405+
/* Other values not used by simplified algorithm */
406+
};
407+
401408
static int icl_get_bw_info(struct drm_i915_private *dev_priv, const struct intel_sa_info *sa)
402409
{
403410
struct intel_qgv_info qi = {};
@@ -740,10 +747,15 @@ static unsigned int icl_qgv_bw(struct drm_i915_private *i915,
740747

741748
void intel_bw_init_hw(struct drm_i915_private *dev_priv)
742749
{
750+
const struct dram_info *dram_info = &dev_priv->dram_info;
751+
743752
if (!HAS_DISPLAY(dev_priv))
744753
return;
745754

746-
if (DISPLAY_VERx100(dev_priv) >= 1401 && IS_DGFX(dev_priv))
755+
if (DISPLAY_VERx100(dev_priv) >= 1401 && IS_DGFX(dev_priv) &&
756+
dram_info->type == INTEL_DRAM_GDDR_ECC)
757+
xe2_hpd_get_bw_info(dev_priv, &xe2_hpd_ecc_sa_info);
758+
else if (DISPLAY_VERx100(dev_priv) >= 1401 && IS_DGFX(dev_priv))
747759
xe2_hpd_get_bw_info(dev_priv, &xe2_hpd_sa_info);
748760
else if (DISPLAY_VER(dev_priv) >= 14)
749761
tgl_get_bw_info(dev_priv, &mtl_sa_info);

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ struct drm_i915_private {
305305
INTEL_DRAM_DDR5,
306306
INTEL_DRAM_LPDDR5,
307307
INTEL_DRAM_GDDR,
308+
INTEL_DRAM_GDDR_ECC,
308309
} type;
309310
u8 num_qgv_points;
310311
u8 num_psf_gv_points;

drivers/gpu/drm/i915/soc/intel_dram.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -687,6 +687,10 @@ static int xelpdp_get_dram_info(struct drm_i915_private *i915)
687687
drm_WARN_ON(&i915->drm, !IS_DGFX(i915));
688688
dram_info->type = INTEL_DRAM_GDDR;
689689
break;
690+
case 9:
691+
drm_WARN_ON(&i915->drm, !IS_DGFX(i915));
692+
dram_info->type = INTEL_DRAM_GDDR_ECC;
693+
break;
690694
default:
691695
MISSING_CASE(val);
692696
return -EINVAL;

drivers/gpu/drm/xe/xe_device_types.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -585,6 +585,7 @@ struct xe_device {
585585
INTEL_DRAM_DDR5,
586586
INTEL_DRAM_LPDDR5,
587587
INTEL_DRAM_GDDR,
588+
INTEL_DRAM_GDDR_ECC,
588589
} type;
589590
u8 num_qgv_points;
590591
u8 num_psf_gv_points;

0 commit comments

Comments
 (0)