lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200408060503.47709-2-gabrielabittencourt00@gmail.com>
Date:   Wed,  8 Apr 2020 03:05:02 -0300
From:   Gabriela Bittencourt <gabrielabittencourt00@...il.com>
To:     rodrigosiqueiramelo@...il.com, hamohammed.sa@...il.com,
        daniel@...ll.ch, airlied@...ux.ie, dri-devel@...ts.freedesktop.org,
        linux-kernel@...r.kernel.org, manasi.d.navare@...el.com
Cc:     Gabriela Bittencourt <gabrielabittencourt00@...il.com>
Subject: [PATCH 1/2] drm/vkms: Rework vkms_vblank_simulate

Add support for Virtual Vblank on VKMS. Rework part of
'vkms_vblank_simulate' for schedule a compose worker outside.

Signed-off-by: Gabriela Bittencourt <gabrielabittencourt00@...il.com>
---
 drivers/gpu/drm/vkms/vkms_crtc.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c
index ac85e17428f8..a72769b81efe 100644
--- a/drivers/gpu/drm/vkms/vkms_crtc.c
+++ b/drivers/gpu/drm/vkms/vkms_crtc.c
@@ -7,6 +7,12 @@
 
 #include "vkms_drv.h"
 
+static bool vkms_queue_compose_worker(struct vkms_output *output,
+				      struct vkms_crtc_state *state)
+{
+	return queue_work(output->composer_workq, &state->composer_work);
+}
+
 static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)
 {
 	struct vkms_output *output = container_of(timer, struct vkms_output,
@@ -22,12 +28,12 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)
 
 	spin_lock(&output->lock);
 	ret = drm_crtc_handle_vblank(crtc);
-	if (!ret)
-		DRM_ERROR("vkms failure on handling vblank");
-
 	state = output->composer_state;
 	spin_unlock(&output->lock);
 
+	if (!ret)
+		DRM_ERROR("vkms failure on handling vblank");
+
 	if (state && output->composer_enabled) {
 		u64 frame = drm_crtc_accurate_vblank_count(crtc);
 
@@ -44,7 +50,7 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer)
 		state->crc_pending = true;
 		spin_unlock(&output->composer_lock);
 
-		ret = queue_work(output->composer_workq, &state->composer_work);
+		ret = vkms_queue_compose_worker(output, state);
 		if (!ret)
 			DRM_DEBUG_DRIVER("Composer worker already queued\n");
 	}
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