* [PATCH V2 0/3] RPM Graphics Features
[not found] <RPM Graphics Features>
@ 2016-04-14 22:27 ` Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 1/3] PSR status on sysfs interface Alexandra Yates
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alexandra Yates @ 2016-04-14 22:27 UTC (permalink / raw)
To: intel-gfx, rodrigo.vivi, joe.konno, nivedita.swaminathan
Summary:
Permits the user to identify during runtime the values set for PSR, FBC,
and DRRS. The values are displayed under /sys/class/drm/card0/power/
By enabling these features I'm looking to empower our customers, such as,
power team, chrome OS, and platform integration teams
to debug graphics power management features.
From V1 to V2 we removed the ability to toggle the features from sysfs.
Alexandra Yates (3):
PSR status on sysfs interface
FBC status on sysfs interface
DRRS status on sysfs interface
drivers/gpu/drm/i915/i915_sysfs.c | 99 +++++++++++++++++++++++++++++++++++++++
1 file changed, 99 insertions(+)
--
2.5.0
_______________________________________________
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
* [PATCH V2 1/3] PSR status on sysfs interface
2016-04-14 22:27 ` [PATCH V2 0/3] RPM Graphics Features Alexandra Yates
@ 2016-04-14 22:27 ` Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 2/3] FBC " Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 3/3] DRRS " Alexandra Yates
2 siblings, 0 replies; 4+ messages in thread
From: Alexandra Yates @ 2016-04-14 22:27 UTC (permalink / raw)
To: intel-gfx, rodrigo.vivi, joe.konno, nivedita.swaminathan
This interface allows viewing the status of the PSR.
Exposing this feature on sysfs interface would allow tools such as
powertop to provide status of the Graphics subsystem and aid
debugging RPM.
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
---
drivers/gpu/drm/i915/i915_sysfs.c | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index 2d576b7..36f4aff 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -106,11 +106,28 @@ show_media_rc6_ms(struct device *kdev, struct device_attribute *attr, char *buf)
return snprintf(buf, PAGE_SIZE, "%u\n", rc6_residency);
}
+static ssize_t
+show_psr(struct device *kdev, struct device_attribute *attr, char *buf)
+{
+ struct drm_minor *dminor = dev_to_drm_minor(kdev);
+ struct drm_device *dev = dminor->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ ssize_t ret;
+
+ mutex_lock(&dev_priv->psr.lock);
+ ret = snprintf(buf, PAGE_SIZE, "%s\n", dev_priv->psr.enabled ?
+ "enabled":"disabled");
+ mutex_unlock(&dev_priv->psr.lock);
+ return ret;
+}
+
+
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 DEVICE_ATTR(psr_enable, S_IRUGO, show_psr, NULL);
static struct attribute *rc6_attrs[] = {
&dev_attr_rc6_enable.attr,
@@ -143,6 +160,17 @@ static struct attribute_group media_rc6_attr_group = {
.name = power_group_name,
.attrs = media_rc6_attrs
};
+
+static struct attribute *psr_attrs[] = {
+ &dev_attr_psr_enable.attr,
+ NULL
+};
+
+static struct attribute_group psr_attr_group = {
+ .name = power_group_name,
+ .attrs = psr_attrs
+};
+
#endif
static int l3_access_valid(struct drm_device *dev, loff_t offset)
@@ -614,6 +642,12 @@ void i915_setup_sysfs(struct drm_device *dev)
if (ret)
DRM_ERROR("Media RC6 residency sysfs setup failed\n");
}
+ if (HAS_PSR(dev)) {
+ ret = sysfs_merge_group(&dev->primary->kdev->kobj,
+ &psr_attr_group);
+ if (ret)
+ DRM_ERROR("PSR sysfs setup failed\n");
+ }
#endif
if (HAS_L3_DPF(dev)) {
ret = device_create_bin_file(dev->primary->kdev, &dpf_attrs);
@@ -654,5 +688,6 @@ void i915_teardown_sysfs(struct drm_device *dev)
#ifdef CONFIG_PM
sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6_attr_group);
sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6p_attr_group);
+ sysfs_unmerge_group(&dev->primary->kdev->kobj, &psr_attr_group);
#endif
}
--
2.5.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
* [PATCH V2 2/3] FBC status on sysfs interface
2016-04-14 22:27 ` [PATCH V2 0/3] RPM Graphics Features Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 1/3] PSR status on sysfs interface Alexandra Yates
@ 2016-04-14 22:27 ` Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 3/3] DRRS " Alexandra Yates
2 siblings, 0 replies; 4+ messages in thread
From: Alexandra Yates @ 2016-04-14 22:27 UTC (permalink / raw)
To: intel-gfx, rodrigo.vivi, joe.konno, nivedita.swaminathan
This interface allows viewing the status of the FBC.
Exposing this feature on sysfs interface would allow tools such as
powertop to provide status of the Graphics subsystem and aid
debugging RPM
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
---
drivers/gpu/drm/i915/i915_sysfs.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index 36f4aff..a25bdd7 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -121,6 +121,20 @@ show_psr(struct device *kdev, struct device_attribute *attr, char *buf)
return ret;
}
+static ssize_t
+show_fbc(struct device *kdev, struct device_attribute *attr, char *buf)
+{
+ struct drm_minor *dminor = dev_to_drm_minor(kdev);
+ struct drm_device *dev = dminor->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ ssize_t ret;
+
+ mutex_lock(&dev_priv->fbc.lock);
+ ret = snprintf(buf, PAGE_SIZE, "%s\n", dev_priv->fbc.enabled ?
+ "enabled":"disabled");
+ mutex_unlock(&dev_priv->fbc.lock);
+ return ret;
+}
static DEVICE_ATTR(rc6_enable, S_IRUGO, show_rc6_mask, NULL);
static DEVICE_ATTR(rc6_residency_ms, S_IRUGO, show_rc6_ms, NULL);
@@ -128,6 +142,7 @@ 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 DEVICE_ATTR(psr_enable, S_IRUGO, show_psr, NULL);
+static DEVICE_ATTR(fbc_enable, S_IRUGO, show_fbc, NULL);
static struct attribute *rc6_attrs[] = {
&dev_attr_rc6_enable.attr,
@@ -171,6 +186,16 @@ static struct attribute_group psr_attr_group = {
.attrs = psr_attrs
};
+static struct attribute *fbc_attrs[] = {
+ &dev_attr_fbc_enable.attr,
+ NULL
+};
+
+static struct attribute_group fbc_attr_group = {
+ .name = power_group_name,
+ .attrs = fbc_attrs
+};
+
#endif
static int l3_access_valid(struct drm_device *dev, loff_t offset)
@@ -648,6 +673,12 @@ void i915_setup_sysfs(struct drm_device *dev)
if (ret)
DRM_ERROR("PSR sysfs setup failed\n");
}
+ if (HAS_FBC(dev)) {
+ ret = sysfs_merge_group(&dev->primary->kdev->kobj,
+ &fbc_attr_group);
+ if (ret)
+ DRM_ERROR("FBC sysfs setup failed\n");
+ }
#endif
if (HAS_L3_DPF(dev)) {
ret = device_create_bin_file(dev->primary->kdev, &dpf_attrs);
@@ -689,5 +720,6 @@ void i915_teardown_sysfs(struct drm_device *dev)
sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6_attr_group);
sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6p_attr_group);
sysfs_unmerge_group(&dev->primary->kdev->kobj, &psr_attr_group);
+ sysfs_unmerge_group(&dev->primary->kdev->kobj, &fbc_attr_group);
#endif
}
--
2.5.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
* [PATCH V2 3/3] DRRS status on sysfs interface
2016-04-14 22:27 ` [PATCH V2 0/3] RPM Graphics Features Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 1/3] PSR status on sysfs interface Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 2/3] FBC " Alexandra Yates
@ 2016-04-14 22:27 ` Alexandra Yates
2 siblings, 0 replies; 4+ messages in thread
From: Alexandra Yates @ 2016-04-14 22:27 UTC (permalink / raw)
To: intel-gfx, rodrigo.vivi, joe.konno, nivedita.swaminathan
This interface allows viewing the status of the DRRS.
Exposing this feature on sysfs interface would allow tools such as
powertop to provide status of the Graphics subsystem and aid
debugging RPM
Signed-off-by: Alexandra Yates <alexandra.yates@linux.intel.com>
---
drivers/gpu/drm/i915/i915_sysfs.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_sysfs.c b/drivers/gpu/drm/i915/i915_sysfs.c
index a25bdd7..1625a5d 100644
--- a/drivers/gpu/drm/i915/i915_sysfs.c
+++ b/drivers/gpu/drm/i915/i915_sysfs.c
@@ -136,6 +136,21 @@ show_fbc(struct device *kdev, struct device_attribute *attr, char *buf)
return ret;
}
+static ssize_t
+show_drrs(struct device *kdev, struct device_attribute *attr, char *buf)
+{
+ struct drm_minor *dminor = dev_to_drm_minor(kdev);
+ struct drm_device *dev = dminor->dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+ ssize_t ret;
+
+ mutex_lock(&dev_priv->drrs.mutex);
+ ret = snprintf(buf, PAGE_SIZE, "%s\n", dev_priv->drrs.dp ?
+ "enabled":"disabled");
+ mutex_unlock(&dev_priv->drrs.mutex);
+ return ret;
+}
+
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);
@@ -143,6 +158,7 @@ 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 DEVICE_ATTR(psr_enable, S_IRUGO, show_psr, NULL);
static DEVICE_ATTR(fbc_enable, S_IRUGO, show_fbc, NULL);
+static DEVICE_ATTR(drrs_enable, S_IRUGO, show_drrs, NULL);
static struct attribute *rc6_attrs[] = {
&dev_attr_rc6_enable.attr,
@@ -196,6 +212,15 @@ static struct attribute_group fbc_attr_group = {
.attrs = fbc_attrs
};
+static struct attribute *drrs_attrs[] = {
+ &dev_attr_drrs_enable.attr,
+ NULL
+};
+
+static struct attribute_group drrs_attr_group = {
+ .name = power_group_name,
+ .attrs = drrs_attrs
+};
#endif
static int l3_access_valid(struct drm_device *dev, loff_t offset)
@@ -679,6 +704,12 @@ void i915_setup_sysfs(struct drm_device *dev)
if (ret)
DRM_ERROR("FBC sysfs setup failed\n");
}
+ if (HAS_PSR(dev)) {
+ ret = sysfs_merge_group(&dev->primary->kdev->kobj,
+ &drrs_attr_group);
+ if (ret)
+ DRM_ERROR("DRRS sysfs setup failed\n");
+ }
#endif
if (HAS_L3_DPF(dev)) {
ret = device_create_bin_file(dev->primary->kdev, &dpf_attrs);
@@ -721,5 +752,6 @@ void i915_teardown_sysfs(struct drm_device *dev)
sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6p_attr_group);
sysfs_unmerge_group(&dev->primary->kdev->kobj, &psr_attr_group);
sysfs_unmerge_group(&dev->primary->kdev->kobj, &fbc_attr_group);
+ sysfs_unmerge_group(&dev->primary->kdev->kobj, &drrs_attr_group);
#endif
}
--
2.5.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
end of thread, other threads:[~2016-04-14 22:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <RPM Graphics Features>
2016-04-14 22:27 ` [PATCH V2 0/3] RPM Graphics Features Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 1/3] PSR status on sysfs interface Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 2/3] FBC " Alexandra Yates
2016-04-14 22:27 ` [PATCH V2 3/3] DRRS " Alexandra Yates
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox