FAILED: patch "[PATCH] drm/vmwgfx: Fix Legacy Display Unit atomic drm support" failed to apply to 5.15-stable tree
Subsystems (4)
[email protected]
maintainerThe patch below does not apply to the 5.15-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y
git checkout FETCH_HEAD
git cherry-pick -x a37a512db3fa1b65fe9087003e5b2072cefb3667
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2023050620-unhidden-parasitic-e7e1@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a37a512db3fa1b65fe9087003e5b2072cefb3667 Mon Sep 17 00:00:00 2001
From: Martin Krastev <[email protected]>
Date: Mon, 20 Mar 2023 22:09:49 -0400
Subject: [PATCH] drm/vmwgfx: Fix Legacy Display Unit atomic drm support
Legacy Display Unit (LDU) fb dirty support used a custom fb dirty callback. Latter handled only the DIRTYFB IOCTL presentation path but not the ADDFB2/PAGE_FLIP/RMFB IOCTL path, common for Wayland compositors.
Get rid of the custom callback in favor of drm_atomic_helper_dirtyfb and unify the handling of the presentation paths inside of vmw_ldu_primary_plane_atomic_update. This also homogenizes the fb dirty callbacks across all DUs: LDU, SOU and STDU.
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +1 -61
@@ -1396,70 +1396,10 @@ static void vmw_framebuffer_bo_destroy(struct drm_framebuffer *framebuffer)kfree (vfbd); } -static int vmw_framebuffer_bo_dirty (struct drm_framebuffer *framebuffer, -struct drm_file *file_priv, -unsigned int flags,unsigned int color, -struct drm_clip_rect *clips, -unsigned int num_clips) -{ -struct vmw_private *dev_priv =vmw_priv (framebuffer->dev); -struct vmw_framebuffer_bo *vfbd = -vmw_framebuffer_to_vfbd (framebuffer); -struct drm_clip_rect norect; -int ret, increment =1 ; - -drm_modeset_lock_all (&dev_priv->drm); - -if (!num_clips) { - num_clips =1 ; - clips = &norect; - norect.x1 = norect.y1 =0 ; - norect.x2 = framebuffer->width; - norect.y2 = framebuffer->height; - }else if (flags &DRM_MODE_FB_DIRTY_ANNOTATE_COPY ) { - num_clips /=2 ; - increment =2 ; - } - -switch (dev_priv->active_display_unit) { -case vmw_du_legacy: - ret =vmw_kms_ldu_do_bo_dirty (dev_priv, &vfbd->base,0 ,0 , - clips, num_clips, increment); -break ; -default : - ret = -EINVAL ; -WARN_ONCE (true,"Dirty called with invalid display system.\n" ); -break ; - } - -vmw_cmd_flush (dev_priv, false); - -drm_modeset_unlock_all (&dev_priv->drm); - -return ret; -} - -static int vmw_framebuffer_bo_dirty_ext (struct drm_framebuffer *framebuffer, -struct drm_file *file_priv, -unsigned int flags,unsigned int color, -struct drm_clip_rect *clips, -unsigned int num_clips) -{ -struct vmw_private *dev_priv =vmw_priv (framebuffer->dev); - -if (dev_priv->active_display_unit == vmw_du_legacy && -vmw_cmd_supported (dev_priv)) -return vmw_framebuffer_bo_dirty (framebuffer, file_priv, flags, - color, clips, num_clips); - -return drm_atomic_helper_dirtyfb (framebuffer, file_priv, flags, color, - clips, num_clips); -} -static const struct drm_framebuffer_funcs vmw_framebuffer_bo_funcs = { .create_handle = vmw_framebuffer_bo_create_handle, .destroy = vmw_framebuffer_bo_destroy, - .dirty = vmw_framebuffer_bo_dirty_ext, + .dirty = drm_atomic_helper_dirtyfb, };/**
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +0 -5
@@ -507,11 +507,6 @@ void vmw_du_connector_destroy_state(struct drm_connector *connector,*/ int vmw_kms_ldu_init_display (struct vmw_private *dev_priv);int vmw_kms_ldu_close_display (struct vmw_private *dev_priv); -int vmw_kms_ldu_do_bo_dirty (struct vmw_private *dev_priv, -struct vmw_framebuffer *framebuffer, -unsigned int flags,unsigned int color, -struct drm_clip_rect *clips, -unsigned int num_clips,int increment); int vmw_kms_update_proxy(struct vmw_resource *res, const struct drm_clip_rect *clips, unsigned num_clips,
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c +37 -8
82 lines not on this page · raw message