All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Rajat Jain <rajatxjain@gmail.com>,
	Sean Paul <seanpaul@google.com>, David Airlie <airlied@linux.ie>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Rajat Jain <rajatja@google.com>,
	Daniel Thompson <daniel.thompson@linaro.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Jesse Barnes <jsbarnes@google.com>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Mat King <mathewk@google.com>, Maxime Ripard <mripard@kernel.org>,
	Duncan Laurie <dlaurie@google.com>,
	Greg KH <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Pavel Machek <pavel@denx.de>
Subject: Re: [Intel-gfx] [PATCH] drm: Add support for integrated privacy screens
Date: Sat, 26 Oct 2019 19:18:54 +0200	[thread overview]
Message-ID: <CAKMK7uGjd1CJ+XDWPQShV_fADC5ndxdf_ecO61K4VDi6EZyMEQ@mail.gmail.com> (raw)
In-Reply-To: <CAPj87rNe20nFcFNcijFwOZLQU_E+C2HyzEjtigJ-ehiLCq42iA@mail.gmail.com>

On Sat, Oct 26, 2019 at 1:07 PM Daniel Stone <daniel@fooishbar.org> wrote:
>
> Hi Thierry,
>
> On Fri, 25 Oct 2019 at 12:36, Thierry Reding <thierry.reding@gmail.com> wrote:
> > On Thu, Oct 24, 2019 at 01:45:16PM -0700, Rajat Jain wrote:
> > > I did think about having a state variable in software to get and set
> > > this. However, I think it is not very far fetched that some platforms
> > > may have "hardware kill" switches that allow hardware to switch
> > > privacy-screen on and off directly, in addition to the software
> > > control that we are implementing. Privacy is a touchy subject in
> > > enterprise, and anything that reduces the possibility of having any
> > > inconsistency between software state and hardware state is desirable.
> > > So in this case, I chose to not have a state in software about this -
> > > we just report the hardware state everytime we are asked for it.
> >
> > So this doesn't really work with atomic KMS, then. The main idea behind
> > atomic KMS is that you apply a configuration either completely or not at
> > all. So at least for setting this property you'd have to go through the
> > state object.
> >
> > Now, for reading out the property you might be able to get away with the
> > above. I'm not sure if that's enough to keep the state up-to-date,
> > though. Is there some way for a kill switch to trigger an interrupt or
> > other event of some sort so that the state could be kept up-to-date?
> >
> > Daniel (or anyone else), do you know of any precedent for state that
> > might get modified behind the atomic helpers' back? Seems to me like we
> > need to find some point where we can actually read back the current
> > "hardware value" of this privacy screen property and store that back
> > into the state.
>
> Well, apart from connector state, though that isn't really a property
> as such, there's the link_state property, which is explicitly designed
> to do just that. That has been quite carefully designed for the
> back-and-forth though.

connector state is an immutable property, which is a hilarious way to
say that "only the driver can update it, userspace only reads it". So
not a good template here. But yeah link_state is a good example of
what we need here.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	Duncan Laurie <dlaurie@google.com>,
	Rajat Jain <rajatxjain@gmail.com>,
	Sean Paul <seanpaul@google.com>, Jonathan Corbet <corbet@lwn.net>,
	David Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Mat King <mathewk@google.com>,
	Thierry Reding <thierry.reding@gmail.com>,
	Pavel Machek <pavel@denx.de>, Rajat Jain <rajatja@google.com>,
	Jesse Barnes <jsbarnes@google.com>
Subject: Re: [Intel-gfx] [PATCH] drm: Add support for integrated privacy screens
Date: Sat, 26 Oct 2019 19:18:54 +0200	[thread overview]
Message-ID: <CAKMK7uGjd1CJ+XDWPQShV_fADC5ndxdf_ecO61K4VDi6EZyMEQ@mail.gmail.com> (raw)
In-Reply-To: <CAPj87rNe20nFcFNcijFwOZLQU_E+C2HyzEjtigJ-ehiLCq42iA@mail.gmail.com>

