drm/tidss: Remove return values from dispc_plane_{setup, enable}()
authorThomas Zimmermann <tzimmermann@suse.de>
Thu, 9 Feb 2023 15:41:06 +0000 (16:41 +0100)
committerThomas Zimmermann <tzimmermann@suse.de>
Mon, 20 Feb 2023 14:20:45 +0000 (15:20 +0100)
Calls to dispc_plane_setup() and dispc_plane_enable() cannot fail.
Remove the return value.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230209154107.30680-6-tzimmermann@suse.de
drivers/gpu/drm/tidss/tidss_dispc.c
drivers/gpu/drm/tidss/tidss_dispc.h
drivers/gpu/drm/tidss/tidss_plane.c

index 165365b515e1371478cd319f9e1b06ac1e56634e..dca077411f77ccbcb5d110f699b7018bdd7331bc 100644 (file)
@@ -1985,9 +1985,9 @@ dma_addr_t dispc_plane_state_p_uv_addr(const struct drm_plane_state *state)
                (y * fb->pitches[1] / fb->format->vsub);
 }
 
-int dispc_plane_setup(struct dispc_device *dispc, u32 hw_plane,
-                     const struct drm_plane_state *state,
-                     u32 hw_videoport)
+void dispc_plane_setup(struct dispc_device *dispc, u32 hw_plane,
+                      const struct drm_plane_state *state,
+                      u32 hw_videoport)
 {
        bool lite = dispc->feat->vid_lite[hw_plane];
        u32 fourcc = state->fb->format->format;
@@ -2066,15 +2066,11 @@ int dispc_plane_setup(struct dispc_device *dispc, u32 hw_plane,
        else
                VID_REG_FLD_MOD(dispc, hw_plane, DISPC_VID_ATTRIBUTES, 0,
                                28, 28);
-
-       return 0;
 }
 
-int dispc_plane_enable(struct dispc_device *dispc, u32 hw_plane, bool enable)
+void dispc_plane_enable(struct dispc_device *dispc, u32 hw_plane, bool enable)
 {
        VID_REG_FLD_MOD(dispc, hw_plane, DISPC_VID_ATTRIBUTES, !!enable, 0, 0);
-
-       return 0;
 }
 
 static u32 dispc_vid_get_fifo_size(struct dispc_device *dispc, u32 hw_plane)
index e49432f0abf56b54c28b9ec0f446d180e0bb4d93..946ed769caaf6a275be87d5a43ba337cea24331b 100644 (file)
@@ -123,10 +123,10 @@ int dispc_runtime_resume(struct dispc_device *dispc);
 int dispc_plane_check(struct dispc_device *dispc, u32 hw_plane,
                      const struct drm_plane_state *state,
                      u32 hw_videoport);
-int dispc_plane_setup(struct dispc_device *dispc, u32 hw_plane,
-                     const struct drm_plane_state *state,
-                     u32 hw_videoport);
-int dispc_plane_enable(struct dispc_device *dispc, u32 hw_plane, bool enable);
+void dispc_plane_setup(struct dispc_device *dispc, u32 hw_plane,
+                      const struct drm_plane_state *state,
+                      u32 hw_videoport);
+void dispc_plane_enable(struct dispc_device *dispc, u32 hw_plane, bool enable);
 const u32 *dispc_plane_formats(struct dispc_device *dispc, unsigned int *len);
 
 int dispc_init(struct tidss_device *tidss);
index fe2c41f0cd4f3b3320ef525dfe2f6ea832764329..0b12405edb47342c39ba6ac8a38381ecc2557a00 100644 (file)
@@ -113,7 +113,6 @@ static void tidss_plane_atomic_update(struct drm_plane *plane,
        struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
                                                                           plane);
        u32 hw_videoport;
-       int ret;
 
        dev_dbg(ddev->dev, "%s\n", __func__);
 
@@ -124,15 +123,7 @@ static void tidss_plane_atomic_update(struct drm_plane *plane,
 
        hw_videoport = to_tidss_crtc(new_state->crtc)->hw_videoport;
 
-       ret = dispc_plane_setup(tidss->dispc, tplane->hw_plane_id,
-                               new_state, hw_videoport);
-
-       if (ret) {
-               dev_err(plane->dev->dev, "%s: Failed to setup plane %d\n",
-                       __func__, tplane->hw_plane_id);
-               dispc_plane_enable(tidss->dispc, tplane->hw_plane_id, false);
-               return;
-       }
+       dispc_plane_setup(tidss->dispc, tplane->hw_plane_id, new_state, hw_videoport);
 
        dispc_plane_enable(tidss->dispc, tplane->hw_plane_id, true);
 }