[PATCH v2 09/10] drm/imx: atomic phase 3 step 4: Use generic atomic page flip

Daniel Vetter daniel.vetter at ffwll.ch
Sat Jun 11 20:29:10 UTC 2016


On Tue, May 31, 2016 at 11:24 AM, Liu Ying <gnuiyl at gmail.com> wrote:
> To support generic atomic page flip, this patch customizes ->atomic_commit
> for nonblock commits.
>
> Signed-off-by: Liu Ying <gnuiyl at gmail.com>
> ---
> v1->v2:
> * s/async/nonblock/ on this patch to address Daniel Vetter's comment.
> * Wait for pending commit on each CRTC for both block and nonblock
>   atomic mode settings.  This way, a block commit will not overwrite
>   the hardware setting when a nonblock page flip is about to finish,
>   so that the page flip may wait for vblank successfully.

Generic nonblocking commit just landed in drm-misc, which means you
can remove all your special imx commit functions and work items here.
Please do, less boilerplate in driver code is good ;-) Note that if
you don't handle crtc_state->event correctly and in all cases this
will results in some issues and errors in dmesg. But should be easy to
fix up your driver to be compliant.

Also another thing to double check after the conversion is done is
that you don't have any uncessary boilerplate code left:
- ipu_crtc->enabled checks in enable/disable can be remove, atomic
helpers already ensure that you don't get enabled/disabled twice
- all the legacy hooks like dpms, off, prepare and commit should
removed, instead use enable/disable (both crtc and encoder)
- best_encoder can be removed (except when you dynamically select
encoders, but then you need to switch to atomic_best_encoder and can
still remove best_encoder)
- mode_fixup can be removed if empty
- all other hooks which are empty can be removed too (but I didn't spot any)

Cheers, Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list