[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231119105709.3143489-4-javierm@redhat.com>
Date: Sun, 19 Nov 2023 11:56:59 +0100
From: Javier Martinez Canillas <javierm@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Thomas Zimmermann <tzimmermann@...e.de>,
Maxime Ripard <mripard@...nel.org>,
Pekka Paalanen <pekka.paalanen@...labora.com>,
Sima Vetter <daniel.vetter@...ll.ch>,
Erico Nunes <nunes.erico@...il.com>,
Simon Ser <contact@...rsion.fr>,
Bilal Elmoussaoui <belmouss@...hat.com>,
Javier Martinez Canillas <javierm@...hat.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
VMware Graphics Reviewers
<linux-graphics-maintainer@...are.com>,
Zack Rusin <zackr@...are.com>, dri-devel@...ts.freedesktop.org
Subject: [PATCH v3 3/5] drm/vmwgfx: Disable damage clipping if FB changed since last page-flip
The driver does per-buffer uploads and needs to force a full plane update
if the plane's attached framebuffer has change since the last page-flip.
Suggested-by: Sima Vetter <daniel.vetter@...ll.ch>
Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>
---
(no changes since v2)
Changes in v2:
- Set struct drm_plane_state .ignore_damage_clips in vmwgfx plane's
.atomic_check instead of using a different helpers (Thomas Zimmermann).
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
index 818b7f109f53..f9364bf222e3 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c
@@ -837,10 +837,21 @@ int vmw_du_primary_plane_atomic_check(struct drm_plane *plane,
{
struct drm_plane_state *new_state = drm_atomic_get_new_plane_state(state,
plane);
+ struct drm_plane_state *old_state = drm_atomic_get_old_plane_state(state,
+ plane);
struct drm_crtc_state *crtc_state = NULL;
struct drm_framebuffer *new_fb = new_state->fb;
+ struct drm_framebuffer *old_fb = old_state->fb;
int ret;
+ /*
+ * Ignore damage clips if the framebuffer attached to the plane's state
+ * has changed since the last plane update (page-flip). In this case, a
+ * full plane update should happen because uploads are done per-buffer.
+ */
+ if (old_fb != new_fb)
+ new_state->ignore_damage_clips = true;
+
if (new_state->crtc)
crtc_state = drm_atomic_get_new_crtc_state(state,
new_state->crtc);
--
2.41.0
Powered by blists - more mailing lists