drm: store connector name in connector struct (v2)

This makes drm_get_connector_name() thread safe.

[airlied: fix to build.]

Reference: http://lkml.kernel.org/r/645ee6e22cad47d38a2b35c21c8d5fe3@DC1-MBX-01.ptsecurity.ru
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Jani Nikula
2014-05-14 16:58:19 +03:00
committed by Dave Airlie
parent b838058083
commit 2abdd3137e
2 changed files with 22 additions and 16 deletions

View File

@@ -444,6 +444,7 @@ struct drm_encoder {
* @attr: sysfs attributes
* @head: list management
* @base: base KMS object
* @name: connector name
* @connector_type: one of the %DRM_MODE_CONNECTOR_<foo> types from drm_mode.h
* @connector_type_id: index into connector type enum
* @interlace_allowed: can this connector handle interlaced modes?
@@ -482,6 +483,7 @@ struct drm_connector {
struct drm_mode_object base;
char *name;
int connector_type;
int connector_type_id;
bool interlace_allowed;