Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp966184ybg; Sat, 26 Oct 2019 10:23:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqyu+cdAqGGNEV7dX5rcxV39tcJv4ENBzQdLCZN1QD/H8nnn4RiaxWKDkmWeYqnmAThCPYxf X-Received: by 2002:a05:6402:304e:: with SMTP id bu14mr7636339edb.89.1572110617482; Sat, 26 Oct 2019 10:23:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572110617; cv=none; d=google.com; s=arc-20160816; b=yAqJrPgXwpHJB0nr50Hi9ejWCOFlPJJjq1gdUE9E9YadlhaxtkqSmvewytuFTK/QK6 kBpTuD7pZVarAjSTFeDUnoJ/biDspIWcYfcKrfY+Uxo2BLPdOwLxeR0njb05N2xu6WvX AmyFmCsLwNMXweJ4ZO2Bev6hw87qyP9TnYB9VnEkDDuI357sg7vIVvyqZ/KDKn6kQiAR +39gn/YmJ7bJMq0hFDI4CK+Ika2hwvz0BQcTryX3HLFI0JIUIqhwhe/mnvD5S0pmTrbF 1iIczksXxzmOrIASACmbMmuZNAKF7/DtQwUWMQENxxzPgeImBuWzrlunOpFiRAmWO0Pb byCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XJ2OTe+YJhZKDPOKv2vH6Q6K0N8s/caGH/kB608TKt8=; b=nHn5KHef92jt4tJnN9e2ZSRnTaHrKaUYivnKcyA6/XlO/srJBKwLuoA4UZN41v1MXw DC4rCqMM/FiRkznGJJ3WdoJb+ZOFtOMKbnYNdVlFVawnjFxfBkNNcIGhun6zGU6/udTp xgpWWHZvEx7gYev76mbY4GPWmoRVWNGCuVKw9P9z0yH7ywuYyCsDd17ETY5uR9N6ySof axoYAaeIz13+kX31UnEc6MYYsyqziwItm6RhznldzgojBTPIaq4179TUp2Sdu+Fm2SvL OlkTLC9t3DBPG3xC7iEOzOAkrWUap9sbgjXNgoXBRGutalPD7MaWcMe010gG8X9VuOdK 40hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=eyLk4QNA; 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 ay24si3386425ejb.30.2019.10.26.10.23.14; Sat, 26 Oct 2019 10:23:37 -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; dkim=pass header.i=@ffwll.ch header.s=google header.b=eyLk4QNA; 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 S1726319AbfJZRTI (ORCPT + 99 others); Sat, 26 Oct 2019 13:19:08 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:38338 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726210AbfJZRTI (ORCPT ); Sat, 26 Oct 2019 13:19:08 -0400 Received: by mail-pl1-f193.google.com with SMTP id w8so3123981plq.5 for ; Sat, 26 Oct 2019 10:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XJ2OTe+YJhZKDPOKv2vH6Q6K0N8s/caGH/kB608TKt8=; b=eyLk4QNAvuzO/V4qc5beDIpydWz0nT1Z7PbayMVwyIxnU48/j0WH6rDiGC60Rm/K98 aCDKNmnmTd9UDDrUpdqZ2cdo1AvA/F07bWJgiN9HOD9eALRWv85Zi/NQCdabmHFxOnT7 AKzgjCtSK9D8lWUKV3je5GJoddOmxB4dhlIdY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XJ2OTe+YJhZKDPOKv2vH6Q6K0N8s/caGH/kB608TKt8=; b=VrkCc28pAmV+jW0B5eFvwmRcGyyfarOlEjbfH1Q8SWhH+F64WafRb/VFej9MkW3VdC 7grkqJ4NZtyps5A+uKqxTXOWqFjiKiZduf2/5rYF3pBC2HxikYXstLHOxcqda641TZ3v idzZHWy6YhkoYy2lcQAC9QL0smuA7NxiBzDtBkrTwh21bTpHG6Qkx7nzJPF75RR7Y1nr eDt77lr7LgJnnf8E0DBguvX8MSDtEGUUQahXaQKqARVPpGNvpAPwP++3d19wGgnExnXl P3HCyKmTHuJZNhhZk7P5WONB2iNUL6X4HgQikvCJirIY5HEwMkUiQ6NYBjJBmopCMBFO Wa/Q== X-Gm-Message-State: APjAAAW/Jiv8XxQ6/6J1oQGHh48Ro/dnywj9OZ4TOZAMiAhfjtttcGYv dxaL7AXwuaiKzIaQMbh0UKzQMVRWJC65h0bP7rd8Dg== X-Received: by 2002:a17:902:864a:: with SMTP id y10mr10096482plt.162.1572110347046; Sat, 26 Oct 2019 10:19:07 -0700 (PDT) MIME-Version: 1.0 References: <20191023001206.15741-1-rajatja@google.com> <20191024112040.GE2825247@ulmo> <20191025113609.GB928835@ulmo> In-Reply-To: From: Daniel Vetter Date: Sat, 26 Oct 2019 19:18:54 +0200 Message-ID: Subject: Re: [Intel-gfx] [PATCH] drm: Add support for integrated privacy screens To: Daniel Stone Cc: Thierry Reding , Rajat Jain , Sean Paul , David Airlie , dri-devel , Rajat Jain , Daniel Thompson , Jonathan Corbet , Jesse Barnes , intel-gfx , Mat King , Maxime Ripard , Duncan Laurie , Greg KH , Linux Kernel Mailing List , Pavel Machek Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Oct 26, 2019 at 1:07 PM Daniel Stone wrote: > > Hi Thierry, > > On Fri, 25 Oct 2019 at 12:36, Thierry Reding 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