All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
@ 2022-10-18 18:30 ` Vinay Belgaumkar
  0 siblings, 0 replies; 11+ messages in thread
From: Vinay Belgaumkar @ 2022-10-18 18:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Vinay Belgaumkar, Riana Tauro, Nirmoy Das

GuC will set the min/max frequencies to theoretical max on
ATS-M. This will break kernel ABI, so limit min/max frequency
to RP0(platform max) instead.

Also modify the SLPC selftest to update the min frequency
when we have a server part so that we can iterate between
platform min and max.

v2: Check softlimits instead of platform limits (Riana)
v3: More review comments (Ashutosh)

Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7030

Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_slpc.c       | 40 +++++++++++++------
 drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c   | 30 ++++++++++++++
 drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h   |  2 +
 .../gpu/drm/i915/gt/uc/intel_guc_slpc_types.h |  3 ++
 4 files changed, 63 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
index 4c6e9257e593..e42bc215e54d 100644
--- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
@@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
 	enum intel_engine_id id;
 	struct igt_spinner spin;
 	u32 slpc_min_freq, slpc_max_freq;
+	u32 saved_min_freq;
 	int err = 0;
 
 	if (!intel_uc_uses_guc_slpc(&gt->uc))
@@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
 		return -EIO;
 	}
 
-	/*
-	 * FIXME: With efficient frequency enabled, GuC can request
-	 * frequencies higher than the SLPC max. While this is fixed
-	 * in GuC, we level set these tests with RPn as min.
-	 */
-	err = slpc_set_min_freq(slpc, slpc->min_freq);
-	if (err)
-		return err;
+	if (slpc_min_freq == slpc_max_freq) {
+		/* Server parts will have min/max clamped to RP0 */
+		if (slpc->min_is_rpmax) {
+			err = slpc_set_min_freq(slpc, slpc->min_freq);
+			if (err) {
+				pr_err("Unable to update min freq on server part");
+				return err;
+			}
 
-	if (slpc->min_freq == slpc->rp0_freq) {
-		pr_err("Min/Max are fused to the same value\n");
-		return -EINVAL;
+		} else {
+			pr_err("Min/Max are fused to the same value\n");
+			return -EINVAL;
+		}
+	} else {
+		/*
+		 * FIXME: With efficient frequency enabled, GuC can request
+		 * frequencies higher than the SLPC max. While this is fixed
+		 * in GuC, we level set these tests with RPn as min.
+		 */
+		err = slpc_set_min_freq(slpc, slpc->min_freq);
+		if (err)
+			return err;
 	}
 
+	saved_min_freq = slpc_min_freq;
+
+	/* New temp min freq = RPn */
+	slpc_min_freq = slpc->min_freq;
+
 	intel_gt_pm_wait_for_idle(gt);
 	intel_gt_pm_get(gt);
 	for_each_engine(engine, gt, id) {
@@ -347,7 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
 
 	/* Restore min/max frequencies */
 	slpc_set_max_freq(slpc, slpc_max_freq);
-	slpc_set_min_freq(slpc, slpc_min_freq);
+	slpc_set_min_freq(slpc, saved_min_freq);
 
 	if (igt_flush_test(gt->i915))
 		err = -EIO;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
index fdd895f73f9f..b7cdeec44bd3 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
@@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
 
 	slpc->max_freq_softlimit = 0;
 	slpc->min_freq_softlimit = 0;
+	slpc->min_is_rpmax = false;
 
 	slpc->boost_freq = 0;
 	atomic_set(&slpc->num_waiters, 0);
@@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
 	return 0;
 }
 
+static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
+{
+	int slpc_min_freq;
+
+	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
+		return false;
+
+	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
+		return true;
+	else
+		return false;
+}
+
+static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
+{
+	/* For server parts, SLPC min will be at RPMax.
+	 * Use min softlimit to clamp it to RP0 instead.
+	 */
+	if (is_slpc_min_freq_rpmax(slpc) &&
+	    !slpc->min_freq_softlimit) {
+		slpc->min_is_rpmax = true;
+		slpc->min_freq_softlimit = slpc->rp0_freq;
+		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
+	}
+}
+
 static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
 {
 	/* Force SLPC to used platform rp0 */
@@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
 
 	slpc_get_rp_values(slpc);
 
+	/* Handle the case where min=max=RPmax */
+	update_server_min_softlimit(slpc);
+
 	/* Set SLPC max limit to RP0 */
 	ret = slpc_use_fused_rp0(slpc);
 	if (unlikely(ret)) {
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
index 82a98f78f96c..11975a31c9d0 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
@@ -9,6 +9,8 @@
 #include "intel_guc_submission.h"
 #include "intel_guc_slpc_types.h"
 
+#define SLPC_MAX_FREQ_MHZ 4250
+
 struct intel_gt;
 struct drm_printer;
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
index 73d208123528..a6ef53b04e04 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
@@ -19,6 +19,9 @@ struct intel_guc_slpc {
 	bool supported;
 	bool selected;
 
+	/* Indicates this is a server part */
+	bool min_is_rpmax;
+
 	/* platform frequency limits */
 	u32 min_freq;
 	u32 rp0_freq;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
@ 2022-10-18 18:30 ` Vinay Belgaumkar
  0 siblings, 0 replies; 11+ messages in thread
From: Vinay Belgaumkar @ 2022-10-18 18:30 UTC (permalink / raw)
  To: intel-gfx, dri-devel; +Cc: Nirmoy Das

GuC will set the min/max frequencies to theoretical max on
ATS-M. This will break kernel ABI, so limit min/max frequency
to RP0(platform max) instead.

Also modify the SLPC selftest to update the min frequency
when we have a server part so that we can iterate between
platform min and max.

v2: Check softlimits instead of platform limits (Riana)
v3: More review comments (Ashutosh)

Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7030

Acked-by: Nirmoy Das <nirmoy.das@intel.com>
Reviewed-by: Riana Tauro <riana.tauro@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
 drivers/gpu/drm/i915/gt/selftest_slpc.c       | 40 +++++++++++++------
 drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c   | 30 ++++++++++++++
 drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h   |  2 +
 .../gpu/drm/i915/gt/uc/intel_guc_slpc_types.h |  3 ++
 4 files changed, 63 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
index 4c6e9257e593..e42bc215e54d 100644
--- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
+++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
@@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
 	enum intel_engine_id id;
 	struct igt_spinner spin;
 	u32 slpc_min_freq, slpc_max_freq;
+	u32 saved_min_freq;
 	int err = 0;
 
 	if (!intel_uc_uses_guc_slpc(&gt->uc))
@@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
 		return -EIO;
 	}
 
