From nobody Thu Feb 02 11:29:49 2023 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 4P6xQk098pz3cxpw; Thu, 2 Feb 2023 11:29:50 +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 4P6xQj6gjnz4Ckw; Thu, 2 Feb 2023 11:29:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675337389; 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=Z3U9ee7wIWwfQ22YJOtBTzgcfrdYXBZ+7SvFNxKyUKU=; b=i6A+X9BvNeKprSKK5IgrgHqD7fhpGHzHpZBwqYspoY83an2gxiuWMBbQQeQZH05hUTx1y8 dIHelXkF5551EJFY5Qxf1qp8x7fr2kuhCiyeyzR7VB7zzurDURBb2vMt61zm+vR2T6HbsY WK98/71fvqCQC3mSgX5KAtb2/wlzoAwJmnvai3m8wOtN6Ti6Oy46oiB/I/gTBkbM2K0pw3 5Z2qnPH10lwU3okvUocK/K0Z1Y0R5/u9uD6NSKwYw5nwteATVC64TcxmRXSaowgKJ4UrQJ GdOFr036KWTpTBQ4e2BjnPQANKIzwcs0WAx4DXfYt7P9hwWHYePPIkGdr72CPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675337389; 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=Z3U9ee7wIWwfQ22YJOtBTzgcfrdYXBZ+7SvFNxKyUKU=; b=kkBFKADwDnRz3ubFUBg5PTdATakjd5gkb+aKNutsGOEuf6pPw1bhADg+Vzr97JnfPrQsTa Z6GT6cub8dVBgVv+Qvmyr6GxEmmQGa4btbOHZhTyEVRrlp+zaZveqBAdXKSfUgpItzRa/Y PiOAuzSzkOsiX5f+lBhOmQrRJozrVz0JYpyDan37tw0kKJu9JF4Ui+7tuYIoqWsuhm+jRS DqFmlZo1T+UnhMkeW9sql5K8W4NqhLQsfS5Sj+6p0SxsZzc4VWKhEazfZNO7Xvxj38WYcc Qh8aJmWKn/mA/xhK9YS/jeDfWg//fh9LG3/izzApv/HUwIhj/j57luElF0X1Ww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675337389; a=rsa-sha256; cv=none; b=sOCCd122MERO4Hlj25I1wYkxxgWAC2igkCVM8IGl1g1F5Uj6ztQLaY2aPx10wneNUd8chV qLSu+MFfL6X26KbB24SaKkIKRj3nEmzh3lTTQIPSDpXQWmtI7/efrEzYBqxRzO5n1icNa7 NJHwV8G/8HCNmGruhXnRKLzqliAdUTNqdLw5u78V3Bm/yHAEJyo+fbYf6ch73kz5M92jrh FNhknxZxnuXiz8j+u4KTpV4iH+iVpkLwqLz0lYMy9pzoiG6DKeVBDkBcK92tegQ2iY6OIt yt9c8DsM2yJTLGwdEDk2+dmsqr0kq3aKYMWzZxmvSWtI8GwZuM6uvcrgrvEXSw== 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 4P6xQj5dNSzsbJ; Thu, 2 Feb 2023 11:29:49 +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 312BTnnV091773; Thu, 2 Feb 2023 11:29:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 312BTnJo091772; Thu, 2 Feb 2023 11:29:49 GMT (envelope-from git) Date: Thu, 2 Feb 2023 11:29:49 GMT Message-Id: <202302021129.312BTnJo091772@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: 01a14c88d9fb - stable/13 - fb: Add a default getinfo method 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: manu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 01a14c88d9fb5bb209b869512d31cdf512fbb433 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=01a14c88d9fb5bb209b869512d31cdf512fbb433 commit 01a14c88d9fb5bb209b869512d31cdf512fbb433 Author: Emmanuel Vadot AuthorDate: 2022-06-21 13:52:49 +0000 Commit: Emmanuel Vadot CommitDate: 2023-02-02 11:28:47 +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 (cherry picked from commit 3cbf6518d6eea08e0fbe6d7c609debac5ab31992) --- 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;