[PATCH] drm: document and enforce rules around "spurious" EBUSY from atomic_commit
Daniel Stone
daniel at fooishbar.org
Tue Sep 22 19:22:28 UTC 2020
Hi,
On Tue, 22 Sep 2020 at 19:18, Daniel Vetter <daniel.vetter at ffwll.ch> wrote:
> + for_each_new_crtc_in_state(state, crtc, old_crtc_state, i)
> + affected_crtc |= drm_crtc_mask(crtc);
> +
> + /*
> + * For commits that allow modesets drivers can add other CRTCs to the
> + * atomic commit, e.g. when they need to reallocate global resources.
> + * This can cause spurious EBUSY, which robs compositors of a very
> + * effective sanity check for their drawing loop. Therefor only allow
> + * this for modeset commits.
> + *
> + * FIXME: Should add affected_crtc mask to the ATOMIC IOCTL as an output
> + * so compositors know what's going on.
> + */
> + if (affected_crtc != requested_crtc) {
> + /* adding other CRTC is only allowed for modeset commits */
> + WARN_ON(!state->allow_modeset);
> + }
> +
Can we please add a DRM_DEBUG() here, regardless of the WARN_ON(), to
let people know what's happening?
With that, R-b me.
Cheers,
Daniel
More information about the dri-devel
mailing list