Commit 5233860d authored by Maxime Ripard's avatar Maxime Ripard

drm/sun4i: tv: Convert to atomic hooks

The sun4i TV driver still uses legacy enable and disable hook
implementation. Let's convert to the atomic variants.
Acked-by: default avatarJernej Skrabec <jernej.skrabec@gmail.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220728-rpi-analog-tv-properties-v2-35-459522d653a7@cerno.tech
parent fcb9229b
...@@ -339,7 +339,8 @@ static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode, ...@@ -339,7 +339,8 @@ static void sun4i_tv_mode_to_drm_mode(const struct tv_mode *tv_mode,
mode->vtotal = mode->vsync_end + tv_mode->vback_porch; mode->vtotal = mode->vsync_end + tv_mode->vback_porch;
} }
static void sun4i_tv_disable(struct drm_encoder *encoder) static void sun4i_tv_disable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{ {
struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder); struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder);
struct sun4i_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc); struct sun4i_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc);
...@@ -353,7 +354,8 @@ static void sun4i_tv_disable(struct drm_encoder *encoder) ...@@ -353,7 +354,8 @@ static void sun4i_tv_disable(struct drm_encoder *encoder)
sunxi_engine_disable_color_correction(crtc->engine); sunxi_engine_disable_color_correction(crtc->engine);
} }
static void sun4i_tv_enable(struct drm_encoder *encoder) static void sun4i_tv_enable(struct drm_encoder *encoder,
struct drm_atomic_state *state)
{ {
struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder); struct sun4i_tv *tv = drm_encoder_to_sun4i_tv(encoder);
struct sun4i_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc); struct sun4i_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc);
...@@ -469,8 +471,8 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder, ...@@ -469,8 +471,8 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
} }
static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = { static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
.disable = sun4i_tv_disable, .atomic_disable = sun4i_tv_disable,
.enable = sun4i_tv_enable, .atomic_enable = sun4i_tv_enable,
.mode_set = sun4i_tv_mode_set, .mode_set = sun4i_tv_mode_set,
}; };
......
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