All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Gustavo Sousa <gustavo.sousa@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Cc: "Ankit Nautiyal" <ankit.k.nautiyal@intel.com>,
	"Dnyaneshwar Bhadane" <dnyaneshwar.bhadane@intel.com>,
	"Jouni Högander" <jouni.hogander@intel.com>,
	"Juha-pekka Heikkila" <juha-pekka.heikkila@intel.com>,
	"Luca Coelho" <luciano.coelho@intel.com>,
	"Lucas De Marchi" <lucas.demarchi@intel.com>,
	"Matt Atwood" <matthew.s.atwood@intel.com>,
	"Matt Roper" <matthew.d.roper@intel.com>,
	"Ravi Kumar Vodapalli" <ravi.kumar.vodapalli@intel.com>,
	"Shekhar Chauhan" <shekhar.chauhan@intel.com>,
	"Vinod Govindapillai" <vinod.govindapillai@intel.com>
Subject: Re: [PATCH v2 04/32] drm/i915/dram: Add field ecc_impacting_de_bw
Date: Wed, 22 Oct 2025 14:53:34 +0300	[thread overview]
Message-ID: <2ada943edd5477b674419fb4fe8b2fe5d15ec32a@intel.com> (raw)
In-Reply-To: <176113305088.3231.10655916383519142084@intel.com>

On Wed, 22 Oct 2025, Gustavo Sousa <gustavo.sousa@intel.com> wrote:
> Quoting Gustavo Sousa (2025-10-21 21:28:29-03:00)
>>Starting with Xe3p_LPD, we now have a new field in MEM_SS_INFO_GLOBAL
>>that indicates whether the memory has enabled ECC that limits display
>>bandwidth.  Add the field ecc_impacting_de_bw to struct dram_info to
>>contain that information and set it appropriately when probing for
>>memory info.
>>
>>Currently there are no instructions in Bspec on how to handle that case,
>>so let's throw a warning if we ever find such a scenario.
>>
>>v2:
>>  - s/ecc_impacting_de/ecc_impacting_de_bw/ to be more specific. (Matt
>>    Atwood)
>>  - Add warning if ecc_impacting_de_bw is true, since we currently do
>>    not have instructions on how to handle it. (Matt Roper)
>>
>>Bspec: 69131
>>Cc: Jani Nikula <jani.nikula@linux.intel.com>
>>Cc: Matt Atwood <matthew.s.atwood@intel.com>
>>Cc: Matt Roper <matthew.d.roper@intel.com>
>>Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
>>---
>> drivers/gpu/drm/i915/display/intel_bw.c | 8 ++++++++
>> drivers/gpu/drm/i915/i915_reg.h         | 1 +
>> drivers/gpu/drm/i915/soc/intel_dram.c   | 4 ++++
>> drivers/gpu/drm/i915/soc/intel_dram.h   | 1 +
>> 4 files changed, 14 insertions(+)
>>
>>diff --git a/drivers/gpu/drm/i915/display/intel_bw.c b/drivers/gpu/drm/i915/display/intel_bw.c
>>index fc173b2a1ad9..57d65e6e5429 100644
>>--- a/drivers/gpu/drm/i915/display/intel_bw.c
>>+++ b/drivers/gpu/drm/i915/display/intel_bw.c
>>@@ -802,6 +802,14 @@ void intel_bw_init_hw(struct intel_display *display)
>>         if (!HAS_DISPLAY(display))
>>                 return;
>> 
>>+        /*
>>+         * Starting with Xe3p_LPD, the hardware tells us whether memory has ECC
>>+         * enabled that would impact display bandwidth.  However, so far there
>>+         * are no instructions in Bspec on how to handle that case.  Let's
>>+         * complain if we ever find such a scenario.
>>+         */
>>+        drm_WARN_ON_ONCE(display->drm, dram_info->ecc_impacting_de_bw);
>
> Oops.  Just realized that DG2 does not have dram_info.  Thanks, CI!
>
> I'll fix this on the next version, probably with:
>
>     drm_WARN_ON_ONCE(display->drm, dram_info &&
>     dram_info->ecc_impacting_de_bw);

The comment I added above intel_dram_info():

/*
 * Returns NULL for platforms that don't have dram info. Avoid overzealous NULL
 * checks, and prefer not dereferencing on platforms that shouldn't look at dram
 * info, to catch accidental and incorrect dram info checks.
 */

You caught the whole thing on CI *because* there was no NULL check. With
the NULL check, you'll ignore missing dram info on future platforms that
should have it.


BR,
Jani.




>
> --
> Gustavo Sousa
>
>>+
>>         if (DISPLAY_VERx100(display) >= 3002) {
>>                 tgl_get_bw_info(display, dram_info, &xe3lpd_3002_sa_info);
>>         } else if (DISPLAY_VER(display) >= 30) {
>>diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
>>index 354ef75ef6a5..5bf3b4ab2baa 100644
>>--- a/drivers/gpu/drm/i915/i915_reg.h
>>+++ b/drivers/gpu/drm/i915/i915_reg.h
>>@@ -1233,6 +1233,7 @@
>> #define   OROM_OFFSET_MASK                        REG_GENMASK(20, 16)
>> 
>> #define MTL_MEM_SS_INFO_GLOBAL                        _MMIO(0x45700)
>>+#define   XE3P_ECC_IMPACTING_DE                        REG_BIT(12)
>> #define   MTL_N_OF_ENABLED_QGV_POINTS_MASK        REG_GENMASK(11, 8)
>> #define   MTL_N_OF_POPULATED_CH_MASK                REG_GENMASK(7, 4)
>> #define   MTL_DDR_TYPE_MASK                        REG_GENMASK(3, 0)
>>diff --git a/drivers/gpu/drm/i915/soc/intel_dram.c b/drivers/gpu/drm/i915/soc/intel_dram.c
>>index 8841cfe1cac8..73e8ad1a28e0 100644
>>--- a/drivers/gpu/drm/i915/soc/intel_dram.c
>>+++ b/drivers/gpu/drm/i915/soc/intel_dram.c
>>@@ -685,6 +685,7 @@ static int gen12_get_dram_info(struct drm_i915_private *i915, struct dram_info *
>> 
>> static int xelpdp_get_dram_info(struct drm_i915_private *i915, struct dram_info *dram_info)
>> {
>>+        struct intel_display *display = i915->display;
>>         u32 val = intel_uncore_read(&i915->uncore, MTL_MEM_SS_INFO_GLOBAL);
>> 
>>         switch (REG_FIELD_GET(MTL_DDR_TYPE_MASK, val)) {
>>@@ -723,6 +724,9 @@ static int xelpdp_get_dram_info(struct drm_i915_private *i915, struct dram_info
>>         dram_info->num_qgv_points = REG_FIELD_GET(MTL_N_OF_ENABLED_QGV_POINTS_MASK, val);
>>         /* PSF GV points not supported in D14+ */
>> 
>>+        if (DISPLAY_VER(display) >= 35)
>>+                dram_info->ecc_impacting_de_bw = REG_FIELD_GET(XE3P_ECC_IMPACTING_DE, val);
>>+
>>         return 0;
>> }
>> 
>>diff --git a/drivers/gpu/drm/i915/soc/intel_dram.h b/drivers/gpu/drm/i915/soc/intel_dram.h
>>index 03a973f1c941..8475ee379daa 100644
>>--- a/drivers/gpu/drm/i915/soc/intel_dram.h
>>+++ b/drivers/gpu/drm/i915/soc/intel_dram.h
>>@@ -30,6 +30,7 @@ struct dram_info {
>>         u8 num_channels;
>>         u8 num_qgv_points;
>>         u8 num_psf_gv_points;
>>+        bool ecc_impacting_de_bw; /* Only valid from Xe3p_LPD onward. */
>>         bool symmetric_memory;
>>         bool has_16gb_dimms;
>> };
>>
>>-- 
>>2.51.0
>>

-- 
Jani Nikula, Intel

  reply	other threads:[~2025-10-22 11:53 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22  0:28 [PATCH v2 00/32] drm/i915/display: Add initial support for Xe3p_LPD Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 01/32] drm/i915/xe3p_lpd: Add Xe3p_LPD display IP features Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 02/32] drm/i915/xe3p_lpd: Drop north display reset option programming Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 03/32] drm/i915/display: Use braces for if-ladder in intel_bw_init_hw() Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 04/32] drm/i915/dram: Add field ecc_impacting_de_bw Gustavo Sousa
2025-10-22 11:37   ` Gustavo Sousa
2025-10-22 11:53     ` Jani Nikula [this message]
2025-10-22 12:12       ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 05/32] drm/i915/xe3p_lpd: Update bandwidth parameters Gustavo Sousa
2025-10-22 14:56   ` Matt Roper
2025-10-27 22:26     ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 06/32] drm/i915/xe3p_lpd: Expand bifield masks dbuf blocks fields Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 07/32] drm/i915/xe3p_lpd: Support UINT16 formats Gustavo Sousa
2025-10-22 12:28   ` Ville Syrjälä
2025-10-22 17:58     ` Matt Roper
2025-10-27 19:41       ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 08/32] drm/i915/xe3p_lpd: Extend FBC support to " Gustavo Sousa
2025-10-22 12:39   ` Ville Syrjälä
2025-10-22  0:28 ` [PATCH v2 09/32] drm/i915/xe3p_lpd: Horizontal flip support for linear surfaces Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 10/32] drm/i915/xe3p_lpd: Wait for AUX channel power status Gustavo Sousa
2025-10-29 20:06   ` Matt Roper
2025-10-29 20:50     ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 11/32] drm/i915/xe3p_lpd: Underrun debuggability and error codes/hints Gustavo Sousa
2025-10-29 20:54   ` Matt Roper
2025-10-30 21:56     ` Gustavo Sousa
2025-10-31 22:17       ` Matt Roper
2025-10-31 22:41         ` Gustavo Sousa
2025-11-11  0:44         ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 12/32] drm/i915/xe3p_lpd: Remove gamma,csc bottom color checks Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 13/32] drm/i915/xe3p_lpd: Adapt to updates on MBUS_CTL/DBUF_CTL registers Gustavo Sousa
2025-10-29 21:22   ` Matt Roper
2025-10-31  2:48     ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 14/32] drm/i915/wm: Reorder adjust_wm_latency() for Xe3_LPD Gustavo Sousa
2025-10-29 21:53   ` Matt Roper
2025-10-29 22:22   ` Ville Syrjälä
2025-10-29 22:36     ` Ville Syrjälä
2025-10-30 13:45       ` Gustavo Sousa
2025-10-30 15:38         ` Ville Syrjälä
2025-10-30 13:48     ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 15/32] drm/i915/xe3p_lpd: Always apply level-0 watermark adjustment Gustavo Sousa
2025-10-29 22:08   ` Matt Roper
2025-10-29 22:39     ` Ville Syrjälä
2025-10-30 13:53       ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 16/32] drm/i915/xe3p_lpd: Add CDCLK table Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 17/32] drm/i915/xe3p_lpd: Load DMC firmware Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 18/32] drm/i915/xe3p_lpd: Drop support for interlace mode Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 19/32] drm/i915/xe3p_lpd: PSR SU minimum lines is 4 Gustavo Sousa
2025-10-29 22:14   ` Matt Roper
2025-10-31 17:36     ` Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 20/32] drm/i915/xe3p_lpd: Enable system caching for FBC Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 21/32] drm/i915/xe3p_lpd: Extend Wa_16025573575 Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 22/32] drm/i915/xe3p_lpd: Don't allow odd ypan or ysize with semiplanar format Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 23/32] drm/i915/xe3p_lpd: Reload DMC MMIO for pipes C and D Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 24/32] drm/i915/xe3p_lpd: Introduce pixel normalizer config support Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 25/32] drm/i915/xe3p_lpd: Add FBC support for FP16 formats Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 26/32] drm/i915/xe3p_lpd: Enable pixel normalizer for fp16 formats for FBC Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 27/32] drm/i915/vbt: Add fields dedicated_external and dyn_port_over_tc Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 28/32] drm/i915/power: Use intel_encoder_is_tc() Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 29/32] drm/i915/display: Handle dedicated external ports in intel_encoder_is_tc() Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 30/32] drm/i915/wm: don't use method1 in Xe3p_LPD onwards Gustavo Sousa
2025-10-22 15:08   ` Shekhar Chauhan
2025-10-22  0:28 ` [PATCH v2 31/32] drm/i915/xe3p_lpd: Extend Type-C flow for static DDI allocation Gustavo Sousa
2025-10-22  0:28 ` [PATCH v2 32/32] drm/i915/nvls: Add NVL-S display support Gustavo Sousa
2025-10-22 15:12   ` Shekhar Chauhan
2025-10-22  1:38 ` ✗ CI.checkpatch: warning for drm/i915/display: Add initial support for Xe3p_LPD (rev2) Patchwork
2025-10-22  1:39 ` ✓ CI.KUnit: success " Patchwork
2025-10-22  1:46 ` ✗ i915.CI.BAT: failure " Patchwork
2025-10-22  1:55 ` ✗ CI.checksparse: warning " Patchwork
2025-10-22  2:25 ` ✓ Xe.CI.BAT: success " Patchwork
2025-10-22  4:56 ` ✓ Xe.CI.Full: " Patchwork

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=2ada943edd5477b674419fb4fe8b2fe5d15ec32a@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dnyaneshwar.bhadane@intel.com \
    --cc=gustavo.sousa@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jouni.hogander@intel.com \
    --cc=juha-pekka.heikkila@intel.com \
    --cc=lucas.demarchi@intel.com \
    --cc=luciano.coelho@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=matthew.s.atwood@intel.com \
    --cc=ravi.kumar.vodapalli@intel.com \
    --cc=shekhar.chauhan@intel.com \
    --cc=vinod.govindapillai@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.