From nobody Tue Jan 30 08:06:27 2024 X-Original-To: x11@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TPHn06pHYz58LBR for ; Tue, 30 Jan 2024 08:06:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TPHn059n8z4tMq for ; Tue, 30 Jan 2024 08:06:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706601988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LnJUdheOfJunrm39KEMPLjto3eNBfvO2l1mL5AR+knw=; b=ky9ho+kxOCR7XVp/TITIxESBQzyLIjosScd3B/OLxA/5mPymDe3rZuZ9okS73uyEyYPTl2 dFFc4pIJJDFjLqZQMfn9sHh1GhJQXfm01y9pURwLVxiHmpqkH70wqUJNROKZlj8CLAJcpz iZHKLY1sKKiFyCl71aS1pn0PZZ/vfxTUkSTzSJ2xyLR95oBouR+McMN8uo/nv+XL3trd0f yLWLXwDrroZ3VI6lIIOuoMfohGr7+wmpoOT+E/EYfOs6VLRH3AmcqLGTQazJR4ODpw6+3C tBuPQGmQlzelexhK3RGWEYGLy314LyWeKJxCX52TxAywVlJblYeRfuZ5pOMX4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706601988; a=rsa-sha256; cv=none; b=FSCa+pfUL9gnptBEACxybEgcyfFYyhbJEEweWhJDnJ22X7FzThhHxx5YXgaZW7pchJdqhV WVY42rimAzMu7muvdSzccH0QuhpcVFTxPJpG0IwReJYV8ambCmlZ9SzCFDRy5xUYLizq5f XpeS7qfvYuPwAiEmQRYLj2SBwx6pcPb/26cyoXvGm6NKFCpuAzTvjkIySmNjdDhYw+CJA7 CyKQHHLKDyznICitoGWCpiKY6+s/LfdDAARJbOHm005bsSq0yqgAVdYrpDMLWQ9GwtMhnT QwJqafY198EwbcDu6Fa/R9GfJus75GQSYD6bvcCgOzdg5h7BBotbs2SCMCpZOg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TPHn03xWfzRd4 for ; Tue, 30 Jan 2024 08:06:28 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 40U86SrW025477 for ; Tue, 30 Jan 2024 08:06:28 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 40U86SNJ025471 for x11@FreeBSD.org; Tue, 30 Jan 2024 08:06:28 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Tue, 30 Jan 2024 08:06:27 +0000 X-Bugzilla-Reason: AssignedTo CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: crash, needs-qa X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: yusisamerican@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: x11@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: X11 List-Archive: https://lists.freebsd.org/archives/freebsd-x11 List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-x11@freebsd.org X-BeenThere: freebsd-x11@freebsd.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267606 --- Comment #49 from Yusuf Khan --- (In reply to Sergiy from comment #48) I think I will have to work on it myself on hardware as I dont have enough X knowledge to do this without a high amount of trial and error. Your OpenBSD logs are showing that your pruning more than just bad panel dimensions(whic= h I probably should have expected), so the small hack job diff I sent you last = time wont work. As you seem to have emptied your OpenBSD drive, I have a diff that is simply just what the intel driver uses to do it but its *simply copied code from t= he intel driver* and is by *no means recommended to use on your computer* due = to my inexperience with X. I will hopefully get hardware to test this later on= and fix it up. The bellow is a diff that should, if the above warnings are read, be run without any other modifications to mode validation. From 6f0ec68b9fc4c0f062e483a96665fbcb378408ea Mon Sep 17 00:00:00 2001 From: Yusuf Khan Date: Mon, 29 Jan 2024 23:52:34 -0800 Subject: [PATCH xf86-video-nv] Intel import fix --- src/nv_driver.c | 41 +++++++++++++++++++++++++++++++++-------- 1 file changed, 33 insertions(+), 8 deletions(-) diff --git a/src/nv_driver.c b/src/nv_driver.c index 134da6a..6c40ebe 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -1976,14 +1976,39 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) if (i > 0) VBESetModeParameters(pScrn, pNv->pVbe); } else { - i =3D xf86ValidateModes(pScrn, pScrn->monitor->Modes, - pScrn->display->modes, clockRanges, - NULL, 256, max_width, - 512, 128, max_height, - pScrn->display->virtualX, - pScrn->display->virtualY, - pNv->ScratchBufferStart, - LOOKUP_BEST_REFRESH); + DisplayModePtr i, m, p =3D NULL; + int max_x =3D 0, max_y =3D 0; + float max_vrefresh =3D 0.0; + + for (m =3D pScrn->monitor->Modes; m; m =3D m->next) { + if (m->type & M_T_PREFERRED) + p =3D m; + max_x =3D max(max_x, m->HDisplay); + max_y =3D max(max_y, m->VDisplay); + max_vrefresh =3D max(max_vrefresh, xf86ModeVRefresh(m)); + } + + max_vrefresh =3D max(max_vrefresh, 60.0); + max_vrefresh *=3D (1 + SYNC_TOLERANCE); +#if XORG_VERSION_CURRENT >=3D XORG_VERSION_NUMERIC(1,6,99,0,0) + pScrn->modePool =3D xf86GetDefaultModes(); +#else + pScrn->modePool =3D xf86GetDefaultModes(0,0); +#endif + xf86ValidateModesSize(pScrn, pScrn->modePool, max_width, max_height, 0); + + for (i =3D m; i; i =3D i->next) { + if (xf86ModeVRefresh(i) > max_vrefresh) + i->status =3D MODE_VSYNC; + if (p && i->HDisplay >=3D p->HDisplay && + i->VDisplay >=3D p->VDisplay && + xf86ModeVRefresh(i) >=3D xf86ModeVRefresh(p)) + i->status =3D MODE_VSYNC; + } + + xf86PruneInvalidModes(pScrn, &m, FALSE); + + pScrn->monitor->Modes =3D xf86ModesAdd(pScrn->monitor->Modes, m); } if (i < 1 && pNv->FBDev) { -- 2.43.0 TLDR; Patch wont work on FreeBSD based on your OpenBSD output, potential diff(probably something wrong with it due to my X experience) that you prob= ably shouldnt apply unless your actually desperate, and I will hopefully try to reproduce the issue myself. --=20 You are receiving this mail because: You are the assignee for the bug. You are on the CC list for the bug.=