diff options
author | Jani Nikula <jani.nikula@intel.com> | 2017-02-20 10:51:48 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2017-02-28 12:17:08 +0200 |
commit | 6140cf20341975400fb2ee7a72fa6316c1bc74f0 (patch) | |
tree | 3df04162c810fd2bac0e86ffd09497b52fd4ec92 /drivers/gpu/drm/drm_debugfs.c | |
parent | 0eb9acda36ac41e43afd152a96c2e769200bc264 (diff) | |
download | linux-6140cf20341975400fb2ee7a72fa6316c1bc74f0.tar.gz linux-6140cf20341975400fb2ee7a72fa6316c1bc74f0.tar.bz2 linux-6140cf20341975400fb2ee7a72fa6316c1bc74f0.zip |
drm: add drm_get_connector_force_name
Follow the naming in debugfs also for logging, add "unknown" for values
beyond the enumerated ones.
v2: add \n in connector_show, make internal to drm (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1487580708-29340-1-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/drm_debugfs.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c index 2290a74a6e46..8b2c61ae0004 100644 --- a/drivers/gpu/drm/drm_debugfs.c +++ b/drivers/gpu/drm/drm_debugfs.c @@ -261,30 +261,8 @@ int drm_debugfs_cleanup(struct drm_minor *minor) static int connector_show(struct seq_file *m, void *data) { struct drm_connector *connector = m->private; - const char *status; - switch (connector->force) { - case DRM_FORCE_ON: - status = "on\n"; - break; - - case DRM_FORCE_ON_DIGITAL: - status = "digital\n"; - break; - - case DRM_FORCE_OFF: - status = "off\n"; - break; - - case DRM_FORCE_UNSPECIFIED: - status = "unspecified\n"; - break; - - default: - return 0; - } - - seq_puts(m, status); + seq_printf(m, "%s\n", drm_get_connector_force_name(connector->force)); return 0; } |