Commit aa0b4a69 authored by Ondrej Jirman's avatar Ondrej Jirman Committed by Maxime Ripard

drm/sun4i: Add more parameters to sunxi_engine commit callback

These will be needed later on when we move layer configuration to
crtc update.
Signed-off-by: default avatarOndrej Jirman <megi@xff.cz>
Reviewed-by: default avatarMaxime Ripard <mripard@kernel.org>
Reviewed-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Link: https://lore.kernel.org/r/20240224150604.3855534-3-megi@xff.czSigned-off-by: default avatarMaxime Ripard <mripard@kernel.org>
parent 134155a5
...@@ -69,7 +69,9 @@ static void sun4i_backend_disable_color_correction(struct sunxi_engine *engine) ...@@ -69,7 +69,9 @@ static void sun4i_backend_disable_color_correction(struct sunxi_engine *engine)
SUN4I_BACKEND_OCCTL_ENABLE, 0); 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"); DRM_DEBUG_DRIVER("Committing changes\n");
......
...@@ -91,7 +91,7 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc, ...@@ -91,7 +91,7 @@ static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc,
DRM_DEBUG_DRIVER("Committing plane changes\n"); DRM_DEBUG_DRIVER("Committing plane changes\n");
sunxi_engine_commit(scrtc->engine); sunxi_engine_commit(scrtc->engine, crtc, state);
if (event) { if (event) {
crtc->state->event = NULL; crtc->state->event = NULL;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/reset.h> #include <linux/reset.h>
#include <drm/drm_atomic.h>
#include <drm/drm_atomic_helper.h> #include <drm/drm_atomic_helper.h>
#include <drm/drm_crtc.h> #include <drm/drm_crtc.h>
#include <drm/drm_framebuffer.h> #include <drm/drm_framebuffer.h>
...@@ -249,7 +250,9 @@ int sun8i_mixer_drm_format_to_hw(u32 format, u32 *hw_format) ...@@ -249,7 +250,9 @@ int sun8i_mixer_drm_format_to_hw(u32 format, u32 *hw_format)
return -EINVAL; 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"); DRM_DEBUG_DRIVER("Committing changes\n");
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#define _SUNXI_ENGINE_H_ #define _SUNXI_ENGINE_H_
struct drm_plane; struct drm_plane;
struct drm_crtc;
struct drm_device; struct drm_device;
struct drm_crtc_state; struct drm_crtc_state;
struct drm_display_mode; struct drm_display_mode;
...@@ -59,7 +60,9 @@ struct sunxi_engine_ops { ...@@ -59,7 +60,9 @@ struct sunxi_engine_ops {
* *
* This function is optional. * 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: * @layers_init:
...@@ -144,12 +147,16 @@ struct sunxi_engine { ...@@ -144,12 +147,16 @@ struct sunxi_engine {
/** /**
* sunxi_engine_commit() - commit all changes of the engine * sunxi_engine_commit() - commit all changes of the engine
* @engine: pointer to the engine * @engine: pointer to the engine
* @crtc: pointer to crtc the engine is associated with
* @state: atomic state
*/ */
static inline void 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) if (engine->ops && engine->ops->commit)
engine->ops->commit(engine); engine->ops->commit(engine, crtc, state);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment