search for: possible_encoders

Displaying 6 results from an estimated 6 matches for "possible_encoders".

2019 Sep 13
1
[PATCH CI 2/2] drm/connector: Allow max possible encoders to attach to a connector
...ctor *connector, if (WARN_ON(connector->encoder)) return -EINVAL; - for (i = 0; i < ARRAY_SIZE(connector->encoder_ids); i++) { - if (connector->encoder_ids[i] == 0) { - connector->encoder_ids[i] = encoder->base.id; - return 0; - } - } - return -ENOMEM; + connector->possible_encoders |= drm_encoder_mask(encoder); + + return 0; } EXPORT_SYMBOL(drm_connector_attach_encoder); /** - * drm_connector_has_possible_encoder - check if the connector and encoder are assosicated with each other + * drm_connector_has_possible_encoder - check if the connector and encoder are + * associa...
2019 Sep 05
3
[PATCH v2] drm/connector: Allow max possible encoders to attach to a connector
...e *state, static struct drm_encoder * pick_single_encoder_for_connector(struct drm_connector *connector) { - WARN_ON(connector->encoder_ids[1]); - return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]); + struct drm_encoder *encoder; + + WARN_ON(hweight32(connector->possible_encoders) > 1); + drm_connector_for_each_possible_encoder(connector, encoder) + return encoder; + + return NULL; } static int handle_conflicting_encoders(struct drm_atomic_state *state, diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c index c8922b7cac09..895b7...
2019 Sep 11
0
[PATCH 2/2] drm/connector: Allow max possible encoders to attach to a connector
...ctor *connector, if (WARN_ON(connector->encoder)) return -EINVAL; - for (i = 0; i < ARRAY_SIZE(connector->encoder_ids); i++) { - if (connector->encoder_ids[i] == 0) { - connector->encoder_ids[i] = encoder->base.id; - return 0; - } - } - return -ENOMEM; + connector->possible_encoders |= drm_encoder_mask(encoder); + + return 0; } EXPORT_SYMBOL(drm_connector_attach_encoder); /** - * drm_connector_has_possible_encoder - check if the connector and encoder are assosicated with each other + * drm_connector_has_possible_encoder - check if the connector and encoder are + * associa...
2019 Sep 12
0
[PATCH 2/2] drm/connector: Allow max possible encoders to attach to a connector
...ctor *connector, if (WARN_ON(connector->encoder)) return -EINVAL; - for (i = 0; i < ARRAY_SIZE(connector->encoder_ids); i++) { - if (connector->encoder_ids[i] == 0) { - connector->encoder_ids[i] = encoder->base.id; - return 0; - } - } - return -ENOMEM; + connector->possible_encoders |= drm_encoder_mask(encoder); + + return 0; } EXPORT_SYMBOL(drm_connector_attach_encoder); /** - * drm_connector_has_possible_encoder - check if the connector and encoder are assosicated with each other + * drm_connector_has_possible_encoder - check if the connector and encoder are + * associa...
2019 Aug 16
0
[PATCH] drm/connector: Allow max possible encoders to attach to a connector
...e *state, static struct drm_encoder * pick_single_encoder_for_connector(struct drm_connector *connector) { - WARN_ON(connector->encoder_ids[1]); - return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]); + struct drm_encoder *encoder; + + WARN_ON(hweight32(connector->possible_encoders) > 1); + drm_connector_for_each_possible_encoder(connector, encoder) + return encoder; + + return NULL; } static int handle_conflicting_encoders(struct drm_atomic_state *state, diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_client_modeset.c index c8922b7cac09..895b7...
2019 Sep 06
0
[PATCH v2] drm/connector: Allow max possible encoders to attach to a connector
...r * > pick_single_encoder_for_connector(struct drm_connector *connector) > { > - WARN_ON(connector->encoder_ids[1]); > - return drm_encoder_find(connector->dev, NULL, connector->encoder_ids[0]); > + struct drm_encoder *encoder; > + > + WARN_ON(hweight32(connector->possible_encoders) > 1); > + drm_connector_for_each_possible_encoder(connector, encoder) > + return encoder; > + > + return NULL; > } > > static int handle_conflicting_encoders(struct drm_atomic_state *state, > diff --git a/drivers/gpu/drm/drm_client_modeset.c b/drivers/gpu/drm/drm_cl...