[PATCH v20 05/10] compositor-drm: Add test-only mode to state application

Daniel Stone daniel at fooishbar.org
Wed Jul 11 11:52:52 UTC 2018


Hi,

On Wed, 11 Jul 2018 at 12:43, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Wed, 11 Jul 2018 11:41:29 +0100 Daniel Stone <daniels at collabora.com> wrote:
> > @@ -2610,9 +2612,18 @@ drm_pending_state_apply_atomic(struct drm_pending_state *pending_state,
> >       case DRM_STATE_APPLY_ASYNC:
> >               flags |= DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_ATOMIC_NONBLOCK;
> >               break;
> > +     case DRM_STATE_TEST_ONLY:
> > +             flags |= DRM_MODE_ATOMIC_TEST_ONLY;
> > +             break;
> >       }
> >
> >       ret = drmModeAtomicCommit(b->drm.fd, req, flags, b);
> > +
> > +     if (mode == DRM_STATE_TEST_ONLY) {
> > +             drmModeAtomicFree(req);
> > +             return ret;
>
> In this case this function did not take ownership of pending_state,
> right? That's different from all earlier behaviours. I'm thinking of
> comments, if anything more would need updating. The below is probably
> good already.

Right you are, but a comment definitely seems worthwhile. (And yes,
deleting the old comment was certainly a mistake ...)

Cheers,
Daniel


More information about the wayland-devel mailing list