Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3061036ybp; Sun, 6 Oct 2019 04:01:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqzZNv/ZQEDK29XEaAGa5zoZ1gmOeZ9JY7vCj3h9J/aLspRsF1dh2Pwcs/5WstFe9AJuVkb6 X-Received: by 2002:a17:906:5ad8:: with SMTP id x24mr19253069ejs.107.1570359704300; Sun, 06 Oct 2019 04:01:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570359704; cv=none; d=google.com; s=arc-20160816; b=vG2Vz7kbWuQREJ/0yMpmve5xofxDdXZ04eEJEnPv2ZWCOPBp5UyFLPAGfnXRHfpiGw D+e47UkJCt1xDdFZxHKk6SKmW/aA6BwYQz+E3lbI5Yn6mrgrCwIyhtbUkZrJJY630jce pzBDZvSBjcrM0UElWdhuHrUUygxzyl1gOXJQz8YZQBlVHKwEDPyBD32mLXi5XsIVIzFp OV775BQX9mtKLY3K4xb8n8urWPlMDhwS4WRmVCXk7Vypib/OqnaB0xD2KUi2CnSZ2u/3 CaeJZoRdGX15VFqdoZhJJ19WC0UzfMxFevz6VsXVfZLYjy7em+zwWsL7EcdT9wL3KM4j EN4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=QUKB5PiFyiyj7wPCFr9damMVeD8XILcCyuj2pUAviNc=; b=CiyDtDmSBfCk+8d6P2IUB7wsmnkynO8U+sdZs0GRlymArJEyHZISRT3vAh+OZNbw7X 1yiZpLZX5xGopzmjkC4atcEkn1pFzuyQqEK31JnS2o0P/O2oBN2WMvKgMRKQIuzKfjvE l8psEccCV/521cg/AkLDaoazu2/ppMf2rMkGO3YioB4E57KiLYgZ9Mp5tQ/VRh6aQYKo Zk+1YaFXxFfkMyj3RKWxMTv7fSEdy1JdIw+5i3vPdTdUfOyWxeP60bm/QrMcAeFz8e8Z LtjXq6SelLUjeXEIGenBA4c0noFTulHqrkp1ErWlHPw5FfRpOupHUfzOCUbvGItAGGR+ fzDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si7735961edj.201.2019.10.06.04.01.21; Sun, 06 Oct 2019 04:01:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726454AbfJFK6y (ORCPT + 99 others); Sun, 6 Oct 2019 06:58:54 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:43470 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726250AbfJFK6y (ORCPT ); Sun, 6 Oct 2019 06:58:54 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id CF2FC80471; Sun, 6 Oct 2019 12:58:35 +0200 (CEST) Date: Sun, 6 Oct 2019 12:58:50 +0200 From: Pavel Machek To: Mat King Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, gregkh@linuxfoundation.org, rafael@kernel.org, Ross Zwisler , Rajat Jain , Lee Jones , Daniel Thompson , Jingoo Han Subject: Re: New sysfs interface for privacy screens Message-ID: <20191006105850.GA24605@amd> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue 2019-10-01 10:09:46, Mat King wrote: > Resending in plain text mode >=20 > I have been looking into adding Linux support for electronic privacy > screens which is a feature on some new laptops which is built into the > display and allows users to turn it on instead of needing to use a > physical privacy filter. In discussions with my colleagues the idea of > using either /sys/class/backlight or /sys/class/leds but this new > feature does not seem to quite fit into either of those classes. Thank you for not trying to push it as a LED ;-). > I am proposing adding a class called "privacy_screen" to interface > with these devices. The initial API would be simple just a single > property called "privacy_state" which when set to 1 would mean that > privacy is enabled and 0 when privacy is disabled. >=20 > Current known use cases will use ACPI _DSM in order to interface with > the privacy screens, but this class would allow device driver authors > to use other interfaces as well. >=20 > Example: >=20 > # get privacy screen state > cat /sys/class/privacy_screen/cros_privacy/privacy_state # 1: privacy > enabled 0: privacy disabled >=20 > # set privacy enabled > echo 1 > /sys/class/privacy_screen/cros_privacy/privacy_state >=20 > Does this approach seem to be reasonable? Not really. How does the userland know which displays this will affect? This sounds like something that should go through drm drivers, probably to be selected by xrandr, rather than separate file somewhere in sysfs. Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --liOOAslEiF7prFVr Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl2ZyOoACgkQMOfwapXb+vIIUACeJ2pN1CHDcsdh0BG2KltFUGBJ sOEAn1IE5e0NufSQ0G4RhwqmtYb04UbY =Loez -----END PGP SIGNATURE----- --liOOAslEiF7prFVr--