All of lore.kernel.org
 help / color / mirror / Atom feed
* [CI] drm/i915: Remove obsolete min/max freq setters from debugfs
@ 2018-04-25 14:23 Chris Wilson
  2018-04-25 15:04 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chris Wilson @ 2018-04-25 14:23 UTC (permalink / raw)
  To: intel-gfx

A more complete, and more importantly stable, interface for controlling
the RPS frequency range is available in sysfs, obsoleting the unstable
debugfs.

It's presence seems to trick people into using it, forgetting it is not
ABI.

References: https://bugs.freedesktop.org/show_bug.cgi?id=106237
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 115 ----------------------------
 1 file changed, 115 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2f05f5262bba..1c88805d3354 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4204,119 +4204,6 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_drop_caches_fops,
 			i915_drop_caches_get, i915_drop_caches_set,
 			"0x%08llx\n");
 
-static int
-i915_max_freq_get(void *data, u64 *val)
-{
-	struct drm_i915_private *dev_priv = data;
-
-	if (INTEL_GEN(dev_priv) < 6)
-		return -ENODEV;
-
-	*val = intel_gpu_freq(dev_priv, dev_priv->gt_pm.rps.max_freq_softlimit);
-	return 0;
-}
-
-static int
-i915_max_freq_set(void *data, u64 val)
-{
-	struct drm_i915_private *dev_priv = data;
-	struct intel_rps *rps = &dev_priv->gt_pm.rps;
-	u32 hw_max, hw_min;
-	int ret;
-
-	if (INTEL_GEN(dev_priv) < 6)
-		return -ENODEV;
-
-	DRM_DEBUG_DRIVER("Manually setting max freq to %llu\n", val);
-
-	ret = mutex_lock_interruptible(&dev_priv->pcu_lock);
-	if (ret)
-		return ret;
-
-	/*
-	 * Turbo will still be enabled, but won't go above the set value.
-	 */
-	val = intel_freq_opcode(dev_priv, val);
-
-	hw_max = rps->max_freq;
-	hw_min = rps->min_freq;
-
-	if (val < hw_min || val > hw_max || val < rps->min_freq_softlimit) {
-		mutex_unlock(&dev_priv->pcu_lock);
-		return -EINVAL;
-	}
-
-	rps->max_freq_softlimit = val;
-
-	if (intel_set_rps(dev_priv, val))
-		DRM_DEBUG_DRIVER("failed to update RPS to new softlimit\n");
-
-	mutex_unlock(&dev_priv->pcu_lock);
-
-	return 0;
-}
-
-DEFINE_SIMPLE_ATTRIBUTE(i915_max_freq_fops,
-			i915_max_freq_get, i915_max_freq_set,
-			"%llu\n");
-
-static int
-i915_min_freq_get(void *data, u64 *val)
-{
-	struct drm_i915_private *dev_priv = data;
-
-	if (INTEL_GEN(dev_priv) < 6)
-		return -ENODEV;
-
-	*val = intel_gpu_freq(dev_priv, dev_priv->gt_pm.rps.min_freq_softlimit);
-	return 0;
-}
-
-static int
-i915_min_freq_set(void *data, u64 val)
-{
-	struct drm_i915_private *dev_priv = data;
-	struct intel_rps *rps = &dev_priv->gt_pm.rps;
-	u32 hw_max, hw_min;
-	int ret;
-
-	if (INTEL_GEN(dev_priv) < 6)
-		return -ENODEV;
-
-	DRM_DEBUG_DRIVER("Manually setting min freq to %llu\n", val);
-
-	ret = mutex_lock_interruptible(&dev_priv->pcu_lock);
-	if (ret)
-		return ret;
-
-	/*
-	 * Turbo will still be enabled, but won't go below the set value.
-	 */
-	val = intel_freq_opcode(dev_priv, val);
-
-	hw_max = rps->max_freq;
-	hw_min = rps->min_freq;
-
-	if (val < hw_min ||
-	    val > hw_max || val > rps->max_freq_softlimit) {
-		mutex_unlock(&dev_priv->pcu_lock);
-		return -EINVAL;
-	}
-
-	rps->min_freq_softlimit = val;
-
-	if (intel_set_rps(dev_priv, val))
-		DRM_DEBUG_DRIVER("failed to update RPS to new softlimit\n");
-
-	mutex_unlock(&dev_priv->pcu_lock);
-
-	return 0;
-}
-
-DEFINE_SIMPLE_ATTRIBUTE(i915_min_freq_fops,
-			i915_min_freq_get, i915_min_freq_set,
-			"%llu\n");
-
 static int
 i915_cache_sharing_get(void *data, u64 *val)
 {
@@ -4878,8 +4765,6 @@ static const struct i915_debugfs_files {
 	const struct file_operations *fops;
 } i915_debugfs_files[] = {
 	{"i915_wedged", &i915_wedged_fops},
-	{"i915_max_freq", &i915_max_freq_fops},
-	{"i915_min_freq", &i915_min_freq_fops},
 	{"i915_cache_sharing", &i915_cache_sharing_fops},
 	{"i915_ring_missed_irq", &i915_ring_missed_irq_fops},
 	{"i915_ring_test_irq", &i915_ring_test_irq_fops},
-- 
2.17.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for drm/i915: Remove obsolete min/max freq setters from debugfs
  2018-04-25 14:23 [CI] drm/i915: Remove obsolete min/max freq setters from debugfs Chris Wilson
@ 2018-04-25 15:04 ` Patchwork
  2018-04-25 16:06 ` Patchwork
  2018-04-25 17:56 ` [CI] " Rodrigo Vivi
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-04-25 15:04 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Remove obsolete min/max freq setters from debugfs
URL   : https://patchwork.freedesktop.org/series/42293/
State : failure

== Summary ==

= CI Bug Log - changes from CI_DRM_4094 -> Patchwork_8799 =

== Summary - FAILURE ==

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

  External URL: https://patchwork.freedesktop.org/api/1.0/series/42293/revisions/1/mbox/

== Possible new issues ==

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

  === IGT changes ===

    ==== Possible regressions ====

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-c:
      fi-glk-j4005:       PASS -> DMESG-WARN

    
== Known issues ==

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

  === IGT changes ===

    ==== Issues hit ====

    igt@kms_frontbuffer_tracking@basic:
      {fi-hsw-4200u}:     PASS -> DMESG-FAIL (fdo#106103)

    igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
      fi-skl-guc:         PASS -> FAIL (fdo#103191)

    igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b:
      fi-snb-2520m:       PASS -> INCOMPLETE (fdo#103713)

    
    ==== Possible fixes ====

    igt@gem_exec_suspend@basic-s3:
      fi-ivb-3520m:       DMESG-WARN (fdo#106084) -> PASS

    igt@kms_pipe_crc_basic@nonblocking-crc-pipe-c:
      fi-glk-j4005:       DMESG-WARN -> PASS

    igt@pm_rpm@basic-pci-d3-state:
      fi-glk-j4005:       DMESG-WARN (fdo#106097) -> PASS

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

  fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
  fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
  fdo#106084 https://bugs.freedesktop.org/show_bug.cgi?id=106084
  fdo#106097 https://bugs.freedesktop.org/show_bug.cgi?id=106097
  fdo#106103 https://bugs.freedesktop.org/show_bug.cgi?id=106103


== Participating hosts (39 -> 35) ==

  Missing    (4): fi-ctg-p8600 fi-ilk-m540 fi-skl-6700hq fi-pnv-d510 


== Build changes ==

    * Linux: CI_DRM_4094 -> Patchwork_8799

  CI_DRM_4094: e4641c176c96e8b4a7951f6a38dd681c20754173 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGT_4448: 0350f0e7f6a0e07281445fc3082aa70419f4aac7 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
  Patchwork_8799: bf35568b684a85b41ad1e046a35dfecfeb46190b @ git://anongit.freedesktop.org/gfx-ci/linux
  piglit_4448: 1a4372adb07ede41e35ff4786b9b034fc603b105 @ git://anongit.freedesktop.org/piglit


== Linux commits ==

bf35568b684a drm/i915: Remove obsolete min/max freq setters from debugfs

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8799/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.BAT: failure for drm/i915: Remove obsolete min/max freq setters from debugfs
  2018-04-25 14:23 [CI] drm/i915: Remove obsolete min/max freq setters from debugfs Chris Wilson
  2018-04-25 15:04 ` ✗ Fi.CI.BAT: failure for " Patchwork
@ 2018-04-25 16:06 ` Patchwork
  2018-04-25 17:56 ` [CI] " Rodrigo Vivi
  2 siblings, 0 replies; 4+ messages in thread
From: Patchwork @ 2018-04-25 16:06 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915: Remove obsolete min/max freq setters from debugfs
URL   : https://patchwork.freedesktop.org/series/42293/
State : failure

== Summary ==

Applying: drm/i915: Remove obsolete min/max freq setters from debugfs
Using index info to reconstruct a base tree...
M	drivers/gpu/drm/i915/i915_debugfs.c
Falling back to patching base and 3-way merge...
No changes -- Patch already applied.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_8799/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [CI] drm/i915: Remove obsolete min/max freq setters from debugfs
  2018-04-25 14:23 [CI] drm/i915: Remove obsolete min/max freq setters from debugfs Chris Wilson
  2018-04-25 15:04 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2018-04-25 16:06 ` Patchwork
@ 2018-04-25 17:56 ` Rodrigo Vivi
  2 siblings, 0 replies; 4+ messages in thread
From: Rodrigo Vivi @ 2018-04-25 17:56 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

On Wed, Apr 25, 2018 at 03:23:34PM +0100, Chris Wilson wrote:
> A more complete, and more importantly stable, interface for controlling
> the RPS frequency range is available in sysfs, obsoleting the unstable
> debugfs.
> 
> It's presence seems to trick people into using it, forgetting it is not
> ABI.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=106237
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewed-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>

after CI gets happy:
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 115 ----------------------------
>  1 file changed, 115 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 2f05f5262bba..1c88805d3354 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -4204,119 +4204,6 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_drop_caches_fops,
>  			i915_drop_caches_get, i915_drop_caches_set,
>  			"0x%08llx\n");
>  
> -static int
> -i915_max_freq_get(void *data, u64 *val)
> -{
> -	struct drm_i915_private *dev_priv = data;
> -
> -	if (INTEL_GEN(dev_priv) < 6)
> -		return -ENODEV;
> -
> -	*val = intel_gpu_freq(dev_priv, dev_priv->gt_pm.rps.max_freq_softlimit);
> -	return 0;
> -}
> -
> -static int
> -i915_max_freq_set(void *data, u64 val)
> -{
> -	struct drm_i915_private *dev_priv = data;
> -	struct intel_rps *rps = &dev_priv->gt_pm.rps;
> -	u32 hw_max, hw_min;
> -	int ret;
> -
> -	if (INTEL_GEN(dev_priv) < 6)
> -		return -ENODEV;
> -
> -	DRM_DEBUG_DRIVER("Manually setting max freq to %llu\n", val);
> -
> -	ret = mutex_lock_interruptible(&dev_priv->pcu_lock);
> -	if (ret)
> -		return ret;
> -
> -	/*
> -	 * Turbo will still be enabled, but won't go above the set value.
> -	 */
> -	val = intel_freq_opcode(dev_priv, val);
> -
> -	hw_max = rps->max_freq;
> -	hw_min = rps->min_freq;
> -
> -	if (val < hw_min || val > hw_max || val < rps->min_freq_softlimit) {
> -		mutex_unlock(&dev_priv->pcu_lock);
> -		return -EINVAL;
> -	}
> -
> -	rps->max_freq_softlimit = val;
> -
> -	if (intel_set_rps(dev_priv, val))
> -		DRM_DEBUG_DRIVER("failed to update RPS to new softlimit\n");
> -
> -	mutex_unlock(&dev_priv->pcu_lock);
> -
> -	return 0;
> -}
> -
> -DEFINE_SIMPLE_ATTRIBUTE(i915_max_freq_fops,
> -			i915_max_freq_get, i915_max_freq_set,
> -			"%llu\n");
> -
> -static int
> -i915_min_freq_get(void *data, u64 *val)
> -{
> -	struct drm_i915_private *dev_priv = data;
> -
> -	if (INTEL_GEN(dev_priv) < 6)
> -		return -ENODEV;
> -
> -	*val = intel_gpu_freq(dev_priv, dev_priv->gt_pm.rps.min_freq_softlimit);
> -	return 0;
> -}
> -
> -static int
> -i915_min_freq_set(void *data, u64 val)
> -{
> -	struct drm_i915_private *dev_priv = data;
> -	struct intel_rps *rps = &dev_priv->gt_pm.rps;
> -	u32 hw_max, hw_min;
> -	int ret;
> -
> -	if (INTEL_GEN(dev_priv) < 6)
> -		return -ENODEV;
> -
> -	DRM_DEBUG_DRIVER("Manually setting min freq to %llu\n", val);
> -
> -	ret = mutex_lock_interruptible(&dev_priv->pcu_lock);
> -	if (ret)
> -		return ret;
> -
> -	/*
> -	 * Turbo will still be enabled, but won't go below the set value.
> -	 */
> -	val = intel_freq_opcode(dev_priv, val);
> -
> -	hw_max = rps->max_freq;
> -	hw_min = rps->min_freq;
> -
> -	if (val < hw_min ||
> -	    val > hw_max || val > rps->max_freq_softlimit) {
> -		mutex_unlock(&dev_priv->pcu_lock);
> -		return -EINVAL;
> -	}
> -
> -	rps->min_freq_softlimit = val;
> -
> -	if (intel_set_rps(dev_priv, val))
> -		DRM_DEBUG_DRIVER("failed to update RPS to new softlimit\n");
> -
> -	mutex_unlock(&dev_priv->pcu_lock);
> -
> -	return 0;
> -}
> -
> -DEFINE_SIMPLE_ATTRIBUTE(i915_min_freq_fops,
> -			i915_min_freq_get, i915_min_freq_set,
> -			"%llu\n");
> -
>  static int
>  i915_cache_sharing_get(void *data, u64 *val)
>  {
> @@ -4878,8 +4765,6 @@ static const struct i915_debugfs_files {
>  	const struct file_operations *fops;
>  } i915_debugfs_files[] = {
>  	{"i915_wedged", &i915_wedged_fops},
> -	{"i915_max_freq", &i915_max_freq_fops},
> -	{"i915_min_freq", &i915_min_freq_fops},
>  	{"i915_cache_sharing", &i915_cache_sharing_fops},
>  	{"i915_ring_missed_irq", &i915_ring_missed_irq_fops},
>  	{"i915_ring_test_irq", &i915_ring_test_irq_fops},
> -- 
> 2.17.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2018-04-25 17:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-25 14:23 [CI] drm/i915: Remove obsolete min/max freq setters from debugfs Chris Wilson
2018-04-25 15:04 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-04-25 16:06 ` Patchwork
2018-04-25 17:56 ` [CI] " Rodrigo Vivi

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.