]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/sun4i: Add more parameters to sunxi_engine commit callback
authorOndrej Jirman <megi@xff.cz>
Sat, 24 Feb 2024 15:05:59 +0000 (16:05 +0100)
committerMaxime Ripard <mripard@kernel.org>
Mon, 10 Jun 2024 10:44:40 +0000 (12:44 +0200)
These will be needed later on when we move layer configuration to
crtc update.

Signed-off-by: Ondrej Jirman <megi@xff.cz>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240224150604.3855534-3-megi@xff.cz
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/sun4i/sun4i_backend.c
drivers/gpu/drm/sun4i/sun4i_crtc.c
drivers/gpu/drm/sun4i/sun8i_mixer.c
drivers/gpu/drm/sun4i/sunxi_engine.h

index 335fd0edb904cfc536a1871ade229109c15ebbf9..e89eb96d31317738dc007b0b9e4e5d99c78f5e67 100644 (file)
@@ -69,7 +69,9 @@ static void sun4i_backend_disable_color_correction(struct sunxi_engine *engine)
                           SUN4I_BACKEND_OCCTL_ENABLE, 0);
 }
 
-static void sun4i_backend_commit(struct sunxi_engine *engine)
+static void sun4i_backend_commit(struct sunxi_engine *engine,
+                                struct drm_crtc *crtc,
+                                struct drm_atomic_state *state)
 {
        DRM_DEBUG_DRIVER("Committing changes\n");
 
index c06d7cd45388974cf94f1f8d6836c632aad20617..18e74047b0f566312310bac67320e1928df4cbeb 100644 (file)
@@ -91,7 +91,7 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc,
 
        DRM_DEBUG_DRIVER("Committing plane changes\n");
 
-       sunxi_engine_commit(scrtc->engine);
+       sunxi_engine_commit(scrtc->engine, crtc, state);
 
        if (event) {
                crtc->state->event = NULL;
index 1e681314e379bc22e995d5d040e197c7d996429f..bdeb9b80e038840beb16f619b7448a602f763cae 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/platform_device.h>
 #include <linux/reset.h>
 
+#include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc.h>
 #include <drm/drm_framebuffer.h>
@@ -249,7 +250,9 @@ int sun8i_mixer_drm_format_to_hw(u32 format, u32 *hw_format)
        return -EINVAL;
 }
 
-static void sun8i_mixer_commit(struct sunxi_engine *engine)
+static void sun8i_mixer_commit(struct sunxi_engine *engine,
+                              struct drm_crtc *crtc,
+                              struct drm_atomic_state *state)
 {
        DRM_DEBUG_DRIVER("Committing changes\n");
 
index ec8cf9b2bda41cbcdc23caefd2285d5fc9507334..ec0c4932f15cf30b60695e9806ffd30ddfcf2d62 100644 (file)
@@ -7,6 +7,7 @@
 #define _SUNXI_ENGINE_H_
 
 struct drm_plane;
+struct drm_crtc;
 struct drm_device;
 struct drm_crtc_state;
 struct drm_display_mode;
@@ -59,7 +60,9 @@ struct sunxi_engine_ops {
         *
         * This function is optional.
         */
-       void (*commit)(struct sunxi_engine *engine);
+       void (*commit)(struct sunxi_engine *engine,
+                      struct drm_crtc *crtc,
+                      struct drm_atomic_state *state);
 
        /**
         * @layers_init:
@@ -144,12 +147,16 @@ struct sunxi_engine {
 /**
  * sunxi_engine_commit() - commit all changes of the engine
  * @engine:    pointer to the engine
+ * @crtc:      pointer to crtc the engine is associated with
+ * @state:     atomic state
  */
 static inline void
-sunxi_engine_commit(struct sunxi_engine *engine)
+sunxi_engine_commit(struct sunxi_engine *engine,
+                   struct drm_crtc *crtc,
+                   struct drm_atomic_state *state)
 {
        if (engine->ops && engine->ops->commit)
-               engine->ops->commit(engine);
+               engine->ops->commit(engine, crtc, state);
 }
 
 /**