On Sat, Oct 26, 2019 at 1:07 PM Daniel Stone <daniel@fooishbar.org> wrote:
>
> Hi Thierry,
>
> On Fri, 25 Oct 2019 at 12:36, Thierry Reding <thierry.reding@gmail.com> wrote:
> > On Thu, Oct 24, 2019 at 01:45:16PM -0700, Rajat Jain wrote:
> > > I did think about having a state variable in software to get and set
> > > this. However, I think it is not very far fetched that some platforms
> > > may have "hardware kill" switches that allow hardware to switch
> > > privacy-screen on and off directly, in addition to the software
> > > control that we are implementing. Privacy is a touchy subject in
> > > enterprise, and anything that reduces the possibility of having any
> > > inconsistency between software state and hardware state is desirable.
> > > So in this case, I chose to not have a state in software about this -
> > > we just report the hardware state everytime we are asked for it.
> >
> > So this doesn't really work with atomic KMS, then. The main idea behind
> > atomic KMS is that you apply a configuration either completely or not at
> > all. So at least for setting this property you'd have to go through the
> > state object.
> >
> > Now, for reading out the property you might be able to get away with the
> > above. I'm not sure if that's enough to keep the state up-to-date,
> > though. Is there some way for a kill switch to trigger an interrupt or
> > other event of some sort so that the state could be kept up-to-date?
> >
> > Daniel (or anyone else), do you know of any precedent for state that
> > might get modified behind the atomic helpers' back? Seems to me like we
> > need to find some point where we can actually read back the current
> > "hardware value" of this privacy screen property and store that back
> > into the state.
>
> Well, apart from connector state, though that isn't really a property
> as such, there's the link_state property, which is explicitly designed
> to do just that. That has been quite carefully designed for the
> back-and-forth though.

connector state is an immutable property, which is a hilarious way to
say that "only the driver can update it, userspace only reads it". So
not a good template here. But yeah link_state is a good example of
what we need here.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	Duncan Laurie <dlaurie@google.com>,
	Rajat Jain <rajatxjain@gmail.com>,
	Sean Paul <seanpaul@google.com>, Jonathan Corbet <corbet@lwn.net>,
	David Airlie <airlied@linux.ie>,
	Greg KH <gregkh@linuxfoundation.org>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Mat King <mathewk@google.com>, Maxime Ripard <mripard@kernel.org>,
	Pavel Machek <pavel@denx.de>, Rajat Jain <rajatja@google.com>,
	Jesse Barnes <jsbarnes@google.com>
Subject: Re: [Intel-gfx] [PATCH] drm: Add support for integrated privacy screens
Date: Sat, 26 Oct 2019 19:18:54 +0200	[thread overview]
Message-ID: <CAKMK7uGjd1CJ+XDWPQShV_fADC5ndxdf_ecO61K4VDi6EZyMEQ@mail.gmail.com> (raw)
Message-ID: <20191026171854.9yDaFybrjx20iCGSGFcelvXRdJetYMx8IfHKJZj6Cv4@z> (raw)
In-Reply-To: <CAPj87rNe20nFcFNcijFwOZLQU_E+C2HyzEjtigJ-ehiLCq42iA@mail.gmail.com>

On Sat, Oct 26, 2019 at 1:07 PM Daniel Stone <daniel@fooishbar.org> wrote:
>
> Hi Thierry,
>
> On Fri, 25 Oct 2019 at 12:36, Thierry Reding <thierry.reding@gmail.com> wrote:
> > On Thu, Oct 24, 2019 at 01:45:16PM -0700, Rajat Jain wrote:
> > > I did think about having a state variable in software to get and set
> > > this. However, I think it is not very far fetched that some platforms
> > > may have "hardware kill" switches that allow hardware to switch
> > > privacy-screen on and off directly, in addition to the software
> > > control that we are implementing. Privacy is a touchy subject in
> > > enterprise, and anything that reduces the possibility of having any
> > > inconsistency between software state and hardware state is desirable.
> > > So in this case, I chose to not have a state in software about this -
> > > we just report the hardware state everytime we are asked for it.
> >
> > So this doesn't really work with atomic KMS, then. The main idea behind
> > atomic KMS is that you apply a configuration either completely or not at
> > all. So at least for setting this property you'd have to go through the
> > state object.
> >
> > Now, for reading out the property you might be able to get away with the
> > above. I'm not sure if that's enough to keep the state up-to-date,
> > though. Is there some way for a kill switch to trigger an interrupt or
> > other event of some sort so that the state could be kept up-to-date?
> >
> > Daniel (or anyone else), do you know of any precedent for state that
> > might get modified behind the atomic helpers' back? Seems to me like we
> > need to find some point where we can actually read back the current
> > "hardware value" of this privacy screen property and store that back
> > into the state.
>
> Well, apart from connector state, though that isn't really a property
> as such, there's the link_state property, which is explicitly designed
> to do just that. That has been quite carefully designed for the
> back-and-forth though.

