From: Dave Airlie <airlied@xxxxxxxxxx> If we add more options in the future this will need rework. this is modelled after the example in /sys/power/disk. Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx> --- drivers/gpu/drm/radeon/radeon_pm.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c index 2a44332..25bc75e 100644 --- a/drivers/gpu/drm/radeon/radeon_pm.c +++ b/drivers/gpu/drm/radeon/radeon_pm.c @@ -390,9 +390,13 @@ static ssize_t radeon_get_pm_method(struct device *dev, struct drm_device *ddev = pci_get_drvdata(to_pci_dev(dev)); struct radeon_device *rdev = ddev->dev_private; int pm = rdev->pm.pm_method; + char *start = buf; - return snprintf(buf, PAGE_SIZE, "%s\n", - (pm == PM_METHOD_DYNPM) ? "dynpm" : "profile"); + if (pm == PM_METHOD_DYNPM) + buf += snprintf(buf, PAGE_SIZE, "[dynpm] profile\n"); + else + buf += snprintf(buf, PAGE_SIZE, "dynpm [profile]\n"); + return buf - start; } static ssize_t radeon_set_pm_method(struct device *dev, -- 1.7.6 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel