From nobody Thu Feb 16 11:56:20 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 4PHYLv2LQwz3q5pG; Thu, 16 Feb 2023 11:56:23 +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 4PHYLt338mz49nJ; Thu, 16 Feb 2023 11:56:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548582; 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=aEgswwM6CU4ds85Fw96WsVl2IirxYfPENf4Pc/NCCqI=; b=IZRdEB2zECJ73+BPYLuP97t7uYab44cz3wnSV/fiKWWhCz33Ua18s8vyUrBaeElC8WsFaG tVKmdPDfr+AMcOPGtFqGWwmryIs1UvbFflfh4yk4raeh5MHP1t6QhSmJbmXWxc2T4i9jEa M8Qvh9AYlRjyIk63PiNRJuFiHAIcsi0HuQWzUIcfSMsNK2LiuWZTKRT/T1TTg+PnNRQ1d1 xrj7VUBN7G3xMvJzKurqRsFRJ8OWFW67lNipns8p+FNQKL1mEnGpPVj9X+LdLWh8h0WhrR DJ2loZ11moWNgUXQNc95APengDRrTWrEnpDz86pR0ms81zUxZQALv91099hzjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676548582; 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=aEgswwM6CU4ds85Fw96WsVl2IirxYfPENf4Pc/NCCqI=; b=AucPpUdhYMW7Q3VPpFiBYZMDlR11CzKCdhzqUgRf0zcZNRxxDbFNZAlQScrtB3bLf2NHtZ Oa2g6JNwn2Y4HC9L0eimhrSudETv4053Iv77PnkavTU+stFnBPr0WtHFAHV3EJ8e6MuP/4 PFujAOGn0LF5XRkQ6gRfPGzrzkU8b5NmE9Fgu/ybJiNQ080LHhNcZ/NyzSia9/NOw7pq7v lpHPcoAi/XeHWA1mnrdYY9CMx+Mh+/5WnpGClILCYxKvY1lIfgPWKff9kzAcvBukBPdpNb 2YEVotZPW27B4pjShCh7WYuHZX64ykE89xJtrQbvR1tQEE0yQ096j0tnfj9yyg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676548582; a=rsa-sha256; cv=none; b=j2DoV1Su5/L+DfHeIVpPlVbhpRIXxJzYOU3ew7n0SsHWg1Gix4oYsTw0MJcYRiwdqVshNR 0aHpujj7gTZ1iDYsmYZi26nJFs6zsdpMZmy/DEwr8qdJO2/EpMn42lc8M5X8E0/Al3R5LQ aLHmPR846daiwVgQRf+xXOHDdlBnwS3ueOaNqz5X+RpXT2ONG9H/tZTSKQWox/1bHcttXm QvHoXOHjydAjanUYFywuO59HaqZZ73XaXNLOOL4zNKtcMSwa2dn/lJDYzTpoeoKyXvwpOf sTWYeHUGyAC22ndxb0OWaWAy64eUkoIvC5b9pg1eDYwbGUGtRIoLDMST61ZwOA== 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 4PHYLr4bZ0z12W8; Thu, 16 Feb 2023 11:56:20 +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 31GBuKKw055980; Thu, 16 Feb 2023 11:56:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31GBuKfg055979; Thu, 16 Feb 2023 11:56:20 GMT (envelope-from git) Date: Thu, 16 Feb 2023 11:56:20 GMT Message-Id: <202302161156.31GBuKfg055979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: =?utf-8?Q?Jean-S=C3=A9bastien=20P=C3=A9dron?= Subject: git: 53c44b917c35 - stable/13 - linuxkpi: Define `backlight_get_brightness()` and `backlight_is_blank()` 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: dumbbell X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 53c44b917c35cb8df9c464717c9b8df48c2e46c9 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by dumbbell (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=53c44b917c35cb8df9c464717c9b8df48c2e46c9 commit 53c44b917c35cb8df9c464717c9b8df48c2e46c9 Author: Jean-Sébastien Pédron AuthorDate: 2023-02-08 17:51:16 +0000 Commit: Jean-Sébastien Pédron CommitDate: 2023-02-16 11:55:18 +0000 linuxkpi: Define `backlight_get_brightness()` and `backlight_is_blank()` This is not used by the DRM driver yet because we comment out the code calling them, but they are easy to implement. Reviewed by: manu Approved by: manu Differential Revision: https://reviews.freebsd.org/D38530 (cherry picked from commit a82a8a5e193587d819288c3c27f1c9472178e10e) --- sys/compat/linuxkpi/common/include/linux/backlight.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/backlight.h b/sys/compat/linuxkpi/common/include/linux/backlight.h index 9591a4b671ab..5a3c7080b55d 100644 --- a/sys/compat/linuxkpi/common/include/linux/backlight.h +++ b/sys/compat/linuxkpi/common/include/linux/backlight.h @@ -91,6 +91,13 @@ backlight_force_update(struct backlight_device *bd, int reason) bd->props.brightness = bd->ops->get_brightness(bd); } +static inline int +backlight_get_brightness(struct backlight_device *bd) +{ + + return (bd->props.brightness); +} + static inline int backlight_device_set_brightness(struct backlight_device *bd, int brightness) { @@ -119,4 +126,11 @@ backlight_disable(struct backlight_device *bd) return (backlight_update_status(bd)); } +static inline bool +backlight_is_blank(struct backlight_device *bd) +{ + + return (bd->props.power != 0/* FB_BLANK_UNBLANK */); +} + #endif /* _LINUXKPI_LINUX_BACKLIGHT_H_ */