From: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Michal Wajdeczko <michal.wajdeczko@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams
Date: Mon, 12 Dec 2016 15:52:05 +0100 [thread overview]
Message-ID: <20161212145205.GC19189@ahiler-desk.igk.intel.com> (raw)
In-Reply-To: <20161212142141.GI20316@nuc-i3427.alporthouse.com>
On Mon, Dec 12, 2016 at 02:21:41PM +0000, Chris Wilson wrote:
> On Mon, Dec 12, 2016 at 03:13:17PM +0100, Arkadiusz Hiler wrote:
> > On Fri, Dec 09, 2016 at 01:59:45PM +0100, Michal Wajdeczko wrote:
> > > On Thu, Dec 08, 2016 at 03:02:19PM -0800, anushasr wrote:
> > > > From: Peter Antoine <peter.antoine@intel.com>
> > > >
> > > > This patch will allow for getparams to return the status of the HuC.
> > > > As the HuC has to be validated by the GuC this patch uses the validated
> > > > status to show when the HuC is loaded and ready for use. You cannot use
> > > > the loaded status as with the GuC as the HuC is verified after it is
> > > > loaded and is not usable until it is verified.
> > > >
> > > > v2: removed the forewakes as the registers are already force-woken.
> > > > (T.Ursulin)
> > > > v4: rebased.
> > > > v5: rebased on top of drm-tip.
> > > > v6: rebased. Removed any reference to intel_huc.h
> > > >
> > > > Signed-off-by: Peter Antoine <peter.antoine@intel.com>
> > > > Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
> > > > ---
> > > > drivers/gpu/drm/i915/i915_drv.c | 4 ++++
> > > > drivers/gpu/drm/i915/intel_huc_loader.c | 12 ++++++++++++
> > > > drivers/gpu/drm/i915/intel_uc.h | 1 +
> > > > include/uapi/drm/i915_drm.h | 1 +
> > > > 4 files changed, 18 insertions(+)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> > > > index 85a47c2..6be06a27 100644
> > > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > > @@ -49,6 +49,7 @@
> > > > #include "i915_trace.h"
> > > > #include "i915_vgpu.h"
> > > > #include "intel_drv.h"
> > > > +#include "intel_uc.h"
> > > >
> > > > static struct drm_driver driver;
> > > >
> > > > @@ -349,6 +350,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
> > > > */
> > > > value = 1;
> > > > break;
> > > > + case I915_PARAM_HAS_HUC:
> > >
> > > For me this param name does not match returned result which maybe misleading.
> > > Note that other HAS params return static driver/hw capability, not runtime.
> > >
> > > I guess PARAM_HUC_STATUS would be better (0=no huc, 1=pending, 2=ok, -1=failed)
> > > And you can cache huc status in intel_huc struct and make final modification in
> > > intel_huc_auth() function to avoid registry read (unless we want to detect later
> > > crash of the huc using this reg read)
> >
> > Why should userspace care for those intermediary states? From what I
> > know (docs and patches from the cover letter) userspace is interested
> > only in being able to use HuC. If something is not working you have
> > DebugFS for that exact purpose.
> >
> > As of cacheing - seems like a good idea to limit reg reads.
>
> Is GETPARAM(HAS_HUC) a hot path? Should we even encourage it?
Actually... Good point. HAS_HUC is used once each time you initialise
libva client.
> Are there any other users of intel_huc_is_valid()?
intel_guc_auth_huc() uses
ret = wait_for((I915_READ(HUC_STATUS2) & HUC_FW_VERIFIED) > 0, 50);
So it can be reused there.
> As for userspace simply asking where huc is enabled, we already have
> that in the ABI via the module parameter, so you need to justify why
> this is preferred (in addition to the available information).
Yeah, we do change the values of module parameters. But a lot of them
are uid 0 only and we have PARAMS for those.
Do anything userspace use those actually? Do we plan to use them instead
of the getparams since now on?
> -Chris
>
> --
> Chris Wilson, Intel Open Source Technology Centre
--
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-12-12 14:52 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-08 23:02 [PATCH 0/8]HuC Loading Patches anushasr
2016-12-08 23:02 ` [PATCH 1/8] drm/i915/guc: Make the GuC fw loading helper functions general anushasr
2016-12-09 8:58 ` Arkadiusz Hiler
2016-12-09 11:28 ` Michal Wajdeczko
2016-12-09 11:49 ` Arkadiusz Hiler
2016-12-09 13:06 ` Michal Wajdeczko
2016-12-09 13:09 ` Arkadiusz Hiler
2016-12-09 19:34 ` Srivatsa, Anusha
2016-12-08 23:02 ` [PATCH 2/8] drm/i915/huc: Unified css_header struct for GuC and HuC anushasr
2016-12-09 9:20 ` Arkadiusz Hiler
2016-12-09 11:55 ` Michal Wajdeczko
2016-12-09 21:42 ` Srivatsa, Anusha
2016-12-12 11:56 ` Arkadiusz Hiler
2016-12-08 23:02 ` [PATCH 3/8] drm/i915/huc: Add HuC fw loading support anushasr
2016-12-09 10:56 ` Arkadiusz Hiler
2016-12-09 11:10 ` Chris Wilson
2016-12-09 11:34 ` Arkadiusz Hiler
2016-12-09 12:19 ` Arkadiusz Hiler
2016-12-09 12:17 ` Michal Wajdeczko
2016-12-09 23:56 ` Srivatsa, Anusha
2016-12-12 11:50 ` Arkadiusz Hiler
2016-12-12 18:52 ` Tvrtko Ursulin
2016-12-14 15:19 ` Jani Nikula
2016-12-14 15:24 ` Parenteau, Paul A
2016-12-08 23:02 ` [PATCH 4/8] drm/i915/huc: Add BXT HuC Loading Support anushasr
2016-12-08 23:02 ` [PATCH 5/8] drm/i915/HuC: Add KBL huC loading Support anushasr
2016-12-08 23:02 ` [PATCH 6/8] drm/i915/huc: Add debugfs for HuC loading status check anushasr
2016-12-08 23:02 ` [PATCH 7/8] drm/i915/huc: Support HuC authentication anushasr
2016-12-09 10:22 ` Arkadiusz Hiler
2016-12-09 12:36 ` Michal Wajdeczko
2016-12-11 0:03 ` Srivatsa, Anusha
2016-12-08 23:02 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams anushasr
2016-12-08 23:55 ` Chris Wilson
2016-12-13 9:40 ` Arkadiusz Hiler
2016-12-14 1:02 ` Srivatsa, Anusha
2016-12-09 12:59 ` Michal Wajdeczko
2016-12-12 14:13 ` Arkadiusz Hiler
2016-12-12 14:21 ` Chris Wilson
2016-12-12 14:52 ` Arkadiusz Hiler [this message]
2016-12-12 15:17 ` Chris Wilson
2016-12-12 15:27 ` Arkadiusz Hiler
2016-12-12 19:20 ` Srivatsa, Anusha
2016-12-08 23:45 ` ✓ Fi.CI.BAT: success for HuC Loading Patches Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-01-14 1:17 [PATCH 0/8] " Anusha Srivatsa
2017-01-14 1:17 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2017-01-13 18:08 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2017-01-13 18:08 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2017-01-13 17:07 Anusha Srivatsa
2017-01-04 14:55 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2017-01-04 14:55 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2017-01-04 13:27 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2017-01-04 13:27 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-12-22 23:12 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2016-12-22 23:12 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-12-23 14:33 ` Arkadiusz Hiler
2016-12-15 22:29 [PATCH 0/8] HuC Loading Patches anushasr
2016-12-15 22:29 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams anushasr
2016-12-15 22:42 ` Chris Wilson
2016-12-16 14:43 ` Arkadiusz Hiler
2016-12-16 16:12 ` Chris Wilson
2016-12-16 16:21 ` Arkadiusz Hiler
2016-12-16 16:30 ` Chris Wilson
2016-12-16 18:31 ` Srivatsa, Anusha
2016-12-16 18:46 ` Chris Wilson
2016-12-16 18:55 ` Srivatsa, Anusha
2016-12-16 16:00 ` Arkadiusz Hiler
2016-11-30 23:31 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2016-11-30 23:31 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-12-01 13:07 ` Arkadiusz Hiler
2016-11-23 22:27 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2016-11-23 22:27 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-11-24 1:35 ` Jeff McGee
2016-11-11 0:15 [PATCH v4 0/8] HuC Loading Patches Anusha Srivatsa
2016-11-11 0:15 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-11-09 18:51 [PATCH 1/8] drm/i915/guc: Make the GuC fw loading helper functions general Anusha Srivatsa
2016-11-09 18:51 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-10-03 18:42 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2016-10-03 18:43 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
2016-10-05 20:51 ` Rodrigo Vivi
2016-10-13 21:47 ` Jeff McGee
2016-10-17 6:48 ` Daniel Vetter
2016-09-29 18:03 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2016-09-29 18:04 ` [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams Anusha Srivatsa
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=20161212145205.GC19189@ahiler-desk.igk.intel.com \
--to=arkadiusz.hiler@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michal.wajdeczko@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).