[Intel-gfx] [PATCH 4/5] drm/i915: Use ilk_wm_max_level() in latency debugfs files
Daniel Vetter
daniel at ffwll.ch
Tue May 13 18:46:23 CEST 2014
On Tue, May 13, 2014 at 03:30:27PM +0100, Damien Lespiau wrote:
> Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
I prefer "expose foo" and "use foo" in the same patch. I'll squash these
two if you're ok.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_debugfs.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 18b3565..6801987 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -3084,7 +3084,7 @@ static const struct file_operations i915_display_crc_ctl_fops = {
> static void wm_latency_show(struct seq_file *m, const uint16_t wm[5])
> {
> struct drm_device *dev = m->private;
> - int num_levels = IS_HASWELL(dev) || IS_BROADWELL(dev) ? 5 : 4;
> + int num_levels = ilk_wm_max_level(dev) + 1;
> int level;
>
> drm_modeset_lock_all(dev);
> @@ -3167,7 +3167,7 @@ static ssize_t wm_latency_write(struct file *file, const char __user *ubuf,
> struct seq_file *m = file->private_data;
> struct drm_device *dev = m->private;
> uint16_t new[5] = { 0 };
> - int num_levels = IS_HASWELL(dev) || IS_BROADWELL(dev) ? 5 : 4;
> + int num_levels = ilk_wm_max_level(dev) + 1;
> int level;
> int ret;
> char tmp[32];
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list