On Wed, May 27, 2026 at 10:51 AM Thomas Zimmermann <[email protected]> wrote:
>
> Plane updates no longer require the old plane state. Remove the field
> from struct vmwgfx_du_update_plane and fix all callers.
>
> Signed-off-by: Thomas Zimmermann <[email protected]>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_kms.h  |  2 --
>  drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 12 ++----------
>  drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c | 11 ++---------
>  3 files changed, 4 insertions(+), 21 deletions(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> index 2224d7d91d1b..8c2072b82062 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.h
> @@ -19,7 +19,6 @@
>  /**
>   * struct vmw_du_update_plane - Closure structure for 
> vmw_du_helper_plane_update
>   * @plane: Plane which is being updated.
> - * @old_state: Old state of plane.
>   * @dev_priv: Device private.
>   * @du: Display unit on which to update the plane.
>   * @vfb: Framebuffer which is blitted to display unit.
> @@ -102,7 +101,6 @@ struct vmw_du_update_plane {
>                                     struct drm_rect *bb);
>
>         struct drm_plane *plane;
> -       struct drm_plane_state *old_state;
>         struct vmw_private *dev_priv;
>         struct vmw_display_unit *du;
>         struct vmw_framebuffer *vfb;
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> index c83061cf7455..fa84bc7ab5bb 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c
> @@ -530,7 +530,6 @@ static uint32_t vmw_stud_bo_post_clip(struct 
> vmw_du_update_plane  *update,
>   */
>  static int vmw_sou_plane_update_bo(struct vmw_private *dev_priv,
>                                    struct drm_plane *plane,
> -                                  struct drm_plane_state *old_state,
>                                    struct vmw_framebuffer *vfb,
>                                    struct vmw_fence_obj **out_fence)
>  {
> @@ -538,7 +537,6 @@ static int vmw_sou_plane_update_bo(struct vmw_private 
> *dev_priv,
>
>         memset(&bo_update, 0, sizeof(struct vmw_du_update_plane_buffer));
>         bo_update.base.plane = plane;
> -       bo_update.base.old_state = old_state;
>         bo_update.base.dev_priv = dev_priv;
>         bo_update.base.du = vmw_crtc_to_du(plane->state->crtc);
>         bo_update.base.vfb = vfb;
> @@ -692,7 +690,6 @@ static uint32_t vmw_sou_surface_post_clip(struct 
> vmw_du_update_plane *update,
>   */
>  static int vmw_sou_plane_update_surface(struct vmw_private *dev_priv,
>                                         struct drm_plane *plane,
> -                                       struct drm_plane_state *old_state,
>                                         struct vmw_framebuffer *vfb,
>                                         struct vmw_fence_obj **out_fence)
>  {
> @@ -700,7 +697,6 @@ static int vmw_sou_plane_update_surface(struct 
> vmw_private *dev_priv,
>
>         memset(&srf_update, 0, sizeof(struct vmw_du_update_plane_surface));
>         srf_update.base.plane = plane;
> -       srf_update.base.old_state = old_state;
>         srf_update.base.dev_priv = dev_priv;
>         srf_update.base.du = vmw_crtc_to_du(plane->state->crtc);
>         srf_update.base.vfb = vfb;
> @@ -721,7 +717,6 @@ static void
>  vmw_sou_primary_plane_atomic_update(struct drm_plane *plane,
>                                     struct drm_atomic_commit *state)
>  {
> -       struct drm_plane_state *old_state = 
> drm_atomic_get_old_plane_state(state, plane);
>         struct drm_plane_state *new_state = 
> drm_atomic_get_new_plane_state(state, plane);
>         struct drm_crtc *crtc = new_state->crtc;
>         struct vmw_fence_obj *fence = NULL;
> @@ -734,12 +729,9 @@ vmw_sou_primary_plane_atomic_update(struct drm_plane 
> *plane,
>                         vmw_framebuffer_to_vfb(new_state->fb);
>
>                 if (vfb->bo)
> -                       ret = vmw_sou_plane_update_bo(dev_priv, plane,
> -                                                     old_state, vfb, &fence);
> +                       ret = vmw_sou_plane_update_bo(dev_priv, plane, vfb, 
> &fence);
>                 else
> -                       ret = vmw_sou_plane_update_surface(dev_priv, plane,
> -                                                          old_state, vfb,
> -                                                          &fence);
> +                       ret = vmw_sou_plane_update_surface(dev_priv, plane, 
> vfb, &fence);
>                 if (ret != 0)
>                         DRM_ERROR("Failed to update screen.\n");
>         } else {
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c 
> b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> index f0df2b1c8465..474e3badb80f 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c
> @@ -1240,7 +1240,6 @@ vmw_stdu_bo_populate_update_cpu(struct 
> vmw_du_update_plane  *update, void *cmd,
>   */
>  static int vmw_stdu_plane_update_bo(struct vmw_private *dev_priv,
>                                     struct drm_plane *plane,
> -                                   struct drm_plane_state *old_state,
>                                     struct vmw_framebuffer *vfb,
>                                     struct vmw_fence_obj **out_fence)
>  {
> @@ -1248,7 +1247,6 @@ static int vmw_stdu_plane_update_bo(struct vmw_private 
> *dev_priv,
>
>         memset(&bo_update, 0, sizeof(struct vmw_du_update_plane_buffer));
>         bo_update.base.plane = plane;
> -       bo_update.base.old_state = old_state;
>         bo_update.base.dev_priv = dev_priv;
>         bo_update.base.du = vmw_crtc_to_du(plane->state->crtc);
>         bo_update.base.vfb = vfb;
> @@ -1350,7 +1348,6 @@ vmw_stdu_surface_populate_update(struct 
> vmw_du_update_plane  *update, void *cmd,
>   */
>  static int vmw_stdu_plane_update_surface(struct vmw_private *dev_priv,
>                                          struct drm_plane *plane,
> -                                        struct drm_plane_state *old_state,
>                                          struct vmw_framebuffer *vfb,
>                                          struct vmw_fence_obj **out_fence)
>  {
> @@ -1363,7 +1360,6 @@ static int vmw_stdu_plane_update_surface(struct 
> vmw_private *dev_priv,
>
>         memset(&srf_update, 0, sizeof(struct vmw_du_update_plane));
>         srf_update.plane = plane;
> -       srf_update.old_state = old_state;
>         srf_update.dev_priv = dev_priv;
>         srf_update.du = vmw_crtc_to_du(plane->state->crtc);
>         srf_update.vfb = vfb;
> @@ -1424,12 +1420,9 @@ vmw_stdu_primary_plane_atomic_update(struct drm_plane 
> *plane,
>                         DRM_ERROR("Failed to bind surface to STDU.\n");
>
>                 if (vfb->bo)
> -                       ret = vmw_stdu_plane_update_bo(dev_priv, plane,
> -                                                      old_state, vfb, 
> &fence);
> +                       ret = vmw_stdu_plane_update_bo(dev_priv, plane, vfb, 
> &fence);
>                 else
> -                       ret = vmw_stdu_plane_update_surface(dev_priv, plane,
> -                                                           old_state, vfb,
> -                                                           &fence);
> +                       ret = vmw_stdu_plane_update_surface(dev_priv, plane, 
> vfb, &fence);
>                 if (ret)
>                         DRM_ERROR("Failed to update STDU.\n");
>         } else {
> --
> 2.54.0
>

LGTM

For the vmwgfx bits:
Reviewed-by: Zack Rusin <[email protected]>

For the rest of the series:
Acked-by: Zack Rusin <[email protected]>

z

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to