compositor-drm: Relax plane restrictions for atomic
Since we now incrementally test atomic state as we build it, we can loosen restrictions on what we can do with planes, and let the kernel tell us whether or not it's OK. Signed-off-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
This commit is contained in:
parent
b41abf9c84
commit
9fe4bf8863
@ -1979,7 +1979,7 @@ drm_output_prepare_scanout_view(struct drm_output_state *output_state,
|
||||
return NULL;
|
||||
|
||||
/* Can't change formats with just a pageflip */
|
||||
if (fb->format->format != output->gbm_format) {
|
||||
if (!b->atomic_modeset && fb->format->format != output->gbm_format) {
|
||||
drm_fb_unref(fb);
|
||||
return NULL;
|
||||
}
|
||||
@ -1998,15 +1998,18 @@ drm_output_prepare_scanout_view(struct drm_output_state *output_state,
|
||||
if (!drm_plane_state_coords_for_view(state, ev))
|
||||
goto err;
|
||||
|
||||
/* The legacy API does not let us perform cropping or scaling. */
|
||||
if (state->src_x != 0 || state->src_y != 0 ||
|
||||
state->src_w != state->dest_w << 16 ||
|
||||
state->src_h != state->dest_h << 16 ||
|
||||
state->dest_x != 0 || state->dest_y != 0 ||
|
||||
if (state->dest_x != 0 || state->dest_y != 0 ||
|
||||
state->dest_w != (unsigned) output->base.current_mode->width ||
|
||||
state->dest_h != (unsigned) output->base.current_mode->height)
|
||||
goto err;
|
||||
|
||||
/* The legacy API does not let us perform cropping or scaling. */
|
||||
if (!b->atomic_modeset &&
|
||||
(state->src_x != 0 || state->src_y != 0 ||
|
||||
state->src_w != state->dest_w << 16 ||
|
||||
state->src_h != state->dest_h << 16))
|
||||
goto err;
|
||||
|
||||
/* In plane-only mode, we don't need to test the state now, as we
|
||||
* will only test it once at the end. */
|
||||
return state;
|
||||
@ -3109,8 +3112,9 @@ drm_output_prepare_overlay_view(struct drm_output_state *output_state,
|
||||
state = NULL;
|
||||
continue;
|
||||
}
|
||||
if (state->src_w != state->dest_w << 16 ||
|
||||
state->src_h != state->dest_h << 16) {
|
||||
if (!b->atomic_modeset &&
|
||||
(state->src_w != state->dest_w << 16 ||
|
||||
state->src_h != state->dest_h << 16)) {
|
||||
drm_plane_state_put_back(state);
|
||||
state = NULL;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user