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>] [day] [month] [year] [list]
Date:   Tue,  6 Sep 2016 16:12:36 +0100
From:   Brian Starkey <brian.starkey@....com>
To:     airlied@...ux.ie
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        Liviu.Dudau@....com
Subject: [PATCH] drm/atomic: mode_set encoders when routing changes

crtc_set_mode() only checks if the CRTC mode has changed when deciding
whether encoders require a mode_set. This is insufficient when the CRTC
mode isn't changed but a new encoder is added to it, leading to encoders
never getting mode_set.

Fix this by also checking that a connector's CRTC and encoder have not
changed before skipping its encoder's mode_set.

Signed-off-by: Brian Starkey <brian.starkey@....com>
---
 drivers/gpu/drm/drm_atomic_helper.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 20be86d..206fba1 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -876,7 +876,9 @@ crtc_set_mode(struct drm_device *dev, struct drm_atomic_state *old_state)
 		mode = &new_crtc_state->mode;
 		adjusted_mode = &new_crtc_state->adjusted_mode;
 
-		if (!new_crtc_state->mode_changed)
+		if (!new_crtc_state->mode_changed &&
+		    connector->state->crtc == old_conn_state->crtc &&
+		    connector->state->best_encoder == old_conn_state->best_encoder)
 			continue;
 
 		DRM_DEBUG_ATOMIC("modeset on [ENCODER:%d:%s]\n",
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