From owner-freebsd-current@freebsd.org Mon Mar 18 20:03:00 2019 Return-Path: Delivered-To: freebsd-current@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 3851E154C813 for ; Mon, 18 Mar 2019 20:03:00 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: from mail-ot1-x334.google.com (mail-ot1-x334.google.com [IPv6:2607:f8b0:4864:20::334]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 063DA74359 for ; Mon, 18 Mar 2019 20:02:59 +0000 (UTC) (envelope-from johalun0@gmail.com) Received: by mail-ot1-x334.google.com with SMTP id d24so1811341otl.11 for ; Mon, 18 Mar 2019 13:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=0b3DLxHdWCRi4/2vGF6cRm7cy/HOXPRczrXRi7lWnNs=; b=LGigVWiZ5bF/Tc60H5NqK/X9DrkHsJ9O/F8s5CcJedNWzd45nxznsR1hv9G2KAsWL1 g64Jnm7UcCCrYNGGGxTqruotyrHLz1a6lo6IdNjxVQYrfpb9Gi5vbY78Akij2d6p3KEY pMtmMI/yDdQ52i7yOLCtjDVTF20MRIHfp9A5rOS5b78PzD1Xr/Ymx6onFxUpUe0GisgG oyvj+XMVe5CKJ5E5Roh+5uNuJ68ekSDcv06i/8+Rog9Ju8Nw6P80BkPnzH5ZROw3I475 2juxjXUwVMEUB1I+UjC2kd8D59S0QnokR5az17Rvz48hhOTqJlDG26+M/oa+JraxDieV NT1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0b3DLxHdWCRi4/2vGF6cRm7cy/HOXPRczrXRi7lWnNs=; b=eZSYn/XMP3z/7q/m+0Dm71H9M8qF/O42XNTq5Iuts5By4GiE/xe6n6maupZkhOsVqn B03TKB3tl2Vlkn0Wfk9rtJ7xx5IB+tvZGlz0V3NfngGGM885la1K5puPJBdRSw30uVgK FMYurM3CHD+bxLrsbMLJfq6ysYCEGUWnlpUVCryVHySkjI0Sdekb4fxEyhGIg4JEW9OA YRb3RDH6+29QdDjQsh7P+zaAls8C8gSF99RNoxo6Kf8uta14svksxnH/h7b6ICwxAq1Q ljTOlfwQm+M4Ywf77X8EXdfWe8AWq3gu1DCPxj2DByrBEsBBE1HibJf2FHVJEsDnnPd5 Ws3g== X-Gm-Message-State: APjAAAV7x8Jyw/xOtQfI//hSe6YiN9Ev/IGBGpO7FeF2QurWj2PKl+ZI hKVeKm6vF8cI9eUaH5Nn+I5Bk6/EawgPThiQD4X6Xw== X-Google-Smtp-Source: APXvYqw/1CCaoUTDikwjKe45YojqYNLuCpGVm8G3mZBrHJ5dTag9s8sThb1+S8xWPcSpUYHLhTfc5frCd2EngYEi+jQ= X-Received: by 2002:a9d:5d0d:: with SMTP id b13mr11942448oti.53.1552939378108; Mon, 18 Mar 2019 13:02:58 -0700 (PDT) MIME-Version: 1.0 References: <95dfadc9-8341-b2a5-7b58-e94f46b5fa90@gmail.com> <1552836887.1930.0@unrelenting.technology> <6ea64218-2b6d-fc9a-01b5-ed07bd23c783@gmail.com> <20190317223531.b7334327a47f3579eaba98ee@bidouilliste.com> <8f3432cf-b02d-67cc-f284-6fb5c2192213@nomadlogic.org> In-Reply-To: <8f3432cf-b02d-67cc-f284-6fb5c2192213@nomadlogic.org> From: Johannes Lundberg Date: Mon, 18 Mar 2019 20:02:46 +0000 Message-ID: Subject: Re: Switching fb backend back to default To: Pete Wright Cc: Emmanuel Vadot , FreeBSD Current , Greg V X-Rspamd-Queue-Id: 063DA74359 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=LGigVWiZ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of johalun0@gmail.com designates 2607:f8b0:4864:20::334 as permitted sender) smtp.mailfrom=johalun0@gmail.com X-Spamd-Result: default: False [-6.67 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[4.3.3.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; RCVD_TLS_LAST(0.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.966,0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(-2.70)[ip: (-8.57), ipnet: 2607:f8b0::/32(-2.76), asn: 15169(-2.09), country: US(-0.07)]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Mar 2019 20:03:00 -0000 On Mon, Mar 18, 2019 at 19:28 Pete Wright wrote: > > > On 3/17/19 2:50 PM, Johannes Lundberg wrote: > > On Sun, Mar 17, 2019 at 21:35 Emmanuel Vadot > wrote: > > > >> On Sun, 17 Mar 2019 16:32:43 +0000 > >> Johannes Lundberg wrote: > >> > >>> On 3/17/19 3:34 PM, Greg V wrote: > >>>> > >>>> On Sun, Mar 17, 2019 at 3:07 PM, Johannes Lundberg > >>>> wrote: > >>>>> Hi > >>>>> > >>>>> I'm working on making i915kms unload properly. I've come to what I > >> think > >>>>> is the last issue. The drm driver unloads ok, the "efifb" backend i= s > >>>>> restored (according to logs) and vt_efifb_init() is being called bu= t > >> the > >>>>> screen (laptop built in display) stays black. The system seems > >>>>> operational otherwise. If I load i915kms again in this state I get > >> back > >>>>> a visible (i915kms) framebuffer. > >>>>> > >>>>> Did we ever have this working so it's known to work? > >>>> Recently on the linux kernel mailing list: > >>>> > >>>> http://lkml.iu.edu/hypermail/linux/kernel/1903.1/01162.html > >>>> > >>>>> Of course, once native drivers like i915 or radeon take over, such = a > >>>> framebuffer is toast... [6] > >>>> > >>>>> [6] > >> linux/drivers/gpu/drm/i915/i915_drv.c::i915_kick_out_firmware_fb() > >>>>> linux/drivers/gpu/drm/radeon/radeon_drv.c::radeon_pci_probe() > >>>> So it seems like efifb is not supposed to work after a driver has be= en > >>>> loaded at least once. > >>>> > >>>> > >>> Hmm, well the code is there to handle switching back to the boot time > >>> fb. What I think is happening is that i915 powers off the displays at > >>> unload and vt doesn't know how to power on (or that it should). > >>> > >> That and if the display pipeline is de-configured or the resolution > >> changed you cannot reset it to the original state. > >> Unloading drm modules is only useful for testing (and finding leaks)= . > > > > Yeah a normal user would never unload it. Since I mostly ssh to my test > > machines I think I=E2=80=99m fine personally with losing the display wh= ile > > unloading. > > > > Keyboard input still works though and at least it doesn=E2=80=99t crash= anymore > :) > > > > that's awesome, so in theory we will be able to upgrade the drm-kmod and > use the new driver without a reboot. i like that as a hacker and > end-user You probably have to exit X to unload the driver so I=E2=80=99m not sure it= =E2=80=99s that much better than a reboot :) Either way, it will make simple testing a lot easier. > > -pete > > -- > Pete Wright > pete@nomadlogic.org > @nomadlogicLA > >