Date: Wed, 24 Jan 2024 03:11:07 +0000 From: bugzilla-noreply@freebsd.org To: x11@FreeBSD.org Subject: [Bug 267606] x11-drivers/xf86-video-nv: Segmentation Fault post update from 1.20.14,1 to 21.1.4 Message-ID: <bug-267606-7141-hLOoaYf6nl@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-267606-7141@https.bugs.freebsd.org/bugzilla/> References: <bug-267606-7141@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267606 Yusuf Khan <yusisamerican@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #247909|0 |1 is patch| | Attachment #247909|1 |0 is obsolete| | Attachment #247909|Patch that would |Patch that would description|pressumably let the |pressumably let the |strcmp() pass |strcmp() pass, edited as | |previous patch was not | |correct. --- Comment #42 from Yusuf Khan <yusisamerican@gmail.com> --- Comment on attachment 247909 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D247909 Patch that would pressumably let the strcmp() pass, edited as previous patch was not correct. >>From 9ac823cf803c842c4455714f8a7899dc6f59e7f6 Mon Sep 17 00:00:00 2001 >From: Yusuf Khan <yusisamerican@gmail.com> >Date: Tue, 23 Jan 2024 16:41:45 -0800 >Subject: [PATCH xf86-video-nv] nv/init: set default names and crt before > validation > >Presumably would fix https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D2= 67606, >a segfault probably resulting from the lack of a name on the modes. > >Signed-off-by: Yusuf Khan <yusisamerican@gmail.com> >--- > src/nv_driver.c | 22 ++++++++++++++++++++++ > 1 file changed, 22 insertions(+) > >diff --git a/src/nv_driver.c b/src/nv_driver.c >index d2634da..4f50aa4 100644 >--- a/src/nv_driver.c >+++ b/src/nv_driver.c >@@ -1339,6 +1339,27 @@ NVModesAdd(DisplayModePtr Modes, DisplayModePtr Add= itions) > return Modes; > } >=20 >+/* Sometimes we need info from here and we dont get it for whatever reaso= n */ >+static void >+NVSetModesInfo(DisplayModePtr Modes, int adjustFlags) >+{ >+ DisplayModePtr Mode; >+ >+ if (!Modes) { >+ return; >+ } >+ >+ Mode =3D Modes; >+ >+ while (Modes->next) { >+ Mode =3D Mode->next; >+ xf86SetModeDefaultName(Mode); >+ xf86SetModeCrtc(Mode, adjustFlags); >+ } >+ >+ return; >+} >+ > /* Mandatory */ > static Bool > NVPreInit(ScrnInfoPtr pScrn, int flags) >@@ -1975,6 +1996,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) > if (i > 0) > VBESetModeParameters(pScrn, pNv->pVbe); > } else { >+ NVSetModesInfo(pScrn->monitor->Modes, pScrn->adjustFlags); > i =3D xf86ValidateModes(pScrn, pScrn->monitor->Modes, > pScrn->display->modes, clockRanges, > NULL, 256, max_width, >--=20 >2.43.0 > --=20 You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267606-7141-hLOoaYf6nl>