From nobody Fri Jan 14 16:10:40 2022 X-Original-To: dev-commits-src-branches@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 2CB541941731; Fri, 14 Jan 2022 16:10:41 +0000 (UTC) (envelope-from git@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 4Jb5r10Mkfz3CQ5; Fri, 14 Jan 2022 16:10:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642176641; 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; bh=Dp4TaC6of4zczYEO6AoEemK+kvbPGhgTVpAu2BKP8lQ=; b=Uf1axqJy3bL1sLVr7odDhTfZInfcrKnlgLPZ9WKrePK6KEyl8aRqiXVDflLygVtMLYPWbM 2IuTJAm4IUzYkFCdgRGr6WyGvTfSyu4mShYkIRO6gB9KdnAlpM/CWEx9Iv1y4ENWgxCbZp ptq2+MxE/kZ7qEBx55e4aHAcKDvPbFXD7Vl+8ZPzGEo6fTJa4+wkZOWD8i+CLnsw4s3WxF xIzH28q02Ik1PJuoC5dJlaYlQwT6m8yrDPjiOQU1GHQ3kP9SDCKI7GvRMYV0PtIFkU/u6F nM0US7H3lNlbHe22Gs63wkIjY/xlCOSxBiN9eSa0Nj4hp/5k95Zt8KQLpV29Cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 DD5EC16848; Fri, 14 Jan 2022 16:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20EGAeHG035439; Fri, 14 Jan 2022 16:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20EGAeBS035438; Fri, 14 Jan 2022 16:10:40 GMT (envelope-from git) Date: Fri, 14 Jan 2022 16:10:40 GMT Message-Id: <202201141610.20EGAeBS035438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Emmanuel Vadot Subject: git: ae4067ce9414 - stable/13 - efifb,vbefb: implement vd_fini List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ae4067ce94146c6d4031b6a233389e5f553f4141 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642176641; 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; bh=Dp4TaC6of4zczYEO6AoEemK+kvbPGhgTVpAu2BKP8lQ=; b=AripNQ7zKP/T1YXZyI44xZ7n3YBd5058aL6+34FK2llqfKIBBbuyqDrVDthz5cW6Y+Rm5y l6RRx8Ar+H8iFgCQ6FEZjVH2x8dz64XalE2v+bIgC8n5fp42aLNoffPlDcXg2vdtBOf6Bp CQVSFLzZX8LPze94bd1l21jCLawvcSliYqC5LcRi61YdjLJRDoNxbj+TQDlCaNkFX6/g4w N+mnZmoAiKuBwBXB4BCJTRGtTLM8fme752mnyOPx/oMC8jARWPjgo28Hb/FwgUmqgfR+CT tSMVFw84vIWeUOtYSo21rSjnrxklK6FcJWHMlegaj5j06fqIEa4wOt6Dy+kaqw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642176641; a=rsa-sha256; cv=none; b=BkwA4mhbVoBRCSiHoMHr+Y9vCZy0FmvNzUrngNBlcjt8lQHSjXDRQP9tTghTZIXJ2F8mcq cIhiQfarg9d59+0KVMemONgXJzVhuETrTmZmX3m2lQ6xkEUqxmfMvURoe4yu6BZDbHEE4b JK8onBWmif0ZJbTprDbysm55EdEHRNOPlT7Aff8k6K6wB03Ua3/5FbXQcqLnmbgZFVcBw3 9Ia2GI8kHRNTdZMkfAqg5trmioZ8bdLcj2weYn3agG7muUVA8B4TVhTaAvIo0o8KdubgKq dDoWZmXMJphZ1fnhn8a7jX+2wBCT6UyYlCzQaWsx9YIb4ezk4l90e3HhLJ/tzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=ae4067ce94146c6d4031b6a233389e5f553f4141 commit ae4067ce94146c6d4031b6a233389e5f553f4141 Author: Greg V AuthorDate: 2021-03-30 15:46:17 +0000 Commit: Emmanuel Vadot CommitDate: 2022-01-14 15:55:23 +0000 efifb,vbefb: implement vd_fini This removes the pmap entry when switching away to e.g. drm fb. Differential Revision: https://reviews.freebsd.org/D29020 MFC After: 1 month (cherry picked from commit 8ebda6e44bb6ac9113e2a7fe65889811d894dd63) --- sys/dev/vt/hw/efifb/efifb.c | 11 +++++++++++ sys/dev/vt/hw/vbefb/vbefb.c | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/sys/dev/vt/hw/efifb/efifb.c b/sys/dev/vt/hw/efifb/efifb.c index 3e1a793eee77..04d844cd9b70 100644 --- a/sys/dev/vt/hw/efifb/efifb.c +++ b/sys/dev/vt/hw/efifb/efifb.c @@ -50,12 +50,14 @@ __FBSDID("$FreeBSD$"); #include static vd_init_t vt_efifb_init; +static vd_fini_t vt_efifb_fini; static vd_probe_t vt_efifb_probe; static struct vt_driver vt_efifb_driver = { .vd_name = "efifb", .vd_probe = vt_efifb_probe, .vd_init = vt_efifb_init, + .vd_fini = vt_efifb_fini, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, @@ -146,3 +148,12 @@ vt_efifb_init(struct vt_device *vd) return (CN_INTERNAL); } + +static void +vt_efifb_fini(struct vt_device *vd, void *softc) +{ + struct fb_info *info = softc; + + vt_fb_fini(vd, softc); + pmap_unmapdev(info->fb_vbase, info->fb_size); +} diff --git a/sys/dev/vt/hw/vbefb/vbefb.c b/sys/dev/vt/hw/vbefb/vbefb.c index c8789e3bddac..85f594e4ed21 100644 --- a/sys/dev/vt/hw/vbefb/vbefb.c +++ b/sys/dev/vt/hw/vbefb/vbefb.c @@ -50,12 +50,14 @@ __FBSDID("$FreeBSD$"); #include static vd_init_t vt_vbefb_init; +static vd_fini_t vt_vbefb_fini; static vd_probe_t vt_vbefb_probe; static struct vt_driver vt_vbefb_driver = { .vd_name = "vbefb", .vd_probe = vt_vbefb_probe, .vd_init = vt_vbefb_init, + .vd_fini = vt_vbefb_fini, .vd_blank = vt_fb_blank, .vd_bitblt_text = vt_fb_bitblt_text, .vd_invalidate_text = vt_fb_invalidate_text, @@ -151,3 +153,12 @@ vt_vbefb_init(struct vt_device *vd) return (CN_INTERNAL); } + +static void +vt_vbefb_fini(struct vt_device *vd, void *softc) +{ + struct fb_info *info = softc; + + vt_fb_fini(vd, softc); + pmap_unmapdev(info->fb_vbase, info->fb_size); +}