2022-08-29 13:36:44

by Maxime Ripard

[permalink] [raw]
Subject: [PATCH v2 35/41] 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.



Signed-off-by: Maxime Ripard <[email protected]>



diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c

index 53152d77c392..f7aad995ab5b 100644

--- a/drivers/gpu/drm/sun4i/sun4i_tv.c

+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c

@@ -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;

}



-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_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc);

@@ -353,7 +354,8 @@ static void sun4i_tv_disable(struct drm_encoder *encoder)

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_crtc *crtc = drm_crtc_to_sun4i_crtc(encoder->crtc);

@@ -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 = {

- .disable = sun4i_tv_disable,

- .enable = sun4i_tv_enable,

+ .atomic_disable = sun4i_tv_disable,

+ .atomic_enable = sun4i_tv_enable,

.mode_set = sun4i_tv_mode_set,

};





--

b4 0.10.0-dev-65ba7


2022-09-06 20:28:40

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH v2 35/41] drm/sun4i: tv: Convert to atomic hooks

Dne ponedeljek, 29. avgust 2022 ob 15:11:49 CEST je Maxime Ripard napisal(a):
> The sun4i TV driver still uses legacy enable and disable hook
> implementation. Let's convert to the atomic variants.
>
> Signed-off-by: Maxime Ripard <[email protected]>

Acked-by: Jernej Skrabec <[email protected]>

BTW, I suggest you merge fixes/cleanups, no need to drag them in this super
long series.

Best regards,
Jernej


2022-09-07 08:50:38

by Maxime Ripard

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 35/41] drm/sun4i: tv: Convert to atomic hooks

On Mon, 29 Aug 2022 15:11:49 +0200, Maxime Ripard wrote:
> The sun4i TV driver still uses legacy enable and disable hook
> implementation. Let's convert to the atomic variants.
>
>

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime