From owner-freebsd-bugs@freebsd.org Fri Apr 5 15:19:13 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 054BD157A03D for ; Fri, 5 Apr 2019 15:19:13 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 8FD1B96104 for ; Fri, 5 Apr 2019 15:19:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 4EA4B157A03C; Fri, 5 Apr 2019 15:19:12 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2712F157A03B for ; Fri, 5 Apr 2019 15:19:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AEAFC96102 for ; Fri, 5 Apr 2019 15:19:11 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id E8F8EBC54 for ; Fri, 5 Apr 2019 15:19:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x35FJAJd003974 for ; Fri, 5 Apr 2019 15:19:10 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x35FJASi003970 for bugs@FreeBSD.org; Fri, 5 Apr 2019 15:19:10 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: bugs@FreeBSD.org Subject: [Bug 237050] [PATCH] vt efifb back-end does not send display release / re-acquire signals on suspend / resume Date: Fri, 05 Apr 2019 15:19:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.2-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: ekurzinger@nvidia.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2019 15:19:13 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D237050 Bug ID: 237050 Summary: [PATCH] vt efifb back-end does not send display release / re-acquire signals on suspend / resume Product: Base System Version: 11.2-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: ekurzinger@nvidia.com Using the latest NVIDIA driver, upon resuming from suspend while X is runni= ng the display will remain blank. Additionally, and OpenGL applications that w= ere running will trigger a number of error messages from the NVIDIA driver resembling the following: NVRM: GPU at PCI:0000:05:00: GPU-e0851a46-0a85-f806-1e95-94e61ad45653 NVRM: GPU Board Serial Number: 0331118033409 NVRM: Xid (PCI:0000:05:00): 13, Graphics SM Warp Exception on (GPC 0, TPC 1= ): Illegal Instruction Encoding NVRM: Xid (PCI:0000:05:00): 13, Graphics Exception: ESR 0x504e48=3D0x3f0009 0x504e50=3D0x0 0x504e44=3D0xd3eff2 0x504e4c=3D0x17f NVRM: Xid (PCI:0000:05:00): 13, Graphics SM Warp Exception on (GPC 0, TPC 2= ): Illegal Instruction Encoding NVRM: Xid (PCI:0000:05:00): 13, Graphics Exception: ESR 0x505648=3D0x3f0009 0x505650=3D0x0 0x505644=3D0xd3eff2 0x50564c=3D0x17f This is because the efifb back-end for vt will not signal the X server to release the display before suspending (or to re-acquire it after resuming) resulting in important code in the NVIDIA driver responsible for smoothly shutting down and re-initializing the GPU not running. Since the NVIDIA dri= ver doesn't currently support framebuffer devices, vt is forced to fall back to this efifb back-end, unlike on Intel hardware, for instance, where it will instead use the fb back-end that does correctly implement the display hand-= off logic. The following patch adds vd_suspend and vd_resume members to the efi= fb back-end's vt_driver struct. These simply call the vt_suspend and vt_resume functions from vt_core.c (similar to the behavior of the fb back-end). This ensures the X server is properly able to re-initialize the display and prev= ents the above errors from 3D applications. --- sys/dev/vt/hw/efifb/efifb.c (revision 345767) +++ sys/dev/vt/hw/efifb/efifb.c (working copy) @@ -66,6 +66,8 @@ .vd_fb_mmap =3D vt_fb_mmap, /* Better than VGA, but still generic driver. */ .vd_priority =3D VD_PRIORITY_GENERIC + 1, + .vd_suspend =3D vt_suspend, + .vd_resume =3D vt_resume, }; static struct fb_info local_info; --=20 You are receiving this mail because: You are the assignee for the bug.=