From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 4/5] drm/i915: Use ilk_wm_max_level() in latency debugfs files
Date: Tue, 13 May 2014 19:30:50 +0300 [thread overview]
Message-ID: <20140513163050.GH18465@intel.com> (raw)
In-Reply-To: <1399991428-32763-5-git-send-email-damien.lespiau@intel.com>
On Tue, May 13, 2014 at 03:30:27PM +0100, Damien Lespiau wrote:
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> 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;
One idea that has been rattling in my head would be to introduce
dev_priv->wm.max_level or some such thing that would be computed
dynamically like so:
dev_priv->wm.max_level = min(hw_max, last_level_with_valid_latency_value);
This way we could actually disable some of the deeper levels without
worrying that the watermark code will encounter a zero latency value
somewhere. We could even do other crazy things like trying out LP3
on ILK ;)
But that's a bit orthogonal, and even then this patch does make sense.
For patches 3-5:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
I'll let someone else bikeshed the for_each_crtc macros.
> int level;
> int ret;
> char tmp[32];
> --
> 1.8.3.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
next prev parent reply other threads:[~2014-05-13 16:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-13 14:30 [PATCH 0/5] Misc preparation patches Damien Lespiau
2014-05-13 14:30 ` [PATCH 1/5] drm/i915: Introduce a for_each_intel_crtc() macro Damien Lespiau
2014-05-13 14:30 ` [PATCH 2/5] drm/i915: Introduce a for_each_crtc() macro Damien Lespiau
2014-05-13 16:45 ` Daniel Vetter
2014-05-13 19:51 ` Daniel Vetter
2014-05-13 14:30 ` [PATCH 3/5] drm/i915: Expose ilk_wm_max_level() Damien Lespiau
2014-05-13 14:30 ` [PATCH 4/5] drm/i915: Use ilk_wm_max_level() in latency debugfs files Damien Lespiau
2014-05-13 16:30 ` Ville Syrjälä [this message]
2014-05-13 16:46 ` Daniel Vetter
2014-05-13 16:51 ` Damien Lespiau
2014-05-13 18:03 ` Daniel Vetter
2014-05-13 14:30 ` [PATCH 5/5] drm/i915: Don't cast void* pointers Damien Lespiau
2014-05-13 16:45 ` Daniel Vetter
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=20140513163050.GH18465@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=damien.lespiau@intel.com \
--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.