drm/vc4: crtc: Move the txp_armed function to the TXP
authorMaxime Ripard <maxime@cerno.tech>
Thu, 11 Jun 2020 13:36:52 +0000 (15:36 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 7 Jul 2020 08:51:21 +0000 (10:51 +0200)
The TXP driver is the only place where we need to set the txp_armed flag,
so let's move the function in the TXP driver.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/12b383e7b8462e281b00c0a21b2b50f13691bead.1591882579.git-series.maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_txp.c

index c0f86f3..6211e8a 100644 (file)
@@ -390,13 +390,6 @@ static void vc4_crtc_atomic_disable(struct drm_crtc *crtc,
        }
 }
 
-void vc4_crtc_txp_armed(struct drm_crtc_state *state)
-{
-       struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state);
-
-       vc4_state->txp_armed = true;
-}
-
 static void vc4_crtc_atomic_enable(struct drm_crtc *crtc,
                                   struct drm_crtc_state *old_state)
 {
index 1c49c27..fa19160 100644 (file)
@@ -808,7 +808,6 @@ void vc4_crtc_destroy_state(struct drm_crtc *crtc,
                            struct drm_crtc_state *state);
 void vc4_crtc_reset(struct drm_crtc *crtc);
 void vc4_crtc_handle_vblank(struct vc4_crtc *crtc);
-void vc4_crtc_txp_armed(struct drm_crtc_state *state);
 void vc4_crtc_get_margins(struct drm_crtc_state *state,
                          unsigned int *right, unsigned int *left,
                          unsigned int *top, unsigned int *bottom);
index bf72020..d9a8ab8 100644 (file)
@@ -222,6 +222,13 @@ static const u32 txp_fmts[] = {
        TXP_FORMAT_BGRA8888,
 };
 
+static void vc4_txp_armed(struct drm_crtc_state *state)
+{
+       struct vc4_crtc_state *vc4_state = to_vc4_crtc_state(state);
+
+       vc4_state->txp_armed = true;
+}
+
 static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
                                          struct drm_atomic_state *state)
 {
@@ -256,7 +263,7 @@ static int vc4_txp_connector_atomic_check(struct drm_connector *conn,
        if (fb->pitches[0] & GENMASK(3, 0))
                return -EINVAL;
 
-       vc4_crtc_txp_armed(crtc_state);
+       vc4_txp_armed(crtc_state);
 
        return 0;
 }