Skip to content

Commit ec35c41

Browse files
author
Radhakrishna Sripada
committed
drm/i915/mtl: Fix dram info readout
MEM_SS_INFO_GLOBAL Register info read from the hardware is cached in val. However the variable is being modified when determining the DRAM type thereby clearing out the channels and qgv info extracted later in the function xelpdp_get_dram_info. Preserve the register value and use extracted fields in the switch statement. Fixes: 825477e ("drm/i915/mtl: Obtain SAGV values from MMIO instead of GT pcode mailbox") Cc: Matt Roper <[email protected]> Signed-off-by: Radhakrishna Sripada <[email protected]> Reviewed-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent dc73ac6 commit ec35c41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/i915/intel_dram.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,7 @@ static int xelpdp_get_dram_info(struct drm_i915_private *i915)
471471
u32 val = intel_uncore_read(&i915->uncore, MTL_MEM_SS_INFO_GLOBAL);
472472
struct dram_info *dram_info = &i915->dram_info;
473473

474-
val = REG_FIELD_GET(MTL_DDR_TYPE_MASK, val);
475-
switch (val) {
474+
switch (REG_FIELD_GET(MTL_DDR_TYPE_MASK, val)) {
476475
case 0:
477476
dram_info->type = INTEL_DRAM_DDR4;
478477
break;

0 commit comments

Comments
 (0)