-	/*
-	 * FIXME: With efficient frequency enabled, GuC can request
-	 * frequencies higher than the SLPC max. While this is fixed
-	 * in GuC, we level set these tests with RPn as min.
-	 */
-	err = slpc_set_min_freq(slpc, slpc->min_freq);
-	if (err)
-		return err;
+	if (slpc_min_freq == slpc_max_freq) {
+		/* Server parts will have min/max clamped to RP0 */
+		if (slpc->min_is_rpmax) {
+			err = slpc_set_min_freq(slpc, slpc->min_freq);
+			if (err) {
+				pr_err("Unable to update min freq on server part");
+				return err;
+			}
 
-	if (slpc->min_freq == slpc->rp0_freq) {
-		pr_err("Min/Max are fused to the same value\n");
-		return -EINVAL;
+		} else {
+			pr_err("Min/Max are fused to the same value\n");
+			return -EINVAL;
+		}
+	} else {
+		/*
+		 * FIXME: With efficient frequency enabled, GuC can request
+		 * frequencies higher than the SLPC max. While this is fixed
+		 * in GuC, we level set these tests with RPn as min.
+		 */
+		err = slpc_set_min_freq(slpc, slpc->min_freq);
+		if (err)
+			return err;
 	}
 
+	saved_min_freq = slpc_min_freq;
+
+	/* New temp min freq = RPn */
+	slpc_min_freq = slpc->min_freq;
+
 	intel_gt_pm_wait_for_idle(gt);
 	intel_gt_pm_get(gt);
 	for_each_engine(engine, gt, id) {
@@ -347,7 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
 
 	/* Restore min/max frequencies */
 	slpc_set_max_freq(slpc, slpc_max_freq);
-	slpc_set_min_freq(slpc, slpc_min_freq);
+	slpc_set_min_freq(slpc, saved_min_freq);
 
 	if (igt_flush_test(gt->i915))
 		err = -EIO;
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
index fdd895f73f9f..b7cdeec44bd3 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
@@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
 
 	slpc->max_freq_softlimit = 0;
 	slpc->min_freq_softlimit = 0;
+	slpc->min_is_rpmax = false;
 
 	slpc->boost_freq = 0;
 	atomic_set(&slpc->num_waiters, 0);
@@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
 	return 0;
 }
 
+static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
+{
+	int slpc_min_freq;
+
+	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
+		return false;
+
+	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
+		return true;
+	else
+		return false;
+}
+
+static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
+{
+	/* For server parts, SLPC min will be at RPMax.
+	 * Use min softlimit to clamp it to RP0 instead.
+	 */
+	if (is_slpc_min_freq_rpmax(slpc) &&
+	    !slpc->min_freq_softlimit) {
+		slpc->min_is_rpmax = true;
+		slpc->min_freq_softlimit = slpc->rp0_freq;
+		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
+	}
+}
+
 static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
 {
 	/* Force SLPC to used platform rp0 */
@@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
 
 	slpc_get_rp_values(slpc);
 
+	/* Handle the case where min=max=RPmax */
+	update_server_min_softlimit(slpc);
+
 	/* Set SLPC max limit to RP0 */
 	ret = slpc_use_fused_rp0(slpc);
 	if (unlikely(ret)) {
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
index 82a98f78f96c..11975a31c9d0 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
@@ -9,6 +9,8 @@
 #include "intel_guc_submission.h"
 #include "intel_guc_slpc_types.h"
 
+#define SLPC_MAX_FREQ_MHZ 4250
+
 struct intel_gt;
 struct drm_printer;
 
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
index 73d208123528..a6ef53b04e04 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc_types.h
@@ -19,6 +19,9 @@ struct intel_guc_slpc {
 	bool supported;
 	bool selected;
 
+	/* Indicates this is a server part */
+	bool min_is_rpmax;
+
 	/* platform frequency limits */
 	u32 min_freq;
 	u32 rp0_freq;
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/slpc: Use platform limits for min/max frequency (rev3)
  2022-10-18 18:30 ` [Intel-gfx] " Vinay Belgaumkar
  (?)
@ 2022-10-18 19:21 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2022-10-18 19:21 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/slpc: Use platform limits for min/max frequency (rev3)
URL   : https://patchwork.freedesktop.org/series/109632/
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] 11+ messages in thread

* [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/slpc: Use platform limits for min/max frequency (rev3)
  2022-10-18 18:30 ` [Intel-gfx] " Vinay Belgaumkar
  (?)
  (?)
@ 2022-10-18 19:39 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2022-10-18 19:39 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 3353 bytes --]

== Series Details ==

Series: drm/i915/slpc: Use platform limits for min/max frequency (rev3)
URL   : https://patchwork.freedesktop.org/series/109632/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_12257 -> Patchwork_109632v3
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/index.html

Participating hosts (41 -> 40)
------------------------------

  Additional (1): bat-adlm-1 
  Missing    (2): bat-atsm-1 fi-bdw-samus 

Known issues
------------

  Here are the changes found in Patchwork_109632v3 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_tiled_blits@basic:
    - fi-pnv-d510:        [PASS][1] -> [SKIP][2] ([fdo#109271]) +1 similar issue
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/fi-pnv-d510/igt@gem_tiled_blits@basic.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/fi-pnv-d510/igt@gem_tiled_blits@basic.html

  
#### Possible fixes ####

  * igt@i915_module_load@reload:
    - {bat-rpls-2}:       [DMESG-WARN][3] ([i915#5537]) -> [PASS][4] +1 similar issue
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/bat-rpls-2/igt@i915_module_load@reload.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/bat-rpls-2/igt@i915_module_load@reload.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#5537]: https://gitlab.freedesktop.org/drm/intel/issues/5537
  [i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
  [i915#7221]: https://gitlab.freedesktop.org/drm/intel/issues/7221


Build changes
-------------

  * Linux: CI_DRM_12257 -> Patchwork_109632v3

  CI-20190529: 20190529
  CI_DRM_12257: b249abef9f86f788e6bacc657ae8eb7743948200 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7018: 8312a2fe3f3287ba4ac4bc8d100de0734480f482 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_109632v3: b249abef9f86f788e6bacc657ae8eb7743948200 @ git://anongit.freedesktop.org/gfx-ci/linux


### Linux commits

e3a77a884651 drm/i915/slpc: Use platform limits for min/max frequency

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/index.html

[-- Attachment #2: Type: text/html, Size: 2969 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/slpc: Use platform limits for min/max frequency (rev3)
  2022-10-18 18:30 ` [Intel-gfx] " Vinay Belgaumkar
                   ` (2 preceding siblings ...)
  (?)
@ 2022-10-19 12:28 ` Patchwork
  -1 siblings, 0 replies; 11+ messages in thread
From: Patchwork @ 2022-10-19 12:28 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: intel-gfx

[-- Attachment #1: Type: text/plain, Size: 25049 bytes --]

== Series Details ==

Series: drm/i915/slpc: Use platform limits for min/max frequency (rev3)
URL   : https://patchwork.freedesktop.org/series/109632/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_12257_full -> Patchwork_109632v3_full
====================================================

Summary
-------

  **FAILURE**

  Serious unknown changes coming with Patchwork_109632v3_full absolutely need to be
  verified manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in Patchwork_109632v3_full, please notify your bug team to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (11 -> 11)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in Patchwork_109632v3_full:

### IGT changes ###

#### Possible regressions ####

  * igt@gem_workarounds@suspend-resume-context:
    - shard-apl:          NOTRUN -> [INCOMPLETE][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-apl2/igt@gem_workarounds@suspend-resume-context.html

  
#### Warnings ####

  * igt@runner@aborted:
    - shard-skl:          ([FAIL][2], [FAIL][3], [FAIL][4]) ([i915#4312]) -> ([FAIL][5], [FAIL][6], [FAIL][7]) ([i915#3002] / [i915#4312])
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-skl9/igt@runner@aborted.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-skl4/igt@runner@aborted.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-skl4/igt@runner@aborted.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl10/igt@runner@aborted.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl9/igt@runner@aborted.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@runner@aborted.html

  
#### Suppressed ####

  The following results come from untrusted machines, tests, or statuses.
  They do not affect the overall result.

  * igt@gem_ctx_persistence@hostile:
    - {shard-rkl}:        [PASS][8] -> [INCOMPLETE][9] +2 similar issues
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-1/igt@gem_ctx_persistence@hostile.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-3/igt@gem_ctx_persistence@hostile.html

  * igt@gem_exec_schedule@semaphore-power:
    - {shard-rkl}:        NOTRUN -> [SKIP][10]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-1/igt@gem_exec_schedule@semaphore-power.html

  * igt@i915_selftest@perf@request:
    - {shard-rkl}:        [PASS][11] -> [DMESG-FAIL][12]
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-4/igt@i915_selftest@perf@request.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-1/igt@i915_selftest@perf@request.html

  * igt@kms_flip@flip-vs-suspend@a-hdmi-a4:
    - {shard-dg1}:        NOTRUN -> [INCOMPLETE][13]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-dg1-18/igt@kms_flip@flip-vs-suspend@a-hdmi-a4.html

  
Known issues
------------

  Here are the changes found in Patchwork_109632v3_full that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@feature_discovery@psr2:
    - shard-iclb:         [PASS][14] -> [SKIP][15] ([i915#658])
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb2/igt@feature_discovery@psr2.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb1/igt@feature_discovery@psr2.html

  * igt@gem_exec_fair@basic-none-share@rcs0:
    - shard-iclb:         [PASS][16] -> [FAIL][17] ([i915#2842])
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb7/igt@gem_exec_fair@basic-none-share@rcs0.html
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb5/igt@gem_exec_fair@basic-none-share@rcs0.html

  * igt@gem_lmem_swapping@parallel-multi:
    - shard-skl:          NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#4613]) +1 similar issue
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl6/igt@gem_lmem_swapping@parallel-multi.html

  * igt@gem_lmem_swapping@parallel-random-verify-ccs:
    - shard-apl:          NOTRUN -> [SKIP][19] ([fdo#109271] / [i915#4613])
   [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-apl7/igt@gem_lmem_swapping@parallel-random-verify-ccs.html

  * igt@gem_tiled_wb:
    - shard-skl:          NOTRUN -> [TIMEOUT][20] ([i915#6990] / [i915#7065])
   [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@gem_tiled_wb.html

  * igt@gem_userptr_blits@input-checking:
    - shard-skl:          NOTRUN -> [DMESG-WARN][21] ([i915#4991])
   [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl9/igt@gem_userptr_blits@input-checking.html

  * igt@gem_workarounds@suspend-resume-context:
    - shard-glk:          NOTRUN -> [INCOMPLETE][22] ([i915#7231])
   [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk3/igt@gem_workarounds@suspend-resume-context.html

  * igt@i915_suspend@basic-s3-without-i915:
    - shard-glk:          NOTRUN -> [INCOMPLETE][23] ([i915#4817] / [i915#5982])
   [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk7/igt@i915_suspend@basic-s3-without-i915.html

  * igt@i915_suspend@fence-restore-untiled:
    - shard-skl:          NOTRUN -> [INCOMPLETE][24] ([i915#4817])
   [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@i915_suspend@fence-restore-untiled.html

  * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip:
    - shard-skl:          NOTRUN -> [SKIP][25] ([fdo#109271] / [i915#7206])
   [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip.html

  * igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs:
    - shard-apl:          NOTRUN -> [SKIP][26] ([fdo#109271] / [i915#3886]) +1 similar issue
   [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-apl7/igt@kms_ccs@pipe-a-ccs-on-another-bo-y_tiled_gen12_mc_ccs.html

  * igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc:
    - shard-skl:          NOTRUN -> [SKIP][27] ([fdo#109271] / [i915#3886]) +3 similar issues
   [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@kms_ccs@pipe-a-crc-sprite-planes-basic-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs:
    - shard-skl:          NOTRUN -> [SKIP][28] ([fdo#109271]) +37 similar issues
   [28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl9/igt@kms_ccs@pipe-a-random-ccs-data-y_tiled_gen12_rc_ccs.html

  * igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc:
    - shard-glk:          NOTRUN -> [SKIP][29] ([fdo#109271] / [i915#3886])
   [29]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk3/igt@kms_ccs@pipe-c-bad-pixel-format-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc:
    - shard-apl:          NOTRUN -> [SKIP][30] ([fdo#109271]) +13 similar issues
   [30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-apl2/igt@kms_ccs@pipe-d-missing-ccs-buffer-y_tiled_gen12_rc_ccs_cc.html

  * igt@kms_chamelium@hdmi-hpd-for-each-pipe:
    - shard-skl:          NOTRUN -> [SKIP][31] ([fdo#109271] / [fdo#111827])
   [31]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl6/igt@kms_chamelium@hdmi-hpd-for-each-pipe.html

  * igt@kms_chamelium@vga-hpd-without-ddc:
    - shard-glk:          NOTRUN -> [SKIP][32] ([fdo#109271] / [fdo#111827]) +2 similar issues
   [32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk7/igt@kms_chamelium@vga-hpd-without-ddc.html

  * igt@kms_dsc@dsc-with-bpc-formats:
    - shard-skl:          NOTRUN -> [SKIP][33] ([fdo#109271] / [i915#7205])
   [33]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@kms_dsc@dsc-with-bpc-formats.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode:
    - shard-iclb:         NOTRUN -> [SKIP][34] ([i915#2672]) +3 similar issues
   [34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb2/igt@kms_flip_scaled_crc@flip-32bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-32bpp-yftile-downscaling@pipe-a-valid-mode:
    - shard-iclb:         NOTRUN -> [SKIP][35] ([i915#2587] / [i915#2672]) +2 similar issues
   [35]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb8/igt@kms_flip_scaled_crc@flip-64bpp-yftile-to-32bpp-yftile-downscaling@pipe-a-valid-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling@pipe-a-default-mode:
    - shard-iclb:         NOTRUN -> [SKIP][36] ([i915#3555]) +1 similar issue
   [36]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb2/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-16bpp-ytile-downscaling@pipe-a-default-mode.html

  * igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode:
    - shard-iclb:         NOTRUN -> [SKIP][37] ([i915#2672] / [i915#3555]) +1 similar issue
   [37]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb3/igt@kms_flip_scaled_crc@flip-64bpp-ytile-to-32bpp-ytilegen12rcccs-upscaling@pipe-a-default-mode.html

  * igt@kms_frontbuffer_tracking@fbc-suspend:
    - shard-glk:          NOTRUN -> [INCOMPLETE][38] ([i915#7255])
   [38]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk5/igt@kms_frontbuffer_tracking@fbc-suspend.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt:
    - shard-glk:          NOTRUN -> [SKIP][39] ([fdo#109271]) +41 similar issues
   [39]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk7/igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-gtt.html

  * igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-edp-1:
    - shard-skl:          NOTRUN -> [INCOMPLETE][40] ([i915#4939]) +1 similar issue
   [40]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl6/igt@kms_pipe_crc_basic@suspend-read-crc@pipe-a-edp-1.html

  * igt@kms_plane_alpha_blend@alpha-transparent-fb@pipe-c-edp-1:
    - shard-skl:          NOTRUN -> [FAIL][41] ([i915#4573]) +2 similar issues
   [41]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl1/igt@kms_plane_alpha_blend@alpha-transparent-fb@pipe-c-edp-1.html

  * igt@kms_plane_alpha_blend@constant-alpha-max@pipe-c-hdmi-a-1:
    - shard-glk:          NOTRUN -> [FAIL][42] ([i915#4573]) +2 similar issues
   [42]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk5/igt@kms_plane_alpha_blend@constant-alpha-max@pipe-c-hdmi-a-1.html

  * igt@kms_psr@psr2_sprite_plane_move:
    - shard-iclb:         [PASS][43] -> [SKIP][44] ([fdo#109441]) +2 similar issues
   [43]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb2/igt@kms_psr@psr2_sprite_plane_move.html
   [44]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb1/igt@kms_psr@psr2_sprite_plane_move.html

  * igt@perf@blocking:
    - shard-skl:          [PASS][45] -> [FAIL][46] ([i915#1542])
   [45]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-skl1/igt@perf@blocking.html
   [46]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl10/igt@perf@blocking.html

  * igt@sysfs_clients@split-50:
    - shard-glk:          NOTRUN -> [SKIP][47] ([fdo#109271] / [i915#2994])
   [47]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk5/igt@sysfs_clients@split-50.html

  
#### Possible fixes ####

  * igt@gem_eio@reset-stress:
    - {shard-dg1}:        [FAIL][48] ([i915#5784]) -> [PASS][49]
   [48]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-dg1-15/igt@gem_eio@reset-stress.html
   [49]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-dg1-18/igt@gem_eio@reset-stress.html

  * igt@gem_exec_balancer@parallel-keep-in-fence:
    - shard-iclb:         [SKIP][50] ([i915#4525]) -> [PASS][51]
   [50]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb5/igt@gem_exec_balancer@parallel-keep-in-fence.html
   [51]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb1/igt@gem_exec_balancer@parallel-keep-in-fence.html

  * igt@gem_exec_reloc@basic-cpu-wc-active:
    - {shard-rkl}:        [SKIP][52] ([i915#3281]) -> [PASS][53]
   [52]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-4/igt@gem_exec_reloc@basic-cpu-wc-active.html
   [53]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-5/igt@gem_exec_reloc@basic-cpu-wc-active.html

  * igt@gem_tiled_partial_pwrite_pread@writes:
    - {shard-rkl}:        [SKIP][54] ([i915#3282]) -> [PASS][55] +1 similar issue
   [54]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-4/igt@gem_tiled_partial_pwrite_pread@writes.html
   [55]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-5/igt@gem_tiled_partial_pwrite_pread@writes.html

  * igt@i915_selftest@live@gem_contexts:
    - {shard-dg1}:        [DMESG-FAIL][56] -> [PASS][57]
   [56]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-dg1-13/igt@i915_selftest@live@gem_contexts.html
   [57]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-dg1-16/igt@i915_selftest@live@gem_contexts.html

  * igt@i915_selftest@mock@requests:
    - shard-apl:          [INCOMPLETE][58] ([i915#7226]) -> [PASS][59]
   [58]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-apl8/igt@i915_selftest@mock@requests.html
   [59]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-apl2/igt@i915_selftest@mock@requests.html
    - shard-glk:          [INCOMPLETE][60] -> [PASS][61]
   [60]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-glk2/igt@i915_selftest@mock@requests.html
   [61]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk3/igt@i915_selftest@mock@requests.html

  * igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs:
    - {shard-rkl}:        [SKIP][62] ([i915#1845] / [i915#4098]) -> [PASS][63] +10 similar issues
   [62]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-1/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs.html
   [63]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-6/igt@kms_ccs@pipe-b-bad-aux-stride-y_tiled_gen12_rc_ccs.html

  * igt@kms_cursor_legacy@short-flip-before-cursor@atomic-transitions-varying-size:
    - shard-skl:          [DMESG-WARN][64] ([i915#1982]) -> [PASS][65]
   [64]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-skl9/igt@kms_cursor_legacy@short-flip-before-cursor@atomic-transitions-varying-size.html
   [65]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-skl3/igt@kms_cursor_legacy@short-flip-before-cursor@atomic-transitions-varying-size.html

  * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-blt:
    - {shard-rkl}:        [SKIP][66] ([i915#1849] / [i915#4098]) -> [PASS][67] +6 similar issues
   [66]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-1/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-blt.html
   [67]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-6/igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-blt.html

  * igt@kms_plane@plane-position-hole@pipe-b-planes:
    - {shard-rkl}:        [SKIP][68] ([i915#3558]) -> [PASS][69] +1 similar issue
   [68]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-rkl-1/igt@kms_plane@plane-position-hole@pipe-b-planes.html
   [69]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-rkl-6/igt@kms_plane@plane-position-hole@pipe-b-planes.html

  * igt@kms_psr@psr2_sprite_plane_onoff:
    - shard-iclb:         [SKIP][70] ([fdo#109441]) -> [PASS][71] +2 similar issues
   [70]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb1/igt@kms_psr@psr2_sprite_plane_onoff.html
   [71]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb2/igt@kms_psr@psr2_sprite_plane_onoff.html

  * igt@perf@polling-parameterized:
    - shard-iclb:         [FAIL][72] ([i915#5639]) -> [PASS][73]
   [72]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb6/igt@perf@polling-parameterized.html
   [73]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb8/igt@perf@polling-parameterized.html

  
#### Warnings ####

  * igt@gem_pwrite@basic-exhaustion:
    - shard-apl:          [FAIL][74] -> [INCOMPLETE][75] ([i915#7248])
   [74]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-apl3/igt@gem_pwrite@basic-exhaustion.html
   [75]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-apl7/igt@gem_pwrite@basic-exhaustion.html

  * igt@i915_suspend@fence-restore-tiled2untiled:
    - shard-glk:          [INCOMPLETE][76] ([i915#4817]) -> [INCOMPLETE][77] ([i915#4817] / [i915#7232]) +1 similar issue
   [76]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-glk5/igt@i915_suspend@fence-restore-tiled2untiled.html
   [77]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-glk9/igt@i915_suspend@fence-restore-tiled2untiled.html

  * igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area:
    - shard-iclb:         [SKIP][78] ([i915#2920]) -> [SKIP][79] ([fdo#111068] / [i915#658])
   [78]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb2/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area.html
   [79]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb1/igt@kms_psr2_sf@overlay-plane-update-sf-dmg-area.html

  * igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb:
    - shard-iclb:         [SKIP][80] ([i915#658]) -> [SKIP][81] ([i915#2920]) +1 similar issue
   [80]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_12257/shard-iclb1/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb.html
   [81]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/shard-iclb2/igt@kms_psr2_sf@primary-plane-update-sf-dmg-area-big-fb.html

  
  {name}: This element is suppressed. This means it is ignored when computing
          the status of the difference (SUCCESS, WARNING, or FAILURE).

  [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
  [fdo#109283]: https://bugs.freedesktop.org/show_bug.cgi?id=109283
  [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289
  [fdo#109303]: https://bugs.freedesktop.org/show_bug.cgi?id=109303
  [fdo#109441]: https://bugs.freedesktop.org/show_bug.cgi?id=109441
  [fdo#110189]: https://bugs.freedesktop.org/show_bug.cgi?id=110189
  [fdo#110723]: https://bugs.freedesktop.org/show_bug.cgi?id=110723
  [fdo#111068]: https://bugs.freedesktop.org/show_bug.cgi?id=111068
  [fdo#111614]: https://bugs.freedesktop.org/show_bug.cgi?id=111614
  [fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
  [fdo#111825]: https://bugs.freedesktop.org/show_bug.cgi?id=111825
  [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
  [fdo#112054]: https://bugs.freedesktop.org/show_bug.cgi?id=112054
  [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
  [i915#132]: https://gitlab.freedesktop.org/drm/intel/issues/132
  [i915#1542]: https://gitlab.freedesktop.org/drm/intel/issues/1542
  [i915#1769]: https://gitlab.freedesktop.org/drm/intel/issues/1769
  [i915#1825]: https://gitlab.freedesktop.org/drm/intel/issues/1825
  [i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
  [i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
  [i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
  [i915#2410]: https://gitlab.freedesktop.org/drm/intel/issues/2410
  [i915#2527]: https://gitlab.freedesktop.org/drm/intel/issues/2527
  [i915#2532]: https://gitlab.freedesktop.org/drm/intel/issues/2532
  [i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
  [i915#2587]: https://gitlab.freedesktop.org/drm/intel/issues/2587
  [i915#2672]: https://gitlab.freedesktop.org/drm/intel/issues/2672
  [i915#280]: https://gitlab.freedesktop.org/drm/intel/issues/280
  [i915#2842]: https://gitlab.freedesktop.org/drm/intel/issues/2842
  [i915#2920]: https://gitlab.freedesktop.org/drm/intel/issues/2920
  [i915#2994]: https://gitlab.freedesktop.org/drm/intel/issues/2994
  [i915#3002]: https://gitlab.freedesktop.org/drm/intel/issues/3002
  [i915#3012]: https://gitlab.freedesktop.org/drm/intel/issues/3012
  [i915#3281]: https://gitlab.freedesktop.org/drm/intel/issues/3281
  [i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
  [i915#3297]: https://gitlab.freedesktop.org/drm/intel/issues/3297
  [i915#3318]: https://gitlab.freedesktop.org/drm/intel/issues/3318
  [i915#3359]: https://gitlab.freedesktop.org/drm/intel/issues/3359
  [i915#3458]: https://gitlab.freedesktop.org/drm/intel/issues/3458
  [i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
  [i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
  [i915#3558]: https://gitlab.freedesktop.org/drm/intel/issues/3558
  [i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
  [i915#3638]: https://gitlab.freedesktop.org/drm/intel/issues/3638
  [i915#3639]: https://gitlab.freedesktop.org/drm/intel/issues/3639
  [i915#3734]: https://gitlab.freedesktop.org/drm/intel/issues/3734
  [i915#3742]: https://gitlab.freedesktop.org/drm/intel/issues/3742
  [i915#3886]: https://gitlab.freedesktop.org/drm/intel/issues/3886
  [i915#3955]: https://gitlab.freedesktop.org/drm/intel/issues/3955
  [i915#4070]: https://gitlab.freedesktop.org/drm/intel/issues/4070
  [i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
  [i915#4171]: https://gitlab.freedesktop.org/drm/intel/issues/4171
  [i915#4270]: https://gitlab.freedesktop.org/drm/intel/issues/4270
  [i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
  [i915#4525]: https://gitlab.freedesktop.org/drm/intel/issues/4525
  [i915#4573]: https://gitlab.freedesktop.org/drm/intel/issues/4573
  [i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
  [i915#4817]: https://gitlab.freedesktop.org/drm/intel/issues/4817
  [i915#4939]: https://gitlab.freedesktop.org/drm/intel/issues/4939
  [i915#4991]: https://gitlab.freedesktop.org/drm/intel/issues/4991
  [i915#5286]: https://gitlab.freedesktop.org/drm/intel/issues/5286
  [i915#5288]: https://gitlab.freedesktop.org/drm/intel/issues/5288
  [i915#5325]: https://gitlab.freedesktop.org/drm/intel/issues/5325
  [i915#5327]: https://gitlab.freedesktop.org/drm/intel/issues/5327
  [i915#533]: https://gitlab.freedesktop.org/drm/intel/issues/533
  [i915#5639]: https://gitlab.freedesktop.org/drm/intel/issues/5639
  [i915#5784]: https://gitlab.freedesktop.org/drm/intel/issues/5784
  [i915#5939]: https://gitlab.freedesktop.org/drm/intel/issues/5939
  [i915#5982]: https://gitlab.freedesktop.org/drm/intel/issues/5982
  [i915#6095]: https://gitlab.freedesktop.org/drm/intel/issues/6095
  [i915#6247]: https://gitlab.freedesktop.org/drm/intel/issues/6247
  [i915#6248]: https://gitlab.freedesktop.org/drm/intel/issues/6248
  [i915#6355]: https://gitlab.freedesktop.org/drm/intel/issues/6355
  [i915#6497]: https://gitlab.freedesktop.org/drm/intel/issues/6497
  [i915#658]: https://gitlab.freedesktop.org/drm/intel/issues/658
  [i915#6990]: https://gitlab.freedesktop.org/drm/intel/issues/6990
  [i915#7065]: https://gitlab.freedesktop.org/drm/intel/issues/7065
  [i915#7118]: https://gitlab.freedesktop.org/drm/intel/issues/7118
  [i915#7205]: https://gitlab.freedesktop.org/drm/intel/issues/7205
  [i915#7206]: https://gitlab.freedesktop.org/drm/intel/issues/7206
  [i915#7226]: https://gitlab.freedesktop.org/drm/intel/issues/7226
  [i915#7231]: https://gitlab.freedesktop.org/drm/intel/issues/7231
  [i915#7232]: https://gitlab.freedesktop.org/drm/intel/issues/7232
  [i915#7248]: https://gitlab.freedesktop.org/drm/intel/issues/7248
  [i915#7255]: https://gitlab.freedesktop.org/drm/intel/issues/7255


Build changes
-------------

  * Linux: CI_DRM_12257 -> Patchwork_109632v3

  CI-20190529: 20190529
  CI_DRM_12257: b249abef9f86f788e6bacc657ae8eb7743948200 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_7018: 8312a2fe3f3287ba4ac4bc8d100de0734480f482 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  Patchwork_109632v3: b249abef9f86f788e6bacc657ae8eb7743948200 @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4509: fdc5a4ca11124ab8413c7988896eec4c97336694 @ git://anongit.freedesktop.org/piglit

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_109632v3/index.html

[-- Attachment #2: Type: text/html, Size: 25870 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
  2022-10-18 18:30 ` [Intel-gfx] " Vinay Belgaumkar
                   ` (3 preceding siblings ...)
  (?)
@ 2022-10-20 22:57 ` Dixit, Ashutosh
  2022-10-22  1:38   ` Belgaumkar, Vinay
  -1 siblings, 1 reply; 11+ messages in thread
From: Dixit, Ashutosh @ 2022-10-20 22:57 UTC (permalink / raw)
  To: Vinay Belgaumkar; +Cc: intel-gfx, dri-devel, Nirmoy Das

On Tue, 18 Oct 2022 11:30:31 -0700, Vinay Belgaumkar wrote:
>

Hi Vinay,

> diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
> index 4c6e9257e593..e42bc215e54d 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
> @@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
>	enum intel_engine_id id;
>	struct igt_spinner spin;
>	u32 slpc_min_freq, slpc_max_freq;
> +	u32 saved_min_freq;
>	int err = 0;
>
>	if (!intel_uc_uses_guc_slpc(&gt->uc))
> @@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
>		return -EIO;
>	}
>
> -	/*
> -	 * FIXME: With efficient frequency enabled, GuC can request
> -	 * frequencies higher than the SLPC max. While this is fixed
> -	 * in GuC, we level set these tests with RPn as min.
> -	 */
> -	err = slpc_set_min_freq(slpc, slpc->min_freq);
> -	if (err)
> -		return err;
> +	if (slpc_min_freq == slpc_max_freq) {
> +		/* Server parts will have min/max clamped to RP0 */
> +		if (slpc->min_is_rpmax) {
> +			err = slpc_set_min_freq(slpc, slpc->min_freq);
> +			if (err) {
> +				pr_err("Unable to update min freq on server part");
> +				return err;
> +			}
>
> -	if (slpc->min_freq == slpc->rp0_freq) {
> -		pr_err("Min/Max are fused to the same value\n");
> -		return -EINVAL;
> +		} else {
> +			pr_err("Min/Max are fused to the same value\n");
> +			return -EINVAL;

Sorry but I am not following this else case here. Why are we saying min/max
are fused to the same value? In this case we can't do
"slpc_set_min_freq(slpc, slpc->min_freq)" ? That is, we can't change SLPC
min freq?

> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> index fdd895f73f9f..b7cdeec44bd3 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> @@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
>
>	slpc->max_freq_softlimit = 0;
>	slpc->min_freq_softlimit = 0;
> +	slpc->min_is_rpmax = false;
>
>	slpc->boost_freq = 0;
>	atomic_set(&slpc->num_waiters, 0);
> @@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
>	return 0;
>  }
>
> +static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
> +{
> +	int slpc_min_freq;
> +
> +	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
> +		return false;

I am wondering what happens if the above fails on server? Should we return
true or false on server and what are the consequences of returning false on
server?

Any case I think we should at least put a drm_err or something here just in
case this ever fails so we'll know something weird happened.

> +
> +	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
> +		return true;
> +	else
> +		return false;
> +}
> +
> +static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
> +{
> +	/* For server parts, SLPC min will be at RPMax.
> +	 * Use min softlimit to clamp it to RP0 instead.
> +	 */
> +	if (is_slpc_min_freq_rpmax(slpc) &&
> +	    !slpc->min_freq_softlimit) {
> +		slpc->min_is_rpmax = true;
> +		slpc->min_freq_softlimit = slpc->rp0_freq;
> +		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
> +	}
> +}
> +
>  static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
>  {
>	/* Force SLPC to used platform rp0 */
> @@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
>
>	slpc_get_rp_values(slpc);
>
> +	/* Handle the case where min=max=RPmax */
> +	update_server_min_softlimit(slpc);
> +
>	/* Set SLPC max limit to RP0 */
>	ret = slpc_use_fused_rp0(slpc);
>	if (unlikely(ret)) {
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> index 82a98f78f96c..11975a31c9d0 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> @@ -9,6 +9,8 @@
>  #include "intel_guc_submission.h"
>  #include "intel_guc_slpc_types.h"
>
> +#define SLPC_MAX_FREQ_MHZ 4250

This seems to be really a value (255 converted to freq) so seems ok to
intepret in MHz.

Thanks.
--
Ashutosh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
  2022-10-20 22:57 ` [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency Dixit, Ashutosh
@ 2022-10-22  1:38   ` Belgaumkar, Vinay
  2022-10-22  5:26       ` Dixit, Ashutosh
  0 siblings, 1 reply; 11+ messages in thread
From: Belgaumkar, Vinay @ 2022-10-22  1:38 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: intel-gfx, dri-devel, Nirmoy Das


On 10/20/2022 3:57 PM, Dixit, Ashutosh wrote:
> On Tue, 18 Oct 2022 11:30:31 -0700, Vinay Belgaumkar wrote:
> Hi Vinay,
>
>> diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
>> index 4c6e9257e593..e42bc215e54d 100644
>> --- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
>> +++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
>> @@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
>> 	enum intel_engine_id id;
>> 	struct igt_spinner spin;
>> 	u32 slpc_min_freq, slpc_max_freq;
>> +	u32 saved_min_freq;
>> 	int err = 0;
>>
>> 	if (!intel_uc_uses_guc_slpc(&gt->uc))
>> @@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
>> 		return -EIO;
>> 	}
>>
>> -	/*
>> -	 * FIXME: With efficient frequency enabled, GuC can request
>> -	 * frequencies higher than the SLPC max. While this is fixed
>> -	 * in GuC, we level set these tests with RPn as min.
>> -	 */
>> -	err = slpc_set_min_freq(slpc, slpc->min_freq);
>> -	if (err)
>> -		return err;
>> +	if (slpc_min_freq == slpc_max_freq) {
>> +		/* Server parts will have min/max clamped to RP0 */
>> +		if (slpc->min_is_rpmax) {
>> +			err = slpc_set_min_freq(slpc, slpc->min_freq);
>> +			if (err) {
>> +				pr_err("Unable to update min freq on server part");
>> +				return err;
>> +			}
>>
>> -	if (slpc->min_freq == slpc->rp0_freq) {
>> -		pr_err("Min/Max are fused to the same value\n");
>> -		return -EINVAL;
>> +		} else {
>> +			pr_err("Min/Max are fused to the same value\n");
>> +			return -EINVAL;
> Sorry but I am not following this else case here. Why are we saying min/max
> are fused to the same value? In this case we can't do
> "slpc_set_min_freq(slpc, slpc->min_freq)" ? That is, we can't change SLPC
> min freq?
This would be an error case due to a faulty part. We may come across a 
part where min/max is fused to the same value.
>
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>> index fdd895f73f9f..b7cdeec44bd3 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>> @@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
>>
>> 	slpc->max_freq_softlimit = 0;
>> 	slpc->min_freq_softlimit = 0;
>> +	slpc->min_is_rpmax = false;
>>
>> 	slpc->boost_freq = 0;
>> 	atomic_set(&slpc->num_waiters, 0);
>> @@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
>> 	return 0;
>>   }
>>
>> +static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
>> +{
>> +	int slpc_min_freq;
>> +
>> +	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
>> +		return false;
> I am wondering what happens if the above fails on server? Should we return
> true or false on server and what are the consequences of returning false on
> server?
>
> Any case I think we should at least put a drm_err or something here just in
> case this ever fails so we'll know something weird happened.

Makes sense.

Thanks,

Vinay.

>
>> +
>> +	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
>> +		return true;
>> +	else
>> +		return false;
>> +}
>> +
>> +static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
>> +{
>> +	/* For server parts, SLPC min will be at RPMax.
>> +	 * Use min softlimit to clamp it to RP0 instead.
>> +	 */
>> +	if (is_slpc_min_freq_rpmax(slpc) &&
>> +	    !slpc->min_freq_softlimit) {
>> +		slpc->min_is_rpmax = true;
>> +		slpc->min_freq_softlimit = slpc->rp0_freq;
>> +		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
>> +	}
>> +}
>> +
>>   static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
>>   {
>> 	/* Force SLPC to used platform rp0 */
>> @@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
>>
>> 	slpc_get_rp_values(slpc);
>>
>> +	/* Handle the case where min=max=RPmax */
>> +	update_server_min_softlimit(slpc);
>> +
>> 	/* Set SLPC max limit to RP0 */
>> 	ret = slpc_use_fused_rp0(slpc);
>> 	if (unlikely(ret)) {
>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>> index 82a98f78f96c..11975a31c9d0 100644
>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>> @@ -9,6 +9,8 @@
>>   #include "intel_guc_submission.h"
>>   #include "intel_guc_slpc_types.h"
>>
>> +#define SLPC_MAX_FREQ_MHZ 4250
> This seems to be really a value (255 converted to freq) so seems ok to
> intepret in MHz.
>
> Thanks.
> --
> Ashutosh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
  2022-10-22  1:38   ` Belgaumkar, Vinay
@ 2022-10-22  5:26       ` Dixit, Ashutosh
  0 siblings, 0 replies; 11+ messages in thread
From: Dixit, Ashutosh @ 2022-10-22  5:26 UTC (permalink / raw)
  To: Belgaumkar, Vinay; +Cc: intel-gfx, Riana Tauro, dri-devel

On Fri, 21 Oct 2022 18:38:57 -0700, Belgaumkar, Vinay wrote:
> On 10/20/2022 3:57 PM, Dixit, Ashutosh wrote:
> > On Tue, 18 Oct 2022 11:30:31 -0700, Vinay Belgaumkar wrote:
> > Hi Vinay,
> >
> >> diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
> >> index 4c6e9257e593..e42bc215e54d 100644
> >> --- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
> >> +++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
> >> @@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
> >>	enum intel_engine_id id;
> >>	struct igt_spinner spin;
> >>	u32 slpc_min_freq, slpc_max_freq;
> >> +	u32 saved_min_freq;
> >>	int err = 0;
> >>
> >>	if (!intel_uc_uses_guc_slpc(&gt->uc))
> >> @@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
> >>		return -EIO;
> >>	}
> >>
> >> -	/*
> >> -	 * FIXME: With efficient frequency enabled, GuC can request
> >> -	 * frequencies higher than the SLPC max. While this is fixed
> >> -	 * in GuC, we level set these tests with RPn as min.
> >> -	 */
> >> -	err = slpc_set_min_freq(slpc, slpc->min_freq);
> >> -	if (err)
> >> -		return err;
> >> +	if (slpc_min_freq == slpc_max_freq) {
> >> +		/* Server parts will have min/max clamped to RP0 */
> >> +		if (slpc->min_is_rpmax) {
> >> +			err = slpc_set_min_freq(slpc, slpc->min_freq);
> >> +			if (err) {
> >> +				pr_err("Unable to update min freq on server part");
> >> +				return err;
> >> +			}
> >>
> >> -	if (slpc->min_freq == slpc->rp0_freq) {
> >> -		pr_err("Min/Max are fused to the same value\n");
> >> -		return -EINVAL;
> >> +		} else {
> >> +			pr_err("Min/Max are fused to the same value\n");
> >> +			return -EINVAL;
> > Sorry but I am not following this else case here. Why are we saying min/max
> > are fused to the same value? In this case we can't do
> > "slpc_set_min_freq(slpc, slpc->min_freq)" ? That is, we can't change SLPC
> > min freq?
>
> This would be an error case due to a faulty part. We may come across a part
> where min/max is fused to the same value.

But even then the original check is much clearer since it is actually
comparing the fused freq's:

	if (slpc->min_freq == slpc->rp0_freq)

Because if min/max have been changed slpc_min_freq and slpc_max_freq are no
longer fused freq.

And also this check should be right at the top of run_test, right after if
(!intel_uc_uses_guc_slpc), rather than in the middle here (otherwise
because we are basically not doing any error rewinding so causing memory
leaks if any of the functions return error).

> >>+		}
> >>+	} else {
> >>+		/*
> >>+		 * FIXME: With efficient frequency enabled, GuC can request
> >>+		 * frequencies higher than the SLPC max. While this is fixed
> >>+		 * in GuC, we level set these tests with RPn as min.
> >>+		 */
> >>+		err = slpc_set_min_freq(slpc, slpc->min_freq);
> >>+		if (err)
> >>+			return err;
> >> 	}

So let's do what is suggested above and then see what remains here and if
we need all these code changes. Most likely we can just do unconditionally
what we were doing before, i.e.:

	err = slpc_set_min_freq(slpc, slpc->min_freq);
	if (err)
		return err;

> >>
> >>+	saved_min_freq = slpc_min_freq;
> >>+
> >>+	/* New temp min freq = RPn */
> >>+	slpc_min_freq = slpc->min_freq;

Why do we need saved_min_freq? We can retain slpc_min_freq and in the check below:

	if (max_act_freq <= slpc_min_freq)

We can just change the check to:

	if (max_act_freq <= slpc->min_freq)

Looks like to have been a bug in the original code?

> >>+
> >> 	intel_gt_pm_wait_for_idle(gt);
> >> 	intel_gt_pm_get(gt);
> >> 	for_each_engine(engine, gt, id) {
> >>@@ -347,7 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
> >>
> >> 	/* Restore min/max frequencies */
> >> 	slpc_set_max_freq(slpc, slpc_max_freq);
> >>-	slpc_set_min_freq(slpc, slpc_min_freq);
> >>+	slpc_set_min_freq(slpc, saved_min_freq);
> >>
> >> 	if (igt_flush_test(gt->i915))
> >> 		err = -EIO;
> >
> >> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> >> index fdd895f73f9f..b7cdeec44bd3 100644
> >> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> >> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> >> @@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
> >>
> >>	slpc->max_freq_softlimit = 0;
> >>	slpc->min_freq_softlimit = 0;
> >> +	slpc->min_is_rpmax = false;
> >>
> >>	slpc->boost_freq = 0;
> >>	atomic_set(&slpc->num_waiters, 0);
> >> @@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
> >>	return 0;
> >>   }
> >>
> >> +static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
> >> +{
> >> +	int slpc_min_freq;
> >> +
> >> +	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
> >> +		return false;
> > I am wondering what happens if the above fails on server? Should we return
> > true or false on server and what are the consequences of returning false on
> > server?
> >
> > Any case I think we should at least put a drm_err or something here just in
> > case this ever fails so we'll know something weird happened.
>
> Makes sense.
>
> >> +
> >> +	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
> >> +		return true;
> >> +	else
> >> +		return false;
> >> +}
> >> +
> >> +static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
> >> +{
> >> +	/* For server parts, SLPC min will be at RPMax.
> >> +	 * Use min softlimit to clamp it to RP0 instead.
> >> +	 */
> >> +	if (is_slpc_min_freq_rpmax(slpc) &&
> >> +	    !slpc->min_freq_softlimit) {

This should be swapped around:

	if (!slpc->min_freq_softlimit && is_slpc_min_freq_rpmax(slpc))

So we should only have to call is_slpc_min_freq_rpmax if
slpc->min_freq_softlimit is 0 (that is only once the first time during
init).

> >> +		slpc->min_is_rpmax = true;
> >> +		slpc->min_freq_softlimit = slpc->rp0_freq;
> >> +		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
> >> +	}
> >> +}
> >> +
> >>   static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
> >>   {
> >>	/* Force SLPC to used platform rp0 */
> >> @@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
> >>
> >>	slpc_get_rp_values(slpc);
> >>
> >> +	/* Handle the case where min=max=RPmax */
> >> +	update_server_min_softlimit(slpc);
> >> +
> >>	/* Set SLPC max limit to RP0 */
> >>	ret = slpc_use_fused_rp0(slpc);
> >>	if (unlikely(ret)) {
> >> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> >> index 82a98f78f96c..11975a31c9d0 100644
> >> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> >> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> >> @@ -9,6 +9,8 @@
> >>   #include "intel_guc_submission.h"
> >>   #include "intel_guc_slpc_types.h"
> >>
> >> +#define SLPC_MAX_FREQ_MHZ 4250
> >
> > This seems to be really a value (255 converted to freq) so seems ok to
> > intepret in MHz.
> >
> > Thanks.
> > --
> > Ashutosh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
@ 2022-10-22  5:26       ` Dixit, Ashutosh
  0 siblings, 0 replies; 11+ messages in thread
From: Dixit, Ashutosh @ 2022-10-22  5:26 UTC (permalink / raw)
  To: Belgaumkar, Vinay; +Cc: intel-gfx, dri-devel

On Fri, 21 Oct 2022 18:38:57 -0700, Belgaumkar, Vinay wrote:
> On 10/20/2022 3:57 PM, Dixit, Ashutosh wrote:
> > On Tue, 18 Oct 2022 11:30:31 -0700, Vinay Belgaumkar wrote:
> > Hi Vinay,
> >
> >> diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
> >> index 4c6e9257e593..e42bc215e54d 100644
> >> --- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
> >> +++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
> >> @@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
> >>	enum intel_engine_id id;
> >>	struct igt_spinner spin;
> >>	u32 slpc_min_freq, slpc_max_freq;
> >> +	u32 saved_min_freq;
> >>	int err = 0;
> >>
> >>	if (!intel_uc_uses_guc_slpc(&gt->uc))
> >> @@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
> >>		return -EIO;
> >>	}
> >>
> >> -	/*
> >> -	 * FIXME: With efficient frequency enabled, GuC can request
> >> -	 * frequencies higher than the SLPC max. While this is fixed
> >> -	 * in GuC, we level set these tests with RPn as min.
> >> -	 */
> >> -	err = slpc_set_min_freq(slpc, slpc->min_freq);
> >> -	if (err)
> >> -		return err;
> >> +	if (slpc_min_freq == slpc_max_freq) {
> >> +		/* Server parts will have min/max clamped to RP0 */
> >> +		if (slpc->min_is_rpmax) {
> >> +			err = slpc_set_min_freq(slpc, slpc->min_freq);
> >> +			if (err) {
> >> +				pr_err("Unable to update min freq on server part");
> >> +				return err;
> >> +			}
> >>
> >> -	if (slpc->min_freq == slpc->rp0_freq) {
> >> -		pr_err("Min/Max are fused to the same value\n");
> >> -		return -EINVAL;
> >> +		} else {
> >> +			pr_err("Min/Max are fused to the same value\n");
> >> +			return -EINVAL;
> > Sorry but I am not following this else case here. Why are we saying min/max
> > are fused to the same value? In this case we can't do
> > "slpc_set_min_freq(slpc, slpc->min_freq)" ? That is, we can't change SLPC
> > min freq?
>
> This would be an error case due to a faulty part. We may come across a part
> where min/max is fused to the same value.

But even then the original check is much clearer since it is actually
comparing the fused freq's:

	if (slpc->min_freq == slpc->rp0_freq)

Because if min/max have been changed slpc_min_freq and slpc_max_freq are no
longer fused freq.

And also this check should be right at the top of run_test, right after if
(!intel_uc_uses_guc_slpc), rather than in the middle here (otherwise
because we are basically not doing any error rewinding so causing memory
leaks if any of the functions return error).

> >>+		}
> >>+	} else {
> >>+		/*
> >>+		 * FIXME: With efficient frequency enabled, GuC can request
> >>+		 * frequencies higher than the SLPC max. While this is fixed
> >>+		 * in GuC, we level set these tests with RPn as min.
> >>+		 */
> >>+		err = slpc_set_min_freq(slpc, slpc->min_freq);
> >>+		if (err)
> >>+			return err;
> >> 	}

So let's do what is suggested above and then see what remains here and if
we need all these code changes. Most likely we can just do unconditionally
what we were doing before, i.e.:

	err = slpc_set_min_freq(slpc, slpc->min_freq);
	if (err)
		return err;

> >>
> >>+	saved_min_freq = slpc_min_freq;
> >>+
> >>+	/* New temp min freq = RPn */
> >>+	slpc_min_freq = slpc->min_freq;

Why do we need saved_min_freq? We can retain slpc_min_freq and in the check below:

	if (max_act_freq <= slpc_min_freq)

We can just change the check to:

	if (max_act_freq <= slpc->min_freq)

Looks like to have been a bug in the original code?

> >>+
> >> 	intel_gt_pm_wait_for_idle(gt);
> >> 	intel_gt_pm_get(gt);
> >> 	for_each_engine(engine, gt, id) {
> >>@@ -347,7 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
> >>
> >> 	/* Restore min/max frequencies */
> >> 	slpc_set_max_freq(slpc, slpc_max_freq);
> >>-	slpc_set_min_freq(slpc, slpc_min_freq);
> >>+	slpc_set_min_freq(slpc, saved_min_freq);
> >>
> >> 	if (igt_flush_test(gt->i915))
> >> 		err = -EIO;
> >
> >> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> >> index fdd895f73f9f..b7cdeec44bd3 100644
> >> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> >> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> >> @@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
> >>
> >>	slpc->max_freq_softlimit = 0;
> >>	slpc->min_freq_softlimit = 0;
> >> +	slpc->min_is_rpmax = false;
> >>
> >>	slpc->boost_freq = 0;
> >>	atomic_set(&slpc->num_waiters, 0);
> >> @@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
> >>	return 0;
> >>   }
> >>
> >> +static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
> >> +{
> >> +	int slpc_min_freq;
> >> +
> >> +	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
> >> +		return false;
> > I am wondering what happens if the above fails on server? Should we return
> > true or false on server and what are the consequences of returning false on
> > server?
> >
> > Any case I think we should at least put a drm_err or something here just in
> > case this ever fails so we'll know something weird happened.
>
> Makes sense.
>
> >> +
> >> +	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
> >> +		return true;
> >> +	else
> >> +		return false;
> >> +}
> >> +
> >> +static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
> >> +{
> >> +	/* For server parts, SLPC min will be at RPMax.
> >> +	 * Use min softlimit to clamp it to RP0 instead.
> >> +	 */
> >> +	if (is_slpc_min_freq_rpmax(slpc) &&
> >> +	    !slpc->min_freq_softlimit) {

This should be swapped around:

	if (!slpc->min_freq_softlimit && is_slpc_min_freq_rpmax(slpc))

So we should only have to call is_slpc_min_freq_rpmax if
slpc->min_freq_softlimit is 0 (that is only once the first time during
init).

> >> +		slpc->min_is_rpmax = true;
> >> +		slpc->min_freq_softlimit = slpc->rp0_freq;
> >> +		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
> >> +	}
> >> +}
> >> +
> >>   static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
> >>   {
> >>	/* Force SLPC to used platform rp0 */
> >> @@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
> >>
> >>	slpc_get_rp_values(slpc);
> >>
> >> +	/* Handle the case where min=max=RPmax */
> >> +	update_server_min_softlimit(slpc);
> >> +
> >>	/* Set SLPC max limit to RP0 */
> >>	ret = slpc_use_fused_rp0(slpc);
> >>	if (unlikely(ret)) {
> >> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> >> index 82a98f78f96c..11975a31c9d0 100644
> >> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> >> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
> >> @@ -9,6 +9,8 @@
> >>   #include "intel_guc_submission.h"
> >>   #include "intel_guc_slpc_types.h"
> >>
> >> +#define SLPC_MAX_FREQ_MHZ 4250
> >
> > This seems to be really a value (255 converted to freq) so seems ok to
> > intepret in MHz.
> >
> > Thanks.
> > --
> > Ashutosh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
  2022-10-22  5:26       ` Dixit, Ashutosh
@ 2022-10-24 19:38         ` Belgaumkar, Vinay
  -1 siblings, 0 replies; 11+ messages in thread
From: Belgaumkar, Vinay @ 2022-10-24 19:38 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: intel-gfx, Riana Tauro, dri-devel


On 10/21/2022 10:26 PM, Dixit, Ashutosh wrote:
> On Fri, 21 Oct 2022 18:38:57 -0700, Belgaumkar, Vinay wrote:
>> On 10/20/2022 3:57 PM, Dixit, Ashutosh wrote:
>>> On Tue, 18 Oct 2022 11:30:31 -0700, Vinay Belgaumkar wrote:
>>> Hi Vinay,
>>>
>>>> diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
>>>> index 4c6e9257e593..e42bc215e54d 100644
>>>> --- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
>>>> +++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
>>>> @@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
>>>> 	enum intel_engine_id id;
>>>> 	struct igt_spinner spin;
>>>> 	u32 slpc_min_freq, slpc_max_freq;
>>>> +	u32 saved_min_freq;
>>>> 	int err = 0;
>>>>
>>>> 	if (!intel_uc_uses_guc_slpc(&gt->uc))
>>>> @@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
>>>> 		return -EIO;
>>>> 	}
>>>>
>>>> -	/*
>>>> -	 * FIXME: With efficient frequency enabled, GuC can request
>>>> -	 * frequencies higher than the SLPC max. While this is fixed
>>>> -	 * in GuC, we level set these tests with RPn as min.
>>>> -	 */
>>>> -	err = slpc_set_min_freq(slpc, slpc->min_freq);
>>>> -	if (err)
>>>> -		return err;
>>>> +	if (slpc_min_freq == slpc_max_freq) {
>>>> +		/* Server parts will have min/max clamped to RP0 */
>>>> +		if (slpc->min_is_rpmax) {
>>>> +			err = slpc_set_min_freq(slpc, slpc->min_freq);
>>>> +			if (err) {
>>>> +				pr_err("Unable to update min freq on server part");
>>>> +				return err;
>>>> +			}
>>>>
>>>> -	if (slpc->min_freq == slpc->rp0_freq) {
>>>> -		pr_err("Min/Max are fused to the same value\n");
>>>> -		return -EINVAL;
>>>> +		} else {
>>>> +			pr_err("Min/Max are fused to the same value\n");
>>>> +			return -EINVAL;
>>> Sorry but I am not following this else case here. Why are we saying min/max
>>> are fused to the same value? In this case we can't do
>>> "slpc_set_min_freq(slpc, slpc->min_freq)" ? That is, we can't change SLPC
>>> min freq?
>> This would be an error case due to a faulty part. We may come across a part
>> where min/max is fused to the same value.
> But even then the original check is much clearer since it is actually
> comparing the fused freq's:
>
> 	if (slpc->min_freq == slpc->rp0_freq)
>
> Because if min/max have been changed slpc_min_freq and slpc_max_freq are no
> longer fused freq.
>
> And also this check should be right at the top of run_test, right after if
> (!intel_uc_uses_guc_slpc), rather than in the middle here (otherwise
> because we are basically not doing any error rewinding so causing memory
> leaks if any of the functions return error).
ok.
>
>>>> +		}
>>>> +	} else {
>>>> +		/*
>>>> +		 * FIXME: With efficient frequency enabled, GuC can request
>>>> +		 * frequencies higher than the SLPC max. While this is fixed
>>>> +		 * in GuC, we level set these tests with RPn as min.
>>>> +		 */
>>>> +		err = slpc_set_min_freq(slpc, slpc->min_freq);
>>>> +		if (err)
>>>> +			return err;
>>>> 	}
> So let's do what is suggested above and then see what remains here and if
> we need all these code changes. Most likely we can just do unconditionally
> what we were doing before, i.e.:
>
> 	err = slpc_set_min_freq(slpc, slpc->min_freq);
> 	if (err)
> 		return err;
>
>>>> +	saved_min_freq = slpc_min_freq;
>>>> +
>>>> +	/* New temp min freq = RPn */
>>>> +	slpc_min_freq = slpc->min_freq;
> Why do we need saved_min_freq? We can retain slpc_min_freq and in the check below:
>
> 	if (max_act_freq <= slpc_min_freq)
>
> We can just change the check to:
>
> 	if (max_act_freq <= slpc->min_freq)
>
> Looks like to have been a bug in the original code?
Not a bug, it wasn't needed until we didn't have server parts 
(slpc_min_freq would typically be slpc->min_freq on non-server parts).
>>>> +
>>>> 	intel_gt_pm_wait_for_idle(gt);
>>>> 	intel_gt_pm_get(gt);
>>>> 	for_each_engine(engine, gt, id) {
>>>> @@ -347,7 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
>>>>
>>>> 	/* Restore min/max frequencies */
>>>> 	slpc_set_max_freq(slpc, slpc_max_freq);
>>>> -	slpc_set_min_freq(slpc, slpc_min_freq);
>>>> +	slpc_set_min_freq(slpc, saved_min_freq);
>>>>
>>>> 	if (igt_flush_test(gt->i915))
>>>> 		err = -EIO;
>>>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>>>> index fdd895f73f9f..b7cdeec44bd3 100644
>>>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>>>> @@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
>>>>
>>>> 	slpc->max_freq_softlimit = 0;
>>>> 	slpc->min_freq_softlimit = 0;
>>>> +	slpc->min_is_rpmax = false;
>>>>
>>>> 	slpc->boost_freq = 0;
>>>> 	atomic_set(&slpc->num_waiters, 0);
>>>> @@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
>>>> 	return 0;
>>>>    }
>>>>
>>>> +static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
>>>> +{
>>>> +	int slpc_min_freq;
>>>> +
>>>> +	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
>>>> +		return false;
>>> I am wondering what happens if the above fails on server? Should we return
>>> true or false on server and what are the consequences of returning false on
>>> server?
>>>
>>> Any case I think we should at least put a drm_err or something here just in
>>> case this ever fails so we'll know something weird happened.
>> Makes sense.
>>
>>>> +
>>>> +	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
>>>> +		return true;
>>>> +	else
>>>> +		return false;
>>>> +}
>>>> +
>>>> +static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
>>>> +{
>>>> +	/* For server parts, SLPC min will be at RPMax.
>>>> +	 * Use min softlimit to clamp it to RP0 instead.
>>>> +	 */
>>>> +	if (is_slpc_min_freq_rpmax(slpc) &&
>>>> +	    !slpc->min_freq_softlimit) {
> This should be swapped around:
>
> 	if (!slpc->min_freq_softlimit && is_slpc_min_freq_rpmax(slpc))
>
> So we should only have to call is_slpc_min_freq_rpmax if
> slpc->min_freq_softlimit is 0 (that is only once the first time during
> init).
ok.
>
>>>> +		slpc->min_is_rpmax = true;
>>>> +		slpc->min_freq_softlimit = slpc->rp0_freq;
>>>> +		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
>>>> +	}
>>>> +}
>>>> +
>>>>    static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
>>>>    {
>>>> 	/* Force SLPC to used platform rp0 */
>>>> @@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
>>>>
>>>> 	slpc_get_rp_values(slpc);
>>>>
>>>> +	/* Handle the case where min=max=RPmax */
>>>> +	update_server_min_softlimit(slpc);
>>>> +
>>>> 	/* Set SLPC max limit to RP0 */
>>>> 	ret = slpc_use_fused_rp0(slpc);
>>>> 	if (unlikely(ret)) {
>>>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>>>> index 82a98f78f96c..11975a31c9d0 100644
>>>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>>>> @@ -9,6 +9,8 @@
>>>>    #include "intel_guc_submission.h"
>>>>    #include "intel_guc_slpc_types.h"
>>>>
>>>> +#define SLPC_MAX_FREQ_MHZ 4250
>>> This seems to be really a value (255 converted to freq) so seems ok to
>>> intepret in MHz.

yes, GuC returns the value in MHz.

Thanks,

Vinay.

>>>
>>> Thanks.
>>> --
>>> Ashutosh

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency
@ 2022-10-24 19:38         ` Belgaumkar, Vinay
  0 siblings, 0 replies; 11+ messages in thread
From: Belgaumkar, Vinay @ 2022-10-24 19:38 UTC (permalink / raw)
  To: Dixit, Ashutosh; +Cc: intel-gfx, dri-devel


On 10/21/2022 10:26 PM, Dixit, Ashutosh wrote:
> On Fri, 21 Oct 2022 18:38:57 -0700, Belgaumkar, Vinay wrote:
>> On 10/20/2022 3:57 PM, Dixit, Ashutosh wrote:
>>> On Tue, 18 Oct 2022 11:30:31 -0700, Vinay Belgaumkar wrote:
>>> Hi Vinay,
>>>
>>>> diff --git a/drivers/gpu/drm/i915/gt/selftest_slpc.c b/drivers/gpu/drm/i915/gt/selftest_slpc.c
>>>> index 4c6e9257e593..e42bc215e54d 100644
>>>> --- a/drivers/gpu/drm/i915/gt/selftest_slpc.c
>>>> +++ b/drivers/gpu/drm/i915/gt/selftest_slpc.c
>>>> @@ -234,6 +234,7 @@ static int run_test(struct intel_gt *gt, int test_type)
>>>> 	enum intel_engine_id id;
>>>> 	struct igt_spinner spin;
>>>> 	u32 slpc_min_freq, slpc_max_freq;
>>>> +	u32 saved_min_freq;
>>>> 	int err = 0;
>>>>
>>>> 	if (!intel_uc_uses_guc_slpc(&gt->uc))
>>>> @@ -252,20 +253,35 @@ static int run_test(struct intel_gt *gt, int test_type)
>>>> 		return -EIO;
>>>> 	}
>>>>
>>>> -	/*
>>>> -	 * FIXME: With efficient frequency enabled, GuC can request
>>>> -	 * frequencies higher than the SLPC max. While this is fixed
>>>> -	 * in GuC, we level set these tests with RPn as min.
>>>> -	 */
>>>> -	err = slpc_set_min_freq(slpc, slpc->min_freq);
>>>> -	if (err)
>>>> -		return err;
>>>> +	if (slpc_min_freq == slpc_max_freq) {
>>>> +		/* Server parts will have min/max clamped to RP0 */
>>>> +		if (slpc->min_is_rpmax) {
>>>> +			err = slpc_set_min_freq(slpc, slpc->min_freq);
>>>> +			if (err) {
>>>> +				pr_err("Unable to update min freq on server part");
>>>> +				return err;
>>>> +			}
>>>>
>>>> -	if (slpc->min_freq == slpc->rp0_freq) {
>>>> -		pr_err("Min/Max are fused to the same value\n");
>>>> -		return -EINVAL;
>>>> +		} else {
>>>> +			pr_err("Min/Max are fused to the same value\n");
>>>> +			return -EINVAL;
>>> Sorry but I am not following this else case here. Why are we saying min/max
>>> are fused to the same value? In this case we can't do
>>> "slpc_set_min_freq(slpc, slpc->min_freq)" ? That is, we can't change SLPC
>>> min freq?
>> This would be an error case due to a faulty part. We may come across a part
>> where min/max is fused to the same value.
> But even then the original check is much clearer since it is actually
> comparing the fused freq's:
>
> 	if (slpc->min_freq == slpc->rp0_freq)
>
> Because if min/max have been changed slpc_min_freq and slpc_max_freq are no
> longer fused freq.
>
> And also this check should be right at the top of run_test, right after if
> (!intel_uc_uses_guc_slpc), rather than in the middle here (otherwise
> because we are basically not doing any error rewinding so causing memory
> leaks if any of the functions return error).
ok.
>
>>>> +		}
>>>> +	} else {
>>>> +		/*
>>>> +		 * FIXME: With efficient frequency enabled, GuC can request
>>>> +		 * frequencies higher than the SLPC max. While this is fixed
>>>> +		 * in GuC, we level set these tests with RPn as min.
>>>> +		 */
>>>> +		err = slpc_set_min_freq(slpc, slpc->min_freq);
>>>> +		if (err)
>>>> +			return err;
>>>> 	}
> So let's do what is suggested above and then see what remains here and if
> we need all these code changes. Most likely we can just do unconditionally
> what we were doing before, i.e.:
>
> 	err = slpc_set_min_freq(slpc, slpc->min_freq);
> 	if (err)
> 		return err;
>
>>>> +	saved_min_freq = slpc_min_freq;
>>>> +
>>>> +	/* New temp min freq = RPn */
>>>> +	slpc_min_freq = slpc->min_freq;
> Why do we need saved_min_freq? We can retain slpc_min_freq and in the check below:
>
> 	if (max_act_freq <= slpc_min_freq)
>
> We can just change the check to:
>
> 	if (max_act_freq <= slpc->min_freq)
>
> Looks like to have been a bug in the original code?
Not a bug, it wasn't needed until we didn't have server parts 
(slpc_min_freq would typically be slpc->min_freq on non-server parts).
>>>> +
>>>> 	intel_gt_pm_wait_for_idle(gt);
>>>> 	intel_gt_pm_get(gt);
>>>> 	for_each_engine(engine, gt, id) {
>>>> @@ -347,7 +363,7 @@ static int run_test(struct intel_gt *gt, int test_type)
>>>>
>>>> 	/* Restore min/max frequencies */
>>>> 	slpc_set_max_freq(slpc, slpc_max_freq);
>>>> -	slpc_set_min_freq(slpc, slpc_min_freq);
>>>> +	slpc_set_min_freq(slpc, saved_min_freq);
>>>>
>>>> 	if (igt_flush_test(gt->i915))
>>>> 		err = -EIO;
>>>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>>>> index fdd895f73f9f..b7cdeec44bd3 100644
>>>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
>>>> @@ -263,6 +263,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
>>>>
>>>> 	slpc->max_freq_softlimit = 0;
>>>> 	slpc->min_freq_softlimit = 0;
>>>> +	slpc->min_is_rpmax = false;
>>>>
>>>> 	slpc->boost_freq = 0;
>>>> 	atomic_set(&slpc->num_waiters, 0);
>>>> @@ -588,6 +589,32 @@ static int slpc_set_softlimits(struct intel_guc_slpc *slpc)
>>>> 	return 0;
>>>>    }
>>>>
>>>> +static bool is_slpc_min_freq_rpmax(struct intel_guc_slpc *slpc)
>>>> +{
>>>> +	int slpc_min_freq;
>>>> +
>>>> +	if (intel_guc_slpc_get_min_freq(slpc, &slpc_min_freq))
>>>> +		return false;
>>> I am wondering what happens if the above fails on server? Should we return
>>> true or false on server and what are the consequences of returning false on
>>> server?
>>>
>>> Any case I think we should at least put a drm_err or something here just in
>>> case this ever fails so we'll know something weird happened.
>> Makes sense.
>>
>>>> +
>>>> +	if (slpc_min_freq == SLPC_MAX_FREQ_MHZ)
>>>> +		return true;
>>>> +	else
>>>> +		return false;
>>>> +}
>>>> +
>>>> +static void update_server_min_softlimit(struct intel_guc_slpc *slpc)
>>>> +{
>>>> +	/* For server parts, SLPC min will be at RPMax.
>>>> +	 * Use min softlimit to clamp it to RP0 instead.
>>>> +	 */
>>>> +	if (is_slpc_min_freq_rpmax(slpc) &&
>>>> +	    !slpc->min_freq_softlimit) {
> This should be swapped around:
>
> 	if (!slpc->min_freq_softlimit && is_slpc_min_freq_rpmax(slpc))
>
> So we should only have to call is_slpc_min_freq_rpmax if
> slpc->min_freq_softlimit is 0 (that is only once the first time during
> init).
ok.
>
>>>> +		slpc->min_is_rpmax = true;
>>>> +		slpc->min_freq_softlimit = slpc->rp0_freq;
>>>> +		(slpc_to_gt(slpc))->defaults.min_freq = slpc->min_freq_softlimit;
>>>> +	}
>>>> +}
>>>> +
>>>>    static int slpc_use_fused_rp0(struct intel_guc_slpc *slpc)
>>>>    {
>>>> 	/* Force SLPC to used platform rp0 */
>>>> @@ -647,6 +674,9 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
>>>>
>>>> 	slpc_get_rp_values(slpc);
>>>>
>>>> +	/* Handle the case where min=max=RPmax */
>>>> +	update_server_min_softlimit(slpc);
>>>> +
>>>> 	/* Set SLPC max limit to RP0 */
>>>> 	ret = slpc_use_fused_rp0(slpc);
>>>> 	if (unlikely(ret)) {
>>>> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>>>> index 82a98f78f96c..11975a31c9d0 100644
>>>> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>>>> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.h
>>>> @@ -9,6 +9,8 @@
>>>>    #include "intel_guc_submission.h"
>>>>    #include "intel_guc_slpc_types.h"
>>>>
>>>> +#define SLPC_MAX_FREQ_MHZ 4250
>>> This seems to be really a value (255 converted to freq) so seems ok to
>>> intepret in MHz.

yes, GuC returns the value in MHz.

Thanks,

Vinay.

>>>
>>> Thanks.
>>> --
>>> Ashutosh

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2022-10-24 19:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-18 18:30 [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency Vinay Belgaumkar
2022-10-18 18:30 ` [Intel-gfx] " Vinay Belgaumkar
2022-10-18 19:21 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/slpc: Use platform limits for min/max frequency (rev3) Patchwork
2022-10-18 19:39 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-10-19 12:28 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2022-10-20 22:57 ` [Intel-gfx] [PATCH v3] drm/i915/slpc: Use platform limits for min/max frequency Dixit, Ashutosh
2022-10-22  1:38   ` Belgaumkar, Vinay
2022-10-22  5:26     ` Dixit, Ashutosh
2022-10-22  5:26       ` Dixit, Ashutosh
2022-10-24 19:38       ` Belgaumkar, Vinay
2022-10-24 19:38         ` Belgaumkar, Vinay

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.