* [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam
@ 2023-03-22 18:12 Ville Syrjala
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Ville Syrjala @ 2023-03-22 18:12 UTC (permalink / raw)
To: intel-gfx
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
Currently we have no sane way to forcibly disable SAGV, which
makes debugging things a PITA. Manually poking at the pcode
mailbox with it's various SAGV/QGV/PSF formats is no fun,
and likely to be clobbered by the driver anyway.
Let's add a modparam for this.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++++
drivers/gpu/drm/i915/i915_params.c | 3 +++
drivers/gpu/drm/i915/i915_params.h | 1 +
3 files changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 50a9a6adbe32..ff70225c0263 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -411,6 +411,9 @@ static bool intel_crtc_can_enable_sagv(const struct intel_crtc_state *crtc_state
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
+ if (!i915->params.enable_sagv)
+ return false;
+
if (DISPLAY_VER(i915) >= 12)
return tgl_crtc_can_enable_sagv(crtc_state);
else
@@ -3696,6 +3699,7 @@ static int intel_sagv_status_show(struct seq_file *m, void *unused)
};
seq_printf(m, "SAGV available: %s\n", str_yes_no(intel_has_sagv(i915)));
+ seq_printf(m, "SAGV modparam: %s\n", str_enabled_disabled(i915->params.enable_sagv));
seq_printf(m, "SAGV status: %s\n", sagv_status[i915->display.sagv.status]);
seq_printf(m, "SAGV block time: %d usec\n", i915->display.sagv.block_time_us);
diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
index ade744cccfea..66141906ea05 100644
--- a/drivers/gpu/drm/i915/i915_params.c
+++ b/drivers/gpu/drm/i915/i915_params.c
@@ -121,6 +121,9 @@ i915_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
"(0=disabled, 1=enabled) "
"Default: 0");
+i915_param_named_unsafe(enable_sagv, bool, 0600,
+ "Enable system agent voltage/frequency scaling (SAGV) (default: true)");
+
i915_param_named_unsafe(force_probe, charp, 0400,
"Force probe options for specified supported devices. "
"See CONFIG_DRM_I915_FORCE_PROBE for details.");
diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 3f51f90145b6..6798b5c2363d 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -56,6 +56,7 @@ struct drm_printer;
param(int, enable_psr, -1, 0600) \
param(bool, psr_safest_params, false, 0400) \
param(bool, enable_psr2_sel_fetch, true, 0400) \
+ param(bool, enable_sagv, true, 0600) \
param(int, disable_power_well, -1, 0400) \
param(int, enable_ips, 1, 0600) \
param(int, invert_brightness, 0, 0600) \
--
2.39.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add i915.enable_sagv modparam
2023-03-22 18:12 [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam Ville Syrjala
@ 2023-03-22 18:37 ` Patchwork
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-03-22 18:37 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Add i915.enable_sagv modparam
URL : https://patchwork.freedesktop.org/series/115523/
State : warning
== Summary ==
Error: dim checkpatch failed
0c284872ae1b drm/i915: Add i915.enable_sagv modparam
-:49: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#49: FILE: drivers/gpu/drm/i915/i915_params.c:125:
+i915_param_named_unsafe(enable_sagv, bool, 0600,
+ "Enable system agent voltage/frequency scaling (SAGV) (default: true)");
total: 0 errors, 0 warnings, 1 checks, 32 lines checked
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Add i915.enable_sagv modparam
2023-03-22 18:12 [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam Ville Syrjala
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
@ 2023-03-22 18:37 ` Patchwork
2023-03-22 18:50 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-03-22 20:36 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-03-22 18:37 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Add i915.enable_sagv modparam
URL : https://patchwork.freedesktop.org/series/115523/
State : warning
== Summary ==
Error: dim sparse failed
Sparse version: v0.6.2
Fast mode used, each commit won't be checked separately.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Add i915.enable_sagv modparam
2023-03-22 18:12 [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam Ville Syrjala
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
@ 2023-03-22 18:50 ` Patchwork
2023-03-22 20:36 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
3 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-03-22 18:50 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 6965 bytes --]
== Series Details ==
Series: drm/i915: Add i915.enable_sagv modparam
URL : https://patchwork.freedesktop.org/series/115523/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_12898 -> Patchwork_115523v1
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_115523v1 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_115523v1, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/index.html
Participating hosts (37 -> 36)
------------------------------
Missing (1): fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_115523v1:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@slpc:
- bat-dg2-11: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-dg2-11/igt@i915_selftest@live@slpc.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-dg2-11/igt@i915_selftest@live@slpc.html
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck@pipe-d-dp-1:
- bat-dg2-8: [PASS][3] -> [FAIL][4]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-dg2-8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck@pipe-d-dp-1.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-dg2-8/igt@kms_pipe_crc_basic@compare-crc-sanitycheck@pipe-d-dp-1.html
Known issues
------------
Here are the changes found in Patchwork_115523v1 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@i915_selftest@live@mman:
- bat-rpls-2: [PASS][5] -> [TIMEOUT][6] ([i915#6794])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-rpls-2/igt@i915_selftest@live@mman.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-rpls-2/igt@i915_selftest@live@mman.html
- bat-rpls-1: [PASS][7] -> [TIMEOUT][8] ([i915#6794])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-rpls-1/igt@i915_selftest@live@mman.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-rpls-1/igt@i915_selftest@live@mman.html
* igt@kms_chamelium_hpd@common-hpd-after-suspend:
- bat-rpls-2: NOTRUN -> [SKIP][9] ([i915#7828])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-rpls-2/igt@kms_chamelium_hpd@common-hpd-after-suspend.html
- bat-jsl-3: NOTRUN -> [SKIP][10] ([i915#7828])
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-jsl-3/igt@kms_chamelium_hpd@common-hpd-after-suspend.html
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-dg2-11: NOTRUN -> [SKIP][11] ([i915#5354]) +1 similar issue
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-dg2-11/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
* igt@kms_pipe_crc_basic@suspend-read-crc:
- bat-rpls-2: NOTRUN -> [SKIP][12] ([i915#1845])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-rpls-2/igt@kms_pipe_crc_basic@suspend-read-crc.html
#### Possible fixes ####
* igt@i915_pm_rpm@module-reload:
- bat-jsl-3: [INCOMPLETE][13] -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-jsl-3/igt@i915_pm_rpm@module-reload.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-jsl-3/igt@i915_pm_rpm@module-reload.html
* igt@i915_pm_rps@basic-api:
- bat-dg2-11: [FAIL][15] -> [PASS][16]
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-dg2-11/igt@i915_pm_rps@basic-api.html
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-dg2-11/igt@i915_pm_rps@basic-api.html
* igt@i915_selftest@live@gt_heartbeat:
- {bat-kbl-2}: [DMESG-FAIL][17] ([i915#7872]) -> [PASS][18]
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-kbl-2/igt@i915_selftest@live@gt_heartbeat.html
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-kbl-2/igt@i915_selftest@live@gt_heartbeat.html
- fi-glk-j4005: [DMESG-FAIL][19] ([i915#5334]) -> [PASS][20]
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/fi-glk-j4005/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@gt_pm:
- fi-tgl-1115g4: [DMESG-WARN][21] ([i915#2867]) -> [PASS][22] +16 similar issues
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/fi-tgl-1115g4/igt@i915_selftest@live@gt_pm.html
* igt@i915_suspend@basic-s2idle-without-i915:
- fi-tgl-1115g4: [DMESG-WARN][23] -> [PASS][24] +1 similar issue
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/fi-tgl-1115g4/igt@i915_suspend@basic-s2idle-without-i915.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/fi-tgl-1115g4/igt@i915_suspend@basic-s2idle-without-i915.html
- bat-rpls-2: [ABORT][25] -> [PASS][26]
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12898/bat-rpls-2/igt@i915_suspend@basic-s2idle-without-i915.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/bat-rpls-2/igt@i915_suspend@basic-s2idle-without-i915.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#2867]: https://gitlab.freedesktop.org/drm/intel/issues/2867
[i915#5334]: https://gitlab.freedesktop.org/drm/intel/issues/5334
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#6794]: https://gitlab.freedesktop.org/drm/intel/issues/6794
[i915#7828]: https://gitlab.freedesktop.org/drm/intel/issues/7828
[i915#7872]: https://gitlab.freedesktop.org/drm/intel/issues/7872
Build changes
-------------
* Linux: CI_DRM_12898 -> Patchwork_115523v1
CI-20190529: 20190529
CI_DRM_12898: 9a9dac47731f0f0b37f2aa741f92984d2e42f830 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_7211: c0cc1de7b2f4041ca68960362aa55f881d416bac @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_115523v1: 9a9dac47731f0f0b37f2aa741f92984d2e42f830 @ git://anongit.freedesktop.org/gfx-ci/linux
### Linux commits
b0fa2550c37a drm/i915: Add i915.enable_sagv modparam
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_115523v1/index.html
[-- Attachment #2: Type: text/html, Size: 8101 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam
2023-03-22 18:12 [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam Ville Syrjala
` (2 preceding siblings ...)
2023-03-22 18:50 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
@ 2023-03-22 20:36 ` Rodrigo Vivi
2023-03-22 21:22 ` Ville Syrjälä
3 siblings, 1 reply; 7+ messages in thread
From: Rodrigo Vivi @ 2023-03-22 20:36 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
On Wed, Mar 22, 2023 at 08:12:19PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Currently we have no sane way to forcibly disable SAGV, which
> makes debugging things a PITA. Manually poking at the pcode
> mailbox with it's various SAGV/QGV/PSF formats is no fun,
> and likely to be clobbered by the driver anyway.
>
> Let's add a modparam for this.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++++
> drivers/gpu/drm/i915/i915_params.c | 3 +++
> drivers/gpu/drm/i915/i915_params.h | 1 +
> 3 files changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> index 50a9a6adbe32..ff70225c0263 100644
> --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> @@ -411,6 +411,9 @@ static bool intel_crtc_can_enable_sagv(const struct intel_crtc_state *crtc_state
> struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> struct drm_i915_private *i915 = to_i915(crtc->base.dev);
>
> + if (!i915->params.enable_sagv)
> + return false;
would this be one more ifdef for xe?
should we hide this on a HAS_SAGV?
anyway, let's move on:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> +
> if (DISPLAY_VER(i915) >= 12)
> return tgl_crtc_can_enable_sagv(crtc_state);
> else
> @@ -3696,6 +3699,7 @@ static int intel_sagv_status_show(struct seq_file *m, void *unused)
> };
>
> seq_printf(m, "SAGV available: %s\n", str_yes_no(intel_has_sagv(i915)));
> + seq_printf(m, "SAGV modparam: %s\n", str_enabled_disabled(i915->params.enable_sagv));
> seq_printf(m, "SAGV status: %s\n", sagv_status[i915->display.sagv.status]);
> seq_printf(m, "SAGV block time: %d usec\n", i915->display.sagv.block_time_us);
>
> diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> index ade744cccfea..66141906ea05 100644
> --- a/drivers/gpu/drm/i915/i915_params.c
> +++ b/drivers/gpu/drm/i915/i915_params.c
> @@ -121,6 +121,9 @@ i915_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
> "(0=disabled, 1=enabled) "
> "Default: 0");
>
> +i915_param_named_unsafe(enable_sagv, bool, 0600,
> + "Enable system agent voltage/frequency scaling (SAGV) (default: true)");
> +
> i915_param_named_unsafe(force_probe, charp, 0400,
> "Force probe options for specified supported devices. "
> "See CONFIG_DRM_I915_FORCE_PROBE for details.");
> diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> index 3f51f90145b6..6798b5c2363d 100644
> --- a/drivers/gpu/drm/i915/i915_params.h
> +++ b/drivers/gpu/drm/i915/i915_params.h
> @@ -56,6 +56,7 @@ struct drm_printer;
> param(int, enable_psr, -1, 0600) \
> param(bool, psr_safest_params, false, 0400) \
> param(bool, enable_psr2_sel_fetch, true, 0400) \
> + param(bool, enable_sagv, true, 0600) \
> param(int, disable_power_well, -1, 0400) \
> param(int, enable_ips, 1, 0600) \
> param(int, invert_brightness, 0, 0600) \
> --
> 2.39.2
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam
2023-03-22 20:36 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
@ 2023-03-22 21:22 ` Ville Syrjälä
2023-03-22 22:00 ` Rodrigo Vivi
0 siblings, 1 reply; 7+ messages in thread
From: Ville Syrjälä @ 2023-03-22 21:22 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx
On Wed, Mar 22, 2023 at 04:36:09PM -0400, Rodrigo Vivi wrote:
> On Wed, Mar 22, 2023 at 08:12:19PM +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Currently we have no sane way to forcibly disable SAGV, which
> > makes debugging things a PITA. Manually poking at the pcode
> > mailbox with it's various SAGV/QGV/PSF formats is no fun,
> > and likely to be clobbered by the driver anyway.
> >
> > Let's add a modparam for this.
> >
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++++
> > drivers/gpu/drm/i915/i915_params.c | 3 +++
> > drivers/gpu/drm/i915/i915_params.h | 1 +
> > 3 files changed, 8 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> > index 50a9a6adbe32..ff70225c0263 100644
> > --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> > +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> > @@ -411,6 +411,9 @@ static bool intel_crtc_can_enable_sagv(const struct intel_crtc_state *crtc_state
> > struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> > struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> >
> > + if (!i915->params.enable_sagv)
> > + return false;
>
> would this be one more ifdef for xe?
Why? xe needs it just as much.
> should we hide this on a HAS_SAGV?
If we have no sagv then we're not going to enable sagv anyway.
Doesn't matter if it's blocked a few lines earlier by the
modparam rather than falling through to checking the other
stuff.
>
> anyway, let's move on:
>
> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Thanks
>
>
> > +
> > if (DISPLAY_VER(i915) >= 12)
> > return tgl_crtc_can_enable_sagv(crtc_state);
> > else
> > @@ -3696,6 +3699,7 @@ static int intel_sagv_status_show(struct seq_file *m, void *unused)
> > };
> >
> > seq_printf(m, "SAGV available: %s\n", str_yes_no(intel_has_sagv(i915)));
> > + seq_printf(m, "SAGV modparam: %s\n", str_enabled_disabled(i915->params.enable_sagv));
> > seq_printf(m, "SAGV status: %s\n", sagv_status[i915->display.sagv.status]);
> > seq_printf(m, "SAGV block time: %d usec\n", i915->display.sagv.block_time_us);
> >
> > diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> > index ade744cccfea..66141906ea05 100644
> > --- a/drivers/gpu/drm/i915/i915_params.c
> > +++ b/drivers/gpu/drm/i915/i915_params.c
> > @@ -121,6 +121,9 @@ i915_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
> > "(0=disabled, 1=enabled) "
> > "Default: 0");
> >
> > +i915_param_named_unsafe(enable_sagv, bool, 0600,
> > + "Enable system agent voltage/frequency scaling (SAGV) (default: true)");
> > +
> > i915_param_named_unsafe(force_probe, charp, 0400,
> > "Force probe options for specified supported devices. "
> > "See CONFIG_DRM_I915_FORCE_PROBE for details.");
> > diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> > index 3f51f90145b6..6798b5c2363d 100644
> > --- a/drivers/gpu/drm/i915/i915_params.h
> > +++ b/drivers/gpu/drm/i915/i915_params.h
> > @@ -56,6 +56,7 @@ struct drm_printer;
> > param(int, enable_psr, -1, 0600) \
> > param(bool, psr_safest_params, false, 0400) \
> > param(bool, enable_psr2_sel_fetch, true, 0400) \
> > + param(bool, enable_sagv, true, 0600) \
> > param(int, disable_power_well, -1, 0400) \
> > param(int, enable_ips, 1, 0600) \
> > param(int, invert_brightness, 0, 0600) \
> > --
> > 2.39.2
> >
--
Ville Syrjälä
Intel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam
2023-03-22 21:22 ` Ville Syrjälä
@ 2023-03-22 22:00 ` Rodrigo Vivi
0 siblings, 0 replies; 7+ messages in thread
From: Rodrigo Vivi @ 2023-03-22 22:00 UTC (permalink / raw)
To: Ville Syrjälä; +Cc: intel-gfx
On Wed, Mar 22, 2023 at 11:22:56PM +0200, Ville Syrjälä wrote:
> On Wed, Mar 22, 2023 at 04:36:09PM -0400, Rodrigo Vivi wrote:
> > On Wed, Mar 22, 2023 at 08:12:19PM +0200, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > Currently we have no sane way to forcibly disable SAGV, which
> > > makes debugging things a PITA. Manually poking at the pcode
> > > mailbox with it's various SAGV/QGV/PSF formats is no fun,
> > > and likely to be clobbered by the driver anyway.
> > >
> > > Let's add a modparam for this.
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > ---
> > > drivers/gpu/drm/i915/display/skl_watermark.c | 4 ++++
> > > drivers/gpu/drm/i915/i915_params.c | 3 +++
> > > drivers/gpu/drm/i915/i915_params.h | 1 +
> > > 3 files changed, 8 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
> > > index 50a9a6adbe32..ff70225c0263 100644
> > > --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> > > +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> > > @@ -411,6 +411,9 @@ static bool intel_crtc_can_enable_sagv(const struct intel_crtc_state *crtc_state
> > > struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> > > struct drm_i915_private *i915 = to_i915(crtc->base.dev);
> > >
> > > + if (!i915->params.enable_sagv)
> > > + return false;
> >
> > would this be one more ifdef for xe?
>
> Why? xe needs it just as much.
yes, I know... but the param will be different...
open like this we need to have ifdef, or we need to hide in a macro,
or have it in a xe/ext/display/ duplicated file...
it was a comment more to raise the thoughts around items like this
that impacts xe... definitely not a blocker or anything like that...
>
> > should we hide this on a HAS_SAGV?
>
> If we have no sagv then we're not going to enable sagv anyway.
> Doesn't matter if it's blocked a few lines earlier by the
> modparam rather than falling through to checking the other
> stuff.
>
> >
> > anyway, let's move on:
> >
> > Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Thanks
>
> >
> >
> > > +
> > > if (DISPLAY_VER(i915) >= 12)
> > > return tgl_crtc_can_enable_sagv(crtc_state);
> > > else
> > > @@ -3696,6 +3699,7 @@ static int intel_sagv_status_show(struct seq_file *m, void *unused)
> > > };
> > >
> > > seq_printf(m, "SAGV available: %s\n", str_yes_no(intel_has_sagv(i915)));
> > > + seq_printf(m, "SAGV modparam: %s\n", str_enabled_disabled(i915->params.enable_sagv));
> > > seq_printf(m, "SAGV status: %s\n", sagv_status[i915->display.sagv.status]);
> > > seq_printf(m, "SAGV block time: %d usec\n", i915->display.sagv.block_time_us);
> > >
> > > diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c
> > > index ade744cccfea..66141906ea05 100644
> > > --- a/drivers/gpu/drm/i915/i915_params.c
> > > +++ b/drivers/gpu/drm/i915/i915_params.c
> > > @@ -121,6 +121,9 @@ i915_param_named_unsafe(enable_psr2_sel_fetch, bool, 0400,
> > > "(0=disabled, 1=enabled) "
> > > "Default: 0");
> > >
> > > +i915_param_named_unsafe(enable_sagv, bool, 0600,
> > > + "Enable system agent voltage/frequency scaling (SAGV) (default: true)");
> > > +
> > > i915_param_named_unsafe(force_probe, charp, 0400,
> > > "Force probe options for specified supported devices. "
> > > "See CONFIG_DRM_I915_FORCE_PROBE for details.");
> > > diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
> > > index 3f51f90145b6..6798b5c2363d 100644
> > > --- a/drivers/gpu/drm/i915/i915_params.h
> > > +++ b/drivers/gpu/drm/i915/i915_params.h
> > > @@ -56,6 +56,7 @@ struct drm_printer;
> > > param(int, enable_psr, -1, 0600) \
> > > param(bool, psr_safest_params, false, 0400) \
> > > param(bool, enable_psr2_sel_fetch, true, 0400) \
> > > + param(bool, enable_sagv, true, 0600) \
> > > param(int, disable_power_well, -1, 0400) \
> > > param(int, enable_ips, 1, 0600) \
> > > param(int, invert_brightness, 0, 0600) \
> > > --
> > > 2.39.2
> > >
>
> --
> Ville Syrjälä
> Intel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-03-22 22:00 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-22 18:12 [Intel-gfx] [PATCH] drm/i915: Add i915.enable_sagv modparam Ville Syrjala
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2023-03-22 18:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2023-03-22 18:50 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-03-22 20:36 ` [Intel-gfx] [PATCH] " Rodrigo Vivi
2023-03-22 21:22 ` Ville Syrjälä
2023-03-22 22:00 ` Rodrigo Vivi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).