All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-xe] [PATCH] drm/xe/display: Append dma_buf fences to framebuffer fences
@ 2023-06-06 20:19 José Roberto de Souza
  2023-06-06 20:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: José Roberto de Souza @ 2023-06-06 20:19 UTC (permalink / raw)
  To: intel-xe

This is required to comply with KMS page flip requirements, and it is
the only way to synchronize framebuffer scanouts in Xe KMD.

UMDs are expected to attach a syncobj that will be signaled at the end
of the GPU job that is rendering in the framebuffer.
This way, the compositor can send jobs to the GPU to render the
framebuffer and without having to wait for it to complete, queue the
page flip in KMS.

This fixes display glitches.

Link: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8923
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_atomic_plane.c | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
index b756561f08bd1..a3f30a319e4c0 100644
--- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
+++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
@@ -32,6 +32,7 @@
  */
 
 #include <drm/drm_atomic_helper.h>
+#include <drm/drm_gem_atomic_helper.h>
 #include <drm/drm_blend.h>
 #include <drm/drm_fourcc.h>
 
@@ -1120,10 +1121,20 @@ intel_prepare_plane_fb(struct drm_plane *_plane,
 
 	return ret;
 #else
+	int ret;
+
 	if (!intel_fb_obj(new_plane_state->hw.fb))
 		return 0;
 
-	return intel_plane_pin_fb(new_plane_state);
+	ret = intel_plane_pin_fb(new_plane_state);
+	if (ret)
+		return ret;
+
+	ret = drm_gem_plane_helper_prepare_fb(_plane, _new_plane_state);
+	if (ret)
+		intel_plane_unpin_fb(new_plane_state);
+
+	return ret;
 #endif
 }
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2023-06-16 21:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-06 20:19 [Intel-xe] [PATCH] drm/xe/display: Append dma_buf fences to framebuffer fences José Roberto de Souza
2023-06-06 20:22 ` [Intel-xe] ✓ CI.Patch_applied: success for " Patchwork
2023-06-06 20:22 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-06-06 20:24 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-06-06 20:27 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-06-06 20:28 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-06-06 20:29 ` [Intel-xe] ✗ CI.checksparse: warning " Patchwork
2023-06-06 20:55 ` [Intel-xe] ○ CI.BAT: info " Patchwork
2023-06-15 11:10 ` [Intel-xe] [PATCH] " Shankar, Uma
2023-06-16 14:29   ` Ville Syrjälä
2023-06-16 21:49     ` Souza, Jose
2023-06-16 21:34   ` Souza, Jose

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.