diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-07-19 18:25:01 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-07-19 21:51:17 +0200 |
commit | 6942559980c036b240c60b135a4bf23bf3252b48 (patch) | |
tree | 2a9254fcfa56b27771a1431c2c3c61102506a7d8 /include/drm | |
parent | a9853117d8413209ec70245f762e4503511deb2d (diff) | |
download | op-kernel-dev-6942559980c036b240c60b135a4bf23bf3252b48.zip op-kernel-dev-6942559980c036b240c60b135a4bf23bf3252b48.tar.gz |
drm: drm_connector->s/connector_id/index/ for consistency
connector_id in the uapi actually means drm_connector->base.id, which
is something entirely different. And ->index is also consistent with
plane/encoder/CRTCS and the various drm_*_index() functions.
While at it also improve/align the kerneldoc comment.
v2: Mention where those ids are from ...
v3: Add -ing to supporting and try to not break the world.
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1468945501-23166-1-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_crtc.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index f8ba5aa..3edeaf8 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -1246,7 +1246,6 @@ struct drm_encoder { * @head: list management * @base: base KMS object * @name: human readable name, can be overwritten by the driver - * @connector_id: compacted connector id useful indexing arrays * @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? @@ -1303,7 +1302,15 @@ struct drm_connector { struct drm_mode_object base; char *name; - int connector_id; + + /** + * @index: Compacted connector index, which matches the position inside + * the mode_config.list for drivers not supporting hot-add/removing. Can + * be used as an array index. It is invariant over the lifetime of the + * connector. + */ + unsigned index; + int connector_type; int connector_type_id; bool interlace_allowed; @@ -2764,7 +2771,7 @@ void drm_connector_unregister(struct drm_connector *connector); extern void drm_connector_cleanup(struct drm_connector *connector); static inline unsigned drm_connector_index(struct drm_connector *connector) { - return connector->connector_id; + return connector->index; } extern __printf(5, 6) |