drm: rcar-du: Switch to encoder .atomic_mode_set() helper function
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 18 Nov 2016 13:37:37 +0000 (15:37 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 4 Apr 2017 14:03:41 +0000 (17:03 +0300)
The native encoder mode set helper function for atomic drivers is
.atomic_mode_set(). Replace the legacy .mode_set() implementation.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_encoder.c
drivers/gpu/drm/rcar-du/rcar_du_hdmienc.c

index ab8645c57e2d5f94a0a36b41910ef1db6861d638..3974d9495f372fa6cb74ada5ee871e8a8a77308a 100644 (file)
@@ -83,16 +83,16 @@ static int rcar_du_encoder_atomic_check(struct drm_encoder *encoder,
 }
 
 static void rcar_du_encoder_mode_set(struct drm_encoder *encoder,
-                                    struct drm_display_mode *mode,
-                                    struct drm_display_mode *adjusted_mode)
+                                    struct drm_crtc_state *crtc_state,
+                                    struct drm_connector_state *conn_state)
 {
        struct rcar_du_encoder *renc = to_rcar_encoder(encoder);
 
-       rcar_du_crtc_route_output(encoder->crtc, renc->output);
+       rcar_du_crtc_route_output(crtc_state->crtc, renc->output);
 }
 
 static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
-       .mode_set = rcar_du_encoder_mode_set,
+       .atomic_mode_set = rcar_du_encoder_mode_set,
        .disable = rcar_du_encoder_disable,
        .enable = rcar_du_encoder_enable,
        .atomic_check = rcar_du_encoder_atomic_check,
index c4c5d1abcff81e682df0bcd559f64343954599f7..933a2547798ea12b6a7b00c29275c86a94d3c29a 100644 (file)
@@ -67,16 +67,16 @@ static int rcar_du_hdmienc_atomic_check(struct drm_encoder *encoder,
 
 
 static void rcar_du_hdmienc_mode_set(struct drm_encoder *encoder,
-                                    struct drm_display_mode *mode,
-                                    struct drm_display_mode *adjusted_mode)
+                                    struct drm_crtc_state *crtc_state,
+                                    struct drm_connector_state *conn_state)
 {
        struct rcar_du_hdmienc *hdmienc = to_rcar_hdmienc(encoder);
 
-       rcar_du_crtc_route_output(encoder->crtc, hdmienc->renc->output);
+       rcar_du_crtc_route_output(crtc_state->crtc, hdmienc->renc->output);
 }
 
 static const struct drm_encoder_helper_funcs encoder_helper_funcs = {
-       .mode_set = rcar_du_hdmienc_mode_set,
+       .atomic_mode_set = rcar_du_hdmienc_mode_set,
        .disable = rcar_du_hdmienc_disable,
        .enable = rcar_du_hdmienc_enable,
        .atomic_check = rcar_du_hdmienc_atomic_check,