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]
Message-ID: <20250723192528.77109-1-alok.a.tiwari@oracle.com>
Date: Wed, 23 Jul 2025 12:24:31 -0700
From: Alok Tiwari <alok.a.tiwari@...cle.com>
To: sudipm.mukherjee@...il.com, teddy.wang@...iconmotion.com,
        gregkh@...uxfoundation.org, linux-fbdev@...r.kernel.org,
        linux-staging@...ts.linux.dev
Cc: alok.a.tiwari@...cle.com, linux-kernel@...r.kernel.org
Subject: [bug report] staging: sm750fb: Fix polarity assignment for vertical and horizontal mode

In drivers/staging/sm750fb/sm750_hw.c,
the vertical and horizontal sync polarity assignments were incorrectly
ordered. 
The assignment for modparm.vertical_sync_polarity was mistakenly using
the FB_SYNC_HOR_HIGH_ACT bit instead of FB_SYNC_VERT_HIGH_ACT, 
and the horizontal polarity line was commented out or missing.

This patch corrects the logic by properly assigning:

vertical_sync_polarity -> from FB_SYNC_VERT_HIGH_ACT
horizontal_sync_polarity -> from FB_SYNC_HOR_HIGH_ACT

Please let me know your feedback.
Thanks,
Alok
---
Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging")
Signed-off-by: Alok Tiwari <alok.a.tiwari@...cle.com>
---
 drivers/staging/sm750fb/sm750_hw.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_hw.c b/drivers/staging/sm750fb/sm750_hw.c
index 7119b67efe11b..5a32756f98c31 100644
--- a/drivers/staging/sm750fb/sm750_hw.c
+++ b/drivers/staging/sm750fb/sm750_hw.c
@@ -280,9 +280,9 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,
 	/* set timing */
 	modparm.pixel_clock = ps_to_hz(var->pixclock);
 	modparm.vertical_sync_polarity =
-		(var->sync & FB_SYNC_HOR_HIGH_ACT) ? POS : NEG;
-	modparm.horizontal_sync_polarity =
 		(var->sync & FB_SYNC_VERT_HIGH_ACT) ? POS : NEG;
+	modparm.horizontal_sync_polarity =
+		(var->sync & FB_SYNC_HOR_HIGH_ACT) ? POS : NEG;
 	modparm.clock_phase_polarity =
 		(var->sync & FB_SYNC_COMP_HIGH_ACT) ? POS : NEG;
 	modparm.horizontal_display_end = var->xres;
-- 
2.46.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