From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [CI] drm/i915: Remove obsolete min/max freq setters from debugfs
Date: Wed, 25 Apr 2018 10:56:29 -0700 [thread overview]
Message-ID: <20180425175629.GV1994@intel.com> (raw)
In-Reply-To: <20180425142334.27113-1-chris@chris-wilson.co.uk>
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
prev parent reply other threads:[~2018-04-25 17:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180425175629.GV1994@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.