connector state is an immutable property, which is a hilarious way to
say that "only the driver can update it, userspace only reads it". So
not a good template here. But yeah link_state is a good example of
what we need here.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-26 17:19 UTC|newest]

Thread overview: 104+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  0:12 [PATCH] drm: Add support for integrated privacy screens Rajat Jain
2019-10-23  0:12 ` [Intel-gfx] " Rajat Jain
2019-10-23  0:12 ` Rajat Jain
2019-10-23  9:21 ` Daniel Vetter
2019-10-23  9:21   ` [Intel-gfx] " Daniel Vetter
2019-10-23  9:21   ` Daniel Vetter
2019-10-23  9:21   ` Daniel Vetter
2019-10-24  1:48 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2019-10-24  1:48   ` [Intel-gfx] " Patchwork
2019-10-24  7:01   ` Jani Nikula
2019-10-24  7:01     ` [Intel-gfx] " Jani Nikula
2019-10-24 18:18     ` Rajat Jain
2019-10-24 18:18       ` [Intel-gfx] " Rajat Jain
2019-10-24 11:06 ` [PATCH] " Pavel Machek
2019-10-24 11:06   ` [Intel-gfx] " Pavel Machek
2019-10-24 11:06   ` Pavel Machek
2019-10-24 11:06   ` Pavel Machek
2019-10-24 11:20 ` Thierry Reding
2019-10-24 11:20   ` [Intel-gfx] " Thierry Reding
2019-10-24 11:20   ` Thierry Reding
2019-10-24 20:45   ` Rajat Jain
2019-10-24 20:45     ` Rajat Jain
2019-10-24 20:45     ` Rajat Jain
2019-10-25 11:36     ` Thierry Reding
2019-10-25 11:36       ` [Intel-gfx] " Thierry Reding
2019-10-25 11:36       ` Thierry Reding
2019-10-25 19:00       ` Rajat Jain
2019-10-25 19:00         ` [Intel-gfx] " Rajat Jain
2019-10-25 19:00         ` Rajat Jain
2019-10-25 19:00         ` Rajat Jain
2019-10-25 19:03       ` Daniel Vetter
2019-10-25 19:03         ` [Intel-gfx] " Daniel Vetter
2019-10-25 19:03         ` Daniel Vetter
2019-10-25 19:03         ` Daniel Vetter
2019-10-28  8:12         ` Pekka Paalanen
2019-10-28  8:12           ` [Intel-gfx] " Pekka Paalanen
2019-10-28  8:12           ` Pekka Paalanen
2019-10-26 11:07       ` [Intel-gfx] " Daniel Stone
2019-10-26 11:07         ` Daniel Stone
2019-10-26 11:07         ` Daniel Stone
2019-10-26 17:18         ` Daniel Vetter [this message]
2019-10-26 17:18           ` Daniel Vetter
2019-10-26 17:18           ` Daniel Vetter
2019-10-24 18:57 ` kbuild test robot
2019-10-24 18:57   ` kbuild test robot
2019-10-24 18:57   ` [Intel-gfx] " kbuild test robot
2019-10-24 18:57   ` kbuild test robot
2019-10-24 18:57   ` kbuild test robot
2019-10-24 19:44 ` kbuild test robot
2019-10-24 19:44   ` kbuild test robot
2019-10-24 19:44   ` [Intel-gfx] " kbuild test robot
2019-10-24 19:44   ` kbuild test robot
2019-10-24 19:44   ` kbuild test robot
2019-11-04 19:41 ` [PATCH v2 1/3] drm/i915: Move the code to populate ACPI device ID into intel_acpi Rajat Jain
2019-11-04 19:41   ` [Intel-gfx] " Rajat Jain
2019-11-04 19:41   ` Rajat Jain
2019-11-04 19:41   ` Rajat Jain
2019-11-04 19:41   ` [PATCH v2 2/3] drm/i915: Lookup and attach ACPI device node for connectors Rajat Jain
2019-11-04 19:41     ` [Intel-gfx] " Rajat Jain
2019-11-04 19:41     ` Rajat Jain
2019-11-04 19:41     ` Rajat Jain
2019-11-20 14:50     ` Jani Nikula
2019-11-20 14:50       ` [Intel-gfx] " Jani Nikula
2019-11-20 14:50       ` Jani Nikula
2019-11-20 14:50       ` Jani Nikula
2019-12-05  9:34       ` Rajat Jain
2019-12-05  9:34         ` [Intel-gfx] " Rajat Jain
2019-12-05  9:34         ` Rajat Jain
2019-11-04 19:41   ` [PATCH v2 3/3] drm/i915: Add support for integrated privacy screens Rajat Jain
2019-11-04 19:41     ` [Intel-gfx] " Rajat Jain
2019-11-04 19:41     ` Rajat Jain
2019-11-04 19:41     ` Rajat Jain
2019-11-12 19:12     ` Rajat Jain
2019-11-12 19:12       ` [Intel-gfx] " Rajat Jain
2019-11-12 19:12       ` Rajat Jain
2019-11-12 19:12     ` Rajat Jain
2019-11-12 19:12       ` [Intel-gfx] " Rajat Jain
2019-11-12 19:12       ` Rajat Jain
2019-11-12 19:12       ` Rajat Jain
2019-11-20 15:10       ` Jani Nikula
2019-11-20 15:10         ` [Intel-gfx] " Jani Nikula
2019-11-20 15:10         ` Jani Nikula
2019-11-20 15:10         ` Jani Nikula
2019-11-20 21:35         ` Rajat Jain
2019-11-20 21:35           ` [Intel-gfx] " Rajat Jain
2019-11-20 21:35           ` Rajat Jain
2019-11-20 21:35           ` Rajat Jain
2019-11-20 15:04     ` Jani Nikula
2019-11-20 15:04       ` [Intel-gfx] " Jani Nikula
2019-11-20 15:04       ` Jani Nikula
2019-11-20 15:04       ` Jani Nikula
2019-12-05  9:34       ` Rajat Jain
2019-12-05  9:34         ` [Intel-gfx] " Rajat Jain
2019-12-05  9:34         ` Rajat Jain
2019-12-20 20:39         ` Rajat Jain
2019-12-20 20:39           ` [Intel-gfx] " Rajat Jain
2019-12-20 20:39           ` Rajat Jain
2019-11-20 14:40   ` [PATCH v2 1/3] drm/i915: Move the code to populate ACPI device ID into intel_acpi Jani Nikula
2019-11-20 14:40     ` [Intel-gfx] " Jani Nikula
2019-11-20 14:40     ` Jani Nikula
2019-11-20 14:40     ` Jani Nikula
2019-12-05  9:34     ` Rajat Jain
2019-12-05  9:34       ` [Intel-gfx] " Rajat Jain
2019-12-05  9:34       ` Rajat Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKMK7uGjd1CJ+XDWPQShV_fADC5ndxdf_ecO61K4VDi6EZyMEQ@mail.gmail.com \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=corbet@lwn.net \
    --cc=daniel.thompson@linaro.org \
    --cc=daniel@fooishbar.org \
    --cc=dlaurie@google.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jsbarnes@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathewk@google.com \
    --cc=mripard@kernel.org \
    --cc=pavel@denx.de \
    --cc=rajatja@google.com \
    --cc=rajatxjain@gmail.com \
    --cc=seanpaul@google.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.