diff options
| -rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 7 | ||||
| -rw-r--r-- | include/drm/drm_crtc_helper.h | 3 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index aac212297b49..8694ca9beee3 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c | |||
| @@ -196,7 +196,12 @@ update_connector_routing(struct drm_atomic_state *state, int conn_idx) | |||
| 196 | } | 196 | } |
| 197 | 197 | ||
| 198 | funcs = connector->helper_private; | 198 | funcs = connector->helper_private; |
| 199 | new_encoder = funcs->best_encoder(connector); | 199 | |
| 200 | if (funcs->atomic_best_encoder) | ||
| 201 | new_encoder = funcs->atomic_best_encoder(connector, | ||
| 202 | connector_state); | ||
| 203 | else | ||
| 204 | new_encoder = funcs->best_encoder(connector); | ||
| 200 | 205 | ||
| 201 | if (!new_encoder) { | 206 | if (!new_encoder) { |
| 202 | DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n", | 207 | DRM_DEBUG_ATOMIC("No suitable encoder found for [CONNECTOR:%d:%s]\n", |
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h index c8fc187061de..918aa68b5199 100644 --- a/include/drm/drm_crtc_helper.h +++ b/include/drm/drm_crtc_helper.h | |||
| @@ -168,6 +168,7 @@ struct drm_encoder_helper_funcs { | |||
| 168 | * @get_modes: get mode list for this connector | 168 | * @get_modes: get mode list for this connector |
| 169 | * @mode_valid: is this mode valid on the given connector? (optional) | 169 | * @mode_valid: is this mode valid on the given connector? (optional) |
| 170 | * @best_encoder: return the preferred encoder for this connector | 170 | * @best_encoder: return the preferred encoder for this connector |
| 171 | * @atomic_best_encoder: atomic version of @best_encoder | ||
| 171 | * | 172 | * |
| 172 | * The helper operations are called by the mid-layer CRTC helper. | 173 | * The helper operations are called by the mid-layer CRTC helper. |
| 173 | */ | 174 | */ |
| @@ -176,6 +177,8 @@ struct drm_connector_helper_funcs { | |||
| 176 | enum drm_mode_status (*mode_valid)(struct drm_connector *connector, | 177 | enum drm_mode_status (*mode_valid)(struct drm_connector *connector, |
| 177 | struct drm_display_mode *mode); | 178 | struct drm_display_mode *mode); |
| 178 | struct drm_encoder *(*best_encoder)(struct drm_connector *connector); | 179 | struct drm_encoder *(*best_encoder)(struct drm_connector *connector); |
| 180 | struct drm_encoder *(*atomic_best_encoder)(struct drm_connector *connector, | ||
| 181 | struct drm_connector_state *connector_state); | ||
| 179 | }; | 182 | }; |
| 180 | 183 | ||
| 181 | extern void drm_helper_disable_unused_functions(struct drm_device *dev); | 184 | extern void drm_helper_disable_unused_functions(struct drm_device *dev); |
