drm/sun4i: engine: Add a custom crtc atomic_check
We have some restrictions on what the planes and CRTC can provide that are tied to only one generation of display engines. For example, on the first generation, we can only have one YUV plane or one plane that uses the frontend output. Let's allow our engines to provide an atomic_check callback to validate the current configuration. Reviewed-by: Chen-Yu Tsai <wens@csie.org> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com> Link: https://patchwork.freedesktop.org/patch/msgid/e5f5f144e5c20d348cdb29933ae876c105bec017.1516613040.git-series.maxime.ripard@free-electrons.com
This commit is contained in:
@@ -22,6 +22,23 @@ struct sunxi_engine;
|
||||
* implement the proper behaviour.
|
||||
*/
|
||||
struct sunxi_engine_ops {
|
||||
/**
|
||||
* @atomic_check:
|
||||
*
|
||||
* This callback allows to validate plane-update related CRTC
|
||||
* constraints specific to engines. This is mirroring the
|
||||
* &drm_crtc_helper_funcs.atomic_check callback, so any
|
||||
* documentation there applies.
|
||||
*
|
||||
* This function is optional.
|
||||
*
|
||||
* RETURNS:
|
||||
*
|
||||
* 0 on success or a negative error code.
|
||||
*/
|
||||
int (*atomic_check)(struct sunxi_engine *engine,
|
||||
struct drm_crtc_state *state);
|
||||
|
||||
/**
|
||||
* @commit:
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user