[PATCH 22/28] drm/atomic-helper: Reject attempts at re-stealing encoders
Thierry Reding
thierry.reding at gmail.com
Mon Dec 7 05:26:04 PST 2015
On Fri, Dec 04, 2015 at 09:46:03AM +0100, Daniel Vetter wrote:
> This can happen when we run out of encoders for a multi-crtc modeset,
> or also when userspace is silly and tries to clone multiple connectors
> that need the same encoder on the same crtc.
>
> Reported-and-Tested-and-Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 28 ++++++++++++++++++++++++++++
> 1 file changed, 28 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 2cf8ab7dbc8c..ab275499d2a3 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -86,6 +86,27 @@ drm_atomic_helper_plane_changed(struct drm_atomic_state *state,
> }
> }
>
> +static bool
> +check_pending_encoder_assignment(struct drm_atomic_state *state,
> + struct drm_encoder *new_encoder,
> + struct drm_connector *new_connector)
new_connector seems to be unused.
> +{
> + struct drm_connector *connector;
> + struct drm_connector_state *conn_state;
> + int i;
> +
> + for_each_connector_in_state(state, connector, conn_state, i) {
> + if (conn_state->best_encoder != new_encoder)
> + continue;
> +
> + /* encoder already assigned and we're trying to re-steal it! */
> + if (connector->state->best_encoder != conn_state->best_encoder)
Was this supposed to be new_connector->state->best_encoder?
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20151207/aec91ff4/attachment.sig>
More information about the dri-devel
mailing list