Skip to content
Snippets Groups Projects
  • Lyude Paul's avatar
    fd862ed0
    drm/connector: Add _DRM_MODE_CONNECTOR_COUNT · fd862ed0
    Lyude Paul authored
    
    In order to add rust bindings for the various DRM_MODE_CONNECTOR_* type
    IDs, we need a way to know the range of defined connector types - since
    each type corresponds to an actual array entry in drm_connector_enum_list.
    
    So, let's make this easy to figure out by adding a new
    _DRM_MODE_CONNECTOR_COUNT macro that always matches the number of available
    connector type IDs. Also, use that macro to define the size of
    drm_connector_enum_list to ensure that builds fail if someone attempts to
    add a new entry to drm_connector_enum_list without updating this macro.
    
    Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>
    fd862ed0
    History
    drm/connector: Add _DRM_MODE_CONNECTOR_COUNT
    Lyude Paul authored
    
    In order to add rust bindings for the various DRM_MODE_CONNECTOR_* type
    IDs, we need a way to know the range of defined connector types - since
    each type corresponds to an actual array entry in drm_connector_enum_list.
    
    So, let's make this easy to figure out by adding a new
    _DRM_MODE_CONNECTOR_COUNT macro that always matches the number of available
    connector type IDs. Also, use that macro to define the size of
    drm_connector_enum_list to ensure that builds fail if someone attempts to
    add a new entry to drm_connector_enum_list without updating this macro.
    
    Signed-off-by: Lyude Paul's avatarLyude Paul <lyude@redhat.com>