Skip to contentSkip to conversation

drm/bochs: Let DRM core send VBLANK events

PATCH New Thomas Zimmermann 1 participant 1 message Jan 10, 2020

Subsystems (2)
lore
Share & tools
lore

Thomas Zimmermann

author maintainer
#0 lore raw

PATCH 1/1 drm/bochs: Let DRM core send VBLANK events

In drm_atomic_helper_fake_vblank() the DRM core sends out VBLANK events if struct drm_crtc_state.no_vblank is enabled. Replace bochs' VBLANK events with the DRM core's functionality.

---
 drivers/gpu/drm/bochs/bochs_kms.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
drivers/gpu/drm/bochs/bochs_kms.c +2 -9
index 3f0006c2470d..14d78bd656c5 100644
@@ -7,7 +7,6 @@
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_gem_framebuffer_helper.h>
 #include <drm/drm_probe_helper.h>
-#include <drm/drm_vblank.h>
 
 #include "bochs.h"
 
@@ -49,6 +48,8 @@ static void bochs_pipe_enable(struct drm_simple_display_pipe *pipe,
 {
 	struct bochs_device *bochs = pipe->crtc.dev->dev_private;
 
+	crtc_state->no_vblank = true;
+
 	bochs_hw_setmode(bochs, &crtc_state->mode);
 	bochs_plane_update(bochs, plane_state);
 }
@@ -57,16 +58,8 @@ static void bochs_pipe_update(struct drm_simple_display_pipe *pipe,
 			      struct drm_plane_state *old_state)
 {
 	struct bochs_device *bochs = pipe->crtc.dev->dev_private;
-	struct drm_crtc *crtc = &pipe->crtc;
 
 	bochs_plane_update(bochs, pipe->plane.state);
-
-	if (crtc->state->event) {
-		spin_lock_irq(&crtc->dev->event_lock);
-		drm_crtc_send_vblank_event(crtc, crtc->state->event);
-		crtc->state->event = NULL;
-		spin_unlock_irq(&crtc->dev->event_lock);
-	}
 }
 
 static const struct drm_simple_display_pipe_funcs bochs_pipe_funcs = {
Signature · 6 lines
2.24.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel