summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-10-16 02:10:32 +0200
committerDave Airlie <airlied@redhat.com>2015-10-16 02:25:28 +0200
commit48f87dd146a480c723774962eca675873a8aa1da (patch)
tree71461989ebe8a20258ca4b0be341b755594a2b0b /drivers/gpu/drm/drm_sysfs.c
parentMerge tag 'topic/drm-misc-2015-10-08' of git://anongit.freedesktop.org/drm-in... (diff)
parentMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux (diff)
downloadlinux-48f87dd146a480c723774962eca675873a8aa1da.tar.xz
linux-48f87dd146a480c723774962eca675873a8aa1da.zip
Merge commit '06d1ee32a4d25356a710b49d5e95dbdd68bdf505' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge the drm-fixes pull from Linus's tree into drm-next. This is to fix some conflicts and make future pulls cleaner
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r--drivers/gpu/drm/drm_sysfs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index f08873f6489c..615b7e667320 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -230,18 +230,12 @@ static ssize_t dpms_show(struct device *device,
char *buf)
{
struct drm_connector *connector = to_drm_connector(device);
- struct drm_device *dev = connector->dev;
- uint64_t dpms_status;
- int ret;
+ int dpms;
- ret = drm_object_property_get_value(&connector->base,
- dev->mode_config.dpms_property,
- &dpms_status);
- if (ret)
- return 0;
+ dpms = READ_ONCE(connector->dpms);
return snprintf(buf, PAGE_SIZE, "%s\n",
- drm_get_dpms_name((int)dpms_status));
+ drm_get_dpms_name(dpms));
}
static ssize_t enabled_show(struct device *device,