summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/sun4i/sunxi_engine.h
diff options
context:
space:
mode:
authorMaxime Ripard <maxime.ripard@free-electrons.com>2018-01-22 12:25:19 +0300
committerMaxime Ripard <maxime.ripard@free-electrons.com>2018-01-22 17:15:03 +0300
commit656e5f6549031d31a7c42f9abbbf7c22dfa9348c (patch)
treeb3478b281e9a3b4ea1cf51231c60dd457082b4b4 /drivers/gpu/drm/sun4i/sunxi_engine.h
parentd540f82adf3577fd4116b0dc8fef5102def26d2e (diff)
downloadlinux-656e5f6549031d31a7c42f9abbbf7c22dfa9348c.tar.xz
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
Diffstat (limited to 'drivers/gpu/drm/sun4i/sunxi_engine.h')
-rw-r--r--drivers/gpu/drm/sun4i/sunxi_engine.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
index b374e074c7c3..b819d4f9f02f 100644
--- a/drivers/gpu/drm/sun4i/sunxi_engine.h
+++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
@@ -23,6 +23,23 @@ struct sunxi_engine;
*/
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:
*
* This callback will trigger the hardware switch to commit