summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-10-23 06:57:50 +0200
committerTakashi Iwai <tiwai@suse.de>2015-10-23 06:57:50 +0200
commit274035751e25ee15a064e43cde7b4e7a9b75d921 (patch)
treebf5f3f18f14855043324ef02a116532d866e3dac /drivers/gpu/drm/drm_sysfs.c
parentALSA: Remove transfer_ack_{begin,end} callbacks from struct snd_pcm_runtime (diff)
parentASoC: cht_bsw_rt5672: Use snd_pcm_hw_constraint_single() (diff)
downloadlinux-274035751e25ee15a064e43cde7b4e7a9b75d921.tar.xz
linux-274035751e25ee15a064e43cde7b4e7a9b75d921.zip
Merge branch 'topic/hw-constraint-single' into for-next
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 0f6cd33b531f..684bd4a13843 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -235,18 +235,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,