From nobody Sat Feb 17 21:32:34 2024 X-Original-To: dev-commits-src-all@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 4Tchpp5q2pz59knf; Sat, 17 Feb 2024 21:32:34 +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 4Tchpp4JhCz4gFM; Sat, 17 Feb 2024 21:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205554; 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=HP5mXuES5hm69BC8SuM3C4ahaBhSschnL0F1NbKAT8A=; b=X/QcbopqyJ0TC1rGes3GBPhqFkq8CfEYiNq8KiAGgoYdtb+J2W6pPAk4HyTO0vPUH017YR xuNpeFOCpqAmjo7oyO1GKy4mm0eWOHQdRM7dZBw1tnI+PT4RnM+0nlWOawimjxuK2QJJAP FQ6UNBayOMeSOwG9SP/S3bGf6RL+3oa3Cn9iR8QmhXsWvOA7YLB9GNuWCgpH1f+OeXPG+0 bgXfN8C+DGvBO5u+7XWRMbn6RVlJEJ6sTcNFEZ/FSlQPq8sKzwEpTgZDDTQygZF/HDWKn2 15/Dz8N92cABNifUPFNGFE0RJEKqF6jcVkI40zMA/kURf+rt0iftUfMNscHarA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1708205554; 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=HP5mXuES5hm69BC8SuM3C4ahaBhSschnL0F1NbKAT8A=; b=nRgXksQWg+ZTn7pMc8m461oV05EDXIAyAqx5JPyjVYfGF/cyebZ9aac6eM7rxVaF/mfGDs VIsqaJHP2jmDXSrrpzeDGVerkcE3c7uCaFGlEilAcS3y7f2d1XL2qfphdmBazaqTwNb9Vi bzjdPmYoAB/ssMLPoAUtdTN3/P9q0iOjKbdpKSTa0IzARoQij2Hbs/nUp6dlPEeOzkmUJp 23iFdgLfo8QyOBtVYVIyNYJwi0OGII7hsLrmWIgZMFp3bhvhg/AXmAZQTQJfd0AvaUpGZw cyzX6Dd97fTPqFSrMr58RVzLM0isf33q5uiHQIwypQRxD7/BfuIf/tHih7fhww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1708205554; a=rsa-sha256; cv=none; b=QPW2Tv+UH3T38VbwI0hx5q6r/8LwJl68qgBr4kPKjFRX9P4pR5X1G4jhxVxPv3fgnOAObD Qri8u/d4Bg4rVDC8M6FNc9UrZrZhov2tKE7V2dS27U0g49SrQFiFAhBPe8iJ/D7aF8K3Px 2XBvYZmhMhkJJCVCbP4RBPKCMuqdbrQMG2FAsLUG+w+y4MGTcpQFb7uGGxbi2XHVznJ1qN V6i7e8gSS05GM8Og3eDToyUUfV3xQ44zLt+CCwvdczfPUevGAMaejbQyNdFbXa/biRiTv2 RENoWXbK8fCI1sqSQ7bsnHUW2E9BP8UkkpZMrzrMWHf5niz4miLh/qOKwER3Ng== 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 4Tchpp3QbGzPZR; Sat, 17 Feb 2024 21:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 41HLWYOx019747; Sat, 17 Feb 2024 21:32:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 41HLWYAB019744; Sat, 17 Feb 2024 21:32:34 GMT (envelope-from git) Date: Sat, 17 Feb 2024 21:32:34 GMT Message-Id: <202402172132.41HLWYAB019744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: a06b366322fe - stable/14 - vt(4): Call post-switch callback after replacing the backend List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a06b366322fe22b211c16c2b0977fac313dce4e7 Auto-Submitted: auto-generated The branch stable/14 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=a06b366322fe22b211c16c2b0977fac313dce4e7 commit a06b366322fe22b211c16c2b0977fac313dce4e7 Author: Jean-Sébastien Pédron AuthorDate: 2023-11-29 18:34:48 +0000 Commit: Vladimir Kondratyev CommitDate: 2024-02-17 20:58:35 +0000 vt(4): Call post-switch callback after replacing the backend [Why] For instance, it gives a chance to the new backend to refresh the screen. This is needed by the vt_drmfb backend and `drm_fb_helper`. This change was lost when I posted changes to reviews.freebsd.org and it broken the amdgpu driver... Thanks to manu@ for reporting the problem and wulf@ to find out the missing change! Tested by: manu Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D42834 (cherry picked from commit 40c20fc29cad4d38d9a565e9c7ba78612097308e) --- sys/dev/vt/vt_core.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index 4a1031f1aa69..797af56e5e1d 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -3284,6 +3284,13 @@ vt_replace_backend(const struct vt_driver *drv, void *softc) /* Update windows sizes and initialize last items. */ vt_upgrade(vd); + /* + * Give a chance to the new backend to run the post-switch code, for + * instance to refresh the screen. + */ + if (vd->vd_driver->vd_postswitch) + vd->vd_driver->vd_postswitch(vd); + #ifdef DEV_SPLASH if (vd->vd_flags & VDF_SPLASH) vtterm_splash(vd);