Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp561864ybn; Wed, 2 Oct 2019 02:34:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqw8jaZwpPKWrJ19Bkl+E/gCnSoMnnqk6uHOcyA81Ic02ijCyGPsAaS94nSncMhykswpkC03 X-Received: by 2002:a17:906:e297:: with SMTP id gg23mr2083962ejb.47.1570008842814; Wed, 02 Oct 2019 02:34:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570008842; cv=none; d=google.com; s=arc-20160816; b=vF1R8VH18hYDq9xr0P6vsGLFCHcID+sRMQVxfd8ZvzIl4kvdLt7T65buVFbTqNxc/A zTchWv+nxXyd4IugqdfGxjw7N5A3krTi9EGyxlgbNYMcd12xoFOj5XNXWhZn0rGoQQHd 16aMdNZgWCELUPEJMJMBUd1uaNiJ/eOZUutX8F0ch9sv6+S0Lb0URT4aciTcP1RcaUhw +JAblCR6mXAr5+b6paB+1BFlmG+DBsebiFZC/zMTFjHk2jGUfYXv0KqKtysRB/MrhQa+ 2HZUOgof+YndM7GxMtw+K9tfUQqNS3jyOWC7SlNQlWHR7X3seJybKWGj8PKD7mfLsKGb VPmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from; bh=Zx/NoK1FSVwZZ983jLFSeq/yLMzZcx5NCRAWjhlOpmo=; b=NqiGe5BBDFiPj/9s2Dw1a3NvCYkkJKFfOiFsPCUWURqdlmSPDhxHGLsbhE9zf578Fn 43EZk9Ap0ImmzAgblgOTKrq1JlMnTytLUZgvu0DMnbANSJS6IWisNJwrZHf19kVRMpmb DAhGmZOJ9JcDwxE8vaeFCmDmersHfJVzO9AVnhH+11417w811qVWTfnOgUBwGtTTqWmz N0Ijosi82KHOlEwy0wVGIYyXWUvfhQ3Y/DsBS6sUDE1o+Qy+hgQog5aWtCGbNawrdb60 3xvMnTbpUZdH0CY9X01VBoQFMYlaG603edCmeq0nUEMhxvFLnmsU9Z8ib7vnf154POQG Y1ig== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v5si11936257ede.126.2019.10.02.02.33.38; Wed, 02 Oct 2019 02:34:02 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727226AbfJBJaO (ORCPT + 99 others); Wed, 2 Oct 2019 05:30:14 -0400 Received: from mga01.intel.com ([192.55.52.88]:24263 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726709AbfJBJaO (ORCPT ); Wed, 2 Oct 2019 05:30:14 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2019 02:30:13 -0700 X-IronPort-AV: E=Sophos;i="5.64,574,1559545200"; d="scan'208";a="181985963" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Oct 2019 02:30:09 -0700 From: Jani Nikula To: Mat King , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: Daniel Thompson , rafael@kernel.org, gregkh@linuxfoundation.org, Ross Zwisler , Jingoo Han , Rajat Jain , Lee Jones , Ville =?utf-8?B?U3lyasOkbMOk?= Subject: Re: New sysfs interface for privacy screens In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: Date: Wed, 02 Oct 2019 12:30:05 +0300 Message-ID: <87h84rbile.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 01 Oct 2019, Mat King wrote: > Resending in plain text mode > > 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. > > 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. > > 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. > > Example: > > # get privacy screen state > cat /sys/class/privacy_screen/cros_privacy/privacy_state # 1: privacy > enabled 0: privacy disabled > > # set privacy enabled > echo 1 > /sys/class/privacy_screen/cros_privacy/privacy_state > > Does this approach seem to be reasonable? What part of the userspace would be managing the privacy screen? Should there be a connection between the display and the privacy screen that covers the display? How would the userspace make that connection if it's a sysfs interface? I don't know how the privacy screen operates, but if it draws any power, you'll want to disable it when you switch off the display it covers. If the privacy screen control was part of the graphics subsystem (say, a DRM connector property, which feels somewhat natural), I think it would make it easier for userspace to have policies such as enabling the privacy screen automatically depending on the content you're viewing, but only if the content is on the display that has a privacy screen. BR, Jani. -- Jani Nikula, Intel Open Source Graphics Center