From nobody Tue Jun 21 13:55:55 2022 X-Original-To: dev-commits-src-main@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 966D585B39E; Tue, 21 Jun 2022 13:55:55 +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 4LS7Mb3vMyz4RsD; Tue, 21 Jun 2022 13:55:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655819755; 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=DowJYpENNsD30/wlsNN7gbkSXxEuLdU7CI502Cnomv8=; b=G89f7Lmiz0RWUWrACT/ofCIRzx3hdrSGb+z57PlskAe5+4SHfSp9/Mhzp5zoSiJl6rnCRZ sVbJ9QWDKo7bD5kvrrBsPU4Wu0QSXsnA8HK4pO6BbqwxyhjdjaTAxB0gv347tH/IdDZ4TX d1j7lTdLflvwhZmqLAiFH/WfzO1eCYSbo5zvFgMItpgSvh5SI967/KvfnMJcYJ5tN1wRh8 +q5ndaatL1ZZBk5DUK4xVF+r4tHaO0APQKQ6TB7zknZPeG/xhsus2/nzw9zpQ9l9Nl2LwO ugjY7UZofIfybBiEYRo60UzpX5UF6FEAy5ztkf2iqPDlSkw5PCo3mlokL3E+Fg== 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 4C6CC13309; Tue, 21 Jun 2022 13:55:55 +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 25LDttfg040649; Tue, 21 Jun 2022 13:55:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 25LDtt7M040648; Tue, 21 Jun 2022 13:55:55 GMT (envelope-from git) Date: Tue, 21 Jun 2022 13:55:55 GMT Message-Id: <202206211355.25LDtt7M040648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 3cbf6518d6ee - main - fb: Add a default getinfo method List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 3cbf6518d6eea08e0fbe6d7c609debac5ab31992 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1655819755; 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=DowJYpENNsD30/wlsNN7gbkSXxEuLdU7CI502Cnomv8=; b=HjNeEi5G3HhehaNpaGzzazDroLm51QXftJCLrZF15ONzX2VKmdFxjtww+S0iLIbVsLUvLE sksUP1nOnRsmEimxwLzAWIbLxC+w3nnL7qpOyxq/57+OvUBGCcWRMYdCBTR7R5BNKVfYCC BBu/Lom3gv4fhpYwaC+MNpQJ4KRpBemggNlFcli7zU+GgjYXwEooMvseAxTtF0jpUhfgLa trlh2SogGKcpNRiqhnrR2V+A3Rnn+HLT5rp8TdfNGZSrRijYZS5PJQa/VXUTFdKQ8gd2p9 OktE0uIMWhEAuRGtKVJ1cHnXuwhT/rKJW4Q2jK2/tSCkTbpJ0lnuykIKFxNPuQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1655819755; a=rsa-sha256; cv=none; b=TCXI7iQhb/HyT4slcpmq5GjMCiQyAQbN5Y7JV9Gk72FBpsXNwTUbFnDE5x5XvvREBCnDGA +h153FJDmJx7wATMSRVL+NBPtTzOgIsbq59aRglc13zqnheAVXQNjv/GUTT6MPecwHZS8R Au3Bw5vc/4Fu0bkLGeYr1SGnAExKo4IdrmafepoA16aI9TWnhovWVn+k4O14UV8ubKajYp OaZVbqJlJAbvgi94t3yHAOq2mHcNI8Zk4jIja0yYekFyaE99uEWMG/cWuAsCKDgsXxfbDR k1RgFvZEd0wGF+BTLPogYTBl4nciqxwqP5U+abWSiN6fdv8ZtRkKKN0d67RTFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=3cbf6518d6eea08e0fbe6d7c609debac5ab31992 commit 3cbf6518d6eea08e0fbe6d7c609debac5ab31992 Author: Emmanuel Vadot AuthorDate: 2022-06-21 13:52:49 +0000 Commit: Emmanuel Vadot CommitDate: 2022-06-21 13:52:49 +0000 fb: Add a default getinfo method fb_getinfo is badly designed as it returns either the info if the driver have the method or ENXIO via the kobj stuff if the driver doesn't have it. Add a default method that returns NULL as the code already checks this and it avoid changing the interface. None of the drm drivers supported have this method and it sometimes fails and panic when loading them (for now only usb-c docks seems to be affected). MFC after: 3 days Sponsored by: Beckhoff Automation GmbH & Co. KG --- sys/dev/fb/fb_if.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/dev/fb/fb_if.m b/sys/dev/fb/fb_if.m index 53e4563bb6f5..938cececa409 100644 --- a/sys/dev/fb/fb_if.m +++ b/sys/dev/fb/fb_if.m @@ -3,6 +3,14 @@ INTERFACE fb; +CODE { + static struct fb_info * + fb_default_getinfo(device_t dev) + { + return (NULL); + } +}; + METHOD struct fb_info * getinfo { device_t dev; -}; +} DEFAULT fb_default_getinfo;