From: Jani Nikula <jani.nikula@linux.intel.com>
To: Raag Jadav <raag.jadav@intel.com>,
joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
matthew.d.roper@intel.com, andi.shyti@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, anshuman.gupta@intel.com,
badal.nilawar@intel.com, riana.tauro@intel.com,
Raag Jadav <raag.jadav@intel.com>
Subject: Re: [PATCH v3 4/4] drm/i915/dg2: Implement Wa_14022698537
Date: Wed, 30 Oct 2024 20:39:31 +0200 [thread overview]
Message-ID: <875xp9l9jw.fsf@intel.com> (raw)
In-Reply-To: <20241030143418.410406-5-raag.jadav@intel.com>
On Wed, 30 Oct 2024, Raag Jadav <raag.jadav@intel.com> wrote:
> G8 power state entry is disabled due to a limitation on DG2, so we
> enable it from driver with Wa_14022698537. For now we enable it for
> all DG2 devices with the exception of a few, for which, we enable
> only when paired with whitelisted CPU models. This works with Native
> ASMP and reduces idle power consumption.
>
> $ echo powersave > /sys/module/pcie_aspm/parameters/policy
> $ lspci -s 0000:03:00.0 -vvv
> LnkCtl: ASPM L1 Enabled; RCB 64 bytes, Disabled- CommClk-
>
> v2: Fix Wa_ID and include it in subject (Badal)
> Rephrase commit message (Jani)
> v3: Move workaround to i915_pcode_init() (Badal, Anshuman)
> Re-order macro (Riana)
>
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>
> ---
> drivers/gpu/drm/i915/i915_driver.c | 15 +++++++++++++++
> drivers/gpu/drm/i915/i915_reg.h | 1 +
> 2 files changed, 16 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index 365329ff8a07..59c6124c9bc2 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -93,12 +93,14 @@
> #include "i915_memcpy.h"
> #include "i915_perf.h"
> #include "i915_query.h"
> +#include "i915_reg.h"
> #include "i915_suspend.h"
> #include "i915_switcheroo.h"
> #include "i915_sysfs.h"
> #include "i915_utils.h"
> #include "i915_vgpu.h"
> #include "intel_clock_gating.h"
> +#include "intel_cpu_info.h"
> #include "intel_gvt.h"
> #include "intel_memory_region.h"
> #include "intel_pci_config.h"
> @@ -415,6 +417,18 @@ static int i915_set_dma_info(struct drm_i915_private *i915)
> return ret;
> }
>
> +/* Wa_14022698537:dg2 */
> +static void i915_enable_g8(struct drm_i915_private *i915)
> +{
> + if (IS_DG2(i915)) {
> + if (IS_DG2_D(i915) && !intel_match_g8_cpu())
> + return;
You don't need to check for DG2 twice.
BR,
Jani.
> +
> + snb_pcode_write_p(&i915->uncore, PCODE_POWER_SETUP,
> + POWER_SETUP_SUBCOMMAND_G8_ENABLE, 0, 0);
> + }
> +}
> +
> static int i915_pcode_init(struct drm_i915_private *i915)
> {
> struct intel_gt *gt;
> @@ -428,6 +442,7 @@ static int i915_pcode_init(struct drm_i915_private *i915)
> }
> }
>
> + i915_enable_g8(i915);
> return 0;
> }
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 89e4381f8baa..d400c77423a5 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -3617,6 +3617,7 @@
> #define POWER_SETUP_I1_WATTS REG_BIT(31)
> #define POWER_SETUP_I1_SHIFT 6 /* 10.6 fixed point format */
> #define POWER_SETUP_I1_DATA_MASK REG_GENMASK(15, 0)
> +#define POWER_SETUP_SUBCOMMAND_G8_ENABLE 0x6
> #define GEN12_PCODE_READ_SAGV_BLOCK_TIME_US 0x23
> #define XEHP_PCODE_FREQUENCY_CONFIG 0x6e /* pvc */
> /* XEHP_PCODE_FREQUENCY_CONFIG sub-commands (param1) */
--
Jani Nikula, Intel
next prev parent reply other threads:[~2024-10-30 18:39 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 14:34 [PATCH v3 0/4] Implement Wa_14022698537 Raag Jadav
2024-10-30 14:34 ` [PATCH v3 1/4] drm/intel/pciids: Refactor DG2 PCI IDs into segment ranges Raag Jadav
2024-11-20 7:21 ` Riana Tauro
2024-12-10 11:45 ` Andi Shyti
2024-10-30 14:34 ` [PATCH v3 2/4] drm/i915/dg2: Introduce DG2_D subplatform Raag Jadav
2024-10-30 14:34 ` [PATCH v3 3/4] drm/i915: Introduce intel_cpu_info.c for CPU IDs Raag Jadav
2024-12-10 7:38 ` Riana Tauro
2024-12-10 12:03 ` Andi Shyti
2024-10-30 14:34 ` [PATCH v3 4/4] drm/i915/dg2: Implement Wa_14022698537 Raag Jadav
2024-10-30 15:34 ` Andi Shyti
2024-10-30 16:35 ` Raag Jadav
2024-10-30 18:39 ` Jani Nikula [this message]
2024-10-31 8:51 ` Raag Jadav
2024-10-31 9:27 ` Jani Nikula
2024-10-31 11:02 ` Raag Jadav
2024-12-10 8:03 ` Riana Tauro
2024-12-10 11:33 ` Raag Jadav
2024-12-10 12:52 ` Andi Shyti
2024-12-11 5:21 ` Raag Jadav
2024-12-11 9:04 ` Andi Shyti
2024-10-30 15:03 ` ✗ Fi.CI.CHECKPATCH: warning for Implement Wa_14022698537 (rev2) Patchwork
2024-10-30 15:03 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-10-30 16:20 ` ✓ Fi.CI.BAT: success " Patchwork
2024-10-30 18:40 ` [PATCH v3 0/4] Implement Wa_14022698537 Jani Nikula
2024-10-31 8:59 ` Raag Jadav
2024-11-04 16:08 ` Jani Nikula
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=875xp9l9jw.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=andi.shyti@linux.intel.com \
--cc=anshuman.gupta@intel.com \
--cc=badal.nilawar@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=matthew.d.roper@intel.com \
--cc=raag.jadav@intel.com \
--cc=riana.tauro@intel.com \
--cc=rodrigo.vivi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox