From: Deepak S <deepak.s@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 7/7] drm/i915: Add media rc6 residency file to sysfs
Date: Tue, 20 Jan 2015 08:54:58 +0530 [thread overview]
Message-ID: <54BDCA8A.1070604@linux.intel.com> (raw)
In-Reply-To: <1421668253-18641-8-git-send-email-ville.syrjala@linux.intel.com>
On Monday 19 January 2015 05:20 PM, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> On VLV/CHV the media well rc6 residency gets reported separately
> from the render well, so add another file to sysfs so that we can
> report the residency to the user.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Looks like we missed Media well completely :) and I think we need igt test to verify media residency?
Reviewed-by: Deepak S<deepak.s@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_sysfs.c | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
> index 1ca944b..db14d3e 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -127,10 +127,19 @@ show_rc6pp_ms(struct device *kdev, struct device_attribute *attr, char *buf)
> return snprintf(buf, PAGE_SIZE, "%u\n", rc6pp_residency);
> }
>
> +static ssize_t
> +show_media_rc6_ms(struct device *kdev, struct device_attribute *attr, char *buf)
> +{
> + struct drm_minor *dminor = dev_get_drvdata(kdev);
> + u32 rc6_residency = calc_residency(dminor->dev, VLV_GT_MEDIA_RC6);
> + return snprintf(buf, PAGE_SIZE, "%u\n", rc6_residency);
> +}
> +
> static DEVICE_ATTR(rc6_enable, S_IRUGO, show_rc6_mask, NULL);
> static DEVICE_ATTR(rc6_residency_ms, S_IRUGO, show_rc6_ms, NULL);
> static DEVICE_ATTR(rc6p_residency_ms, S_IRUGO, show_rc6p_ms, NULL);
> static DEVICE_ATTR(rc6pp_residency_ms, S_IRUGO, show_rc6pp_ms, NULL);
> +static DEVICE_ATTR(media_rc6_residency_ms, S_IRUGO, show_media_rc6_ms, NULL);
>
> static struct attribute *rc6_attrs[] = {
> &dev_attr_rc6_enable.attr,
> @@ -153,6 +162,16 @@ static struct attribute_group rc6p_attr_group = {
> .name = power_group_name,
> .attrs = rc6p_attrs
> };
> +
> +static struct attribute *media_rc6_attrs[] = {
> + &dev_attr_media_rc6_residency_ms.attr,
> + NULL
> +};
> +
> +static struct attribute_group media_rc6_attr_group = {
> + .name = power_group_name,
> + .attrs = media_rc6_attrs
> +};
> #endif
>
> static int l3_access_valid(struct drm_device *dev, loff_t offset)
> @@ -612,6 +631,12 @@ void i915_setup_sysfs(struct drm_device *dev)
> if (ret)
> DRM_ERROR("RC6p residency sysfs setup failed\n");
> }
> + if (IS_VALLEYVIEW(dev)) {
> + ret = sysfs_merge_group(&dev->primary->kdev->kobj,
> + &media_rc6_attr_group);
> + if (ret)
> + DRM_ERROR("Media RC6 residency sysfs setup failed\n");
> + }
> #endif
> if (HAS_L3_DPF(dev)) {
> ret = device_create_bin_file(dev->primary->kdev, &dpf_attrs);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-01-20 3:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 11:50 [PATCH 0/7] drm/i915: CHV RC6/turbo fixes and improvements ville.syrjala
2015-01-19 11:50 ` [PATCH 1/7] drm/i915: Disable RC6 before configuring in on VLV/CHV ville.syrjala
2015-01-19 12:23 ` Chris Wilson
2015-01-20 3:17 ` Deepak S
2015-01-19 11:50 ` [PATCH 2/7] drm/i915: Change VLV GEN6_RP_DOWN_TIMEOUT value to decimal ville.syrjala
2015-01-19 12:23 ` Chris Wilson
2015-01-20 3:19 ` Deepak S
2015-01-19 11:50 ` [PATCH 3/7] drm/i915: Configure GEN6_RP_DOWN_TIMEOUT on CHV ville.syrjala
2015-01-20 3:15 ` Deepak S
2015-01-20 9:28 ` Ville Syrjälä
2015-01-19 11:50 ` [PATCH 4/7] Revert "Revert "drm/i915/chv: Use timeout mode for RC6 on chv"" ville.syrjala
2015-01-20 3:20 ` Deepak S
2015-01-19 11:50 ` [PATCH 5/7] drm/i915: Drop VLV checks from rc6p and rc6pp sysfs files ville.syrjala
2015-01-19 12:16 ` Chris Wilson
2015-01-20 3:21 ` Deepak S
2015-01-19 11:50 ` [PATCH 6/7] drm/i915: Rename 'reg' to 'clk_reg' to unconfuse it from the other 'reg' ville.syrjala
2015-01-19 12:17 ` Chris Wilson
2015-01-19 12:24 ` Chris Wilson
2015-01-20 3:22 ` Deepak S
2015-01-19 11:50 ` [PATCH 7/7] drm/i915: Add media rc6 residency file to sysfs ville.syrjala
2015-01-19 12:27 ` Chris Wilson
2015-01-19 19:16 ` shuang.he
2015-01-20 3:24 ` Deepak S [this message]
2015-01-20 8:50 ` Daniel Vetter
2015-01-20 9:30 ` Ville Syrjälä
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=54BDCA8A.1070604@linux.intel.com \
--to=deepak.s@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox