From: Jeff McGee <jeff.mcgee@intel.com>
To: Anusha Srivatsa <anusha.srivatsa@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 8/8] drm/i915/get_params: Add HuC status to getparams
Date: Thu, 13 Oct 2016 14:47:32 -0700 [thread overview]
Message-ID: <20161013214732.GK18646@jeffdesk> (raw)
In-Reply-To: <1475520182-9224-9-git-send-email-anusha.srivatsa@intel.com>
On Mon, Oct 03, 2016 at 11:43:02AM -0700, Anusha Srivatsa 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.
>
> Tested-by: Xiang Haihao <haihao.xiang@intel.com>
> Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
> Signed-off-by: Peter Antoine <peter.antoine@intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 4 ++++
> drivers/gpu/drm/i915/intel_huc.h | 2 +-
> drivers/gpu/drm/i915/intel_huc_loader.c | 14 ++++++++++++++
> include/uapi/drm/i915_drm.h | 1 +
> 4 files changed, 20 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index ff1c18d..0d7b290 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_huc.h"
> #include "intel_guc.h"
>
> static struct drm_driver driver;
> @@ -343,6 +344,9 @@ static int i915_getparam(struct drm_device *dev, void *data,
> case I915_PARAM_HAS_GUC:
> value = intel_is_guc_valid(dev_priv);
> break;
> + case I915_PARAM_HAS_HUC:
> + value = intel_is_huc_valid(dev_priv);
> + break;
> default:
> DRM_DEBUG("Unknown parameter %d\n", param->param);
> return -EINVAL;
> diff --git a/drivers/gpu/drm/i915/intel_huc.h b/drivers/gpu/drm/i915/intel_huc.h
> index 946caa7..5eac625 100644
> --- a/drivers/gpu/drm/i915/intel_huc.h
> +++ b/drivers/gpu/drm/i915/intel_huc.h
> @@ -40,5 +40,5 @@ extern void intel_huc_init(struct drm_device *dev);
> extern int intel_huc_load(struct drm_device *dev);
> extern void intel_huc_auth(struct drm_device *dev);
> extern void intel_huc_fini(struct drm_device *dev);
> -
> +extern int intel_is_huc_valid(struct drm_i915_private *dev_priv);
> #endif
> diff --git a/drivers/gpu/drm/i915/intel_huc_loader.c b/drivers/gpu/drm/i915/intel_huc_loader.c
> index 87a6948..d574183 100644
> --- a/drivers/gpu/drm/i915/intel_huc_loader.c
> +++ b/drivers/gpu/drm/i915/intel_huc_loader.c
> @@ -273,3 +273,17 @@ void intel_huc_fini(struct drm_device *dev)
>
> huc_fw->fetch_status = UC_FIRMWARE_NONE;
> }
> +
> +/**
> + * intel_is_huc_valid() - Check to see if the HuC is fully loaded.
> + * @dev_priv: drm device to check.
> + *
> + * This function will return true if the guc has been loaded and
> + * has valid firmware. The simplest way of doing this is to check
> + * if the HuC has been validated, if so it must have been loaded.
> + */
> +int intel_is_huc_valid(struct drm_i915_private *dev_priv)
I'm still unclear on the 'intel' vs. 'i915' prefix usage. But it seems
that intel prefixed functions accept drm_device instead of drm_i915_private.
Also, need to see the userspace usage of this new GETPARAM.
> +{
> + return ((I915_READ(HUC_STATUS2) & HUC_FW_VERIFIED) != 0);
> +}
> +
> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> index 629fb5e..d236520 100644
> --- a/include/uapi/drm/i915_drm.h
> +++ b/include/uapi/drm/i915_drm.h
> @@ -389,6 +389,7 @@ typedef struct drm_i915_irq_wait {
> #define I915_PARAM_MIN_EU_IN_POOL 39
> #define I915_PARAM_MMAP_GTT_VERSION 40
> #define I915_PARAM_HAS_GUC 41
> +#define I915_PARAM_HAS_HUC 42
>
> typedef struct drm_i915_getparam {
> __s32 param;
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-10-13 21:38 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-03 18:42 [PATCH 0/8] HuC Loading Patches Anusha Srivatsa
2016-10-03 18:42 ` [PATCH 1/8] drm/i915/guc: Make the GuC fw loading helper functions general Anusha Srivatsa
2016-10-13 15:04 ` Jeff McGee
2016-10-24 21:46 ` Carlos Santa
2016-10-03 18:42 ` [PATCH 2/8] drm/i915/huc: Unified css_header struct for GuC and HuC Anusha Srivatsa
2016-10-13 15:45 ` Jeff McGee
2016-10-14 4:24 ` Jeff McGee
2016-10-24 21:42 ` Carlos Santa
2016-10-03 18:42 ` [PATCH 3/8] drm/i915/huc: Add HuC fw loading support Anusha Srivatsa
2016-10-13 17:42 ` Jeff McGee
2016-10-13 20:54 ` Jeff McGee
2016-10-24 21:24 ` Carlos Santa
2016-10-24 22:25 ` Jeff McGee
2016-10-03 18:42 ` [PATCH 4/8] drm/i915/huc: Add debugfs for HuC loading status check Anusha Srivatsa
2016-10-13 17:49 ` Jeff McGee
2016-10-24 23:48 ` Carlos Santa
2016-10-25 22:14 ` Carlos Santa
2016-10-03 18:42 ` [PATCH 5/8] drm/i915/huc: Support HuC authentication Anusha Srivatsa
2016-10-13 21:34 ` Jeff McGee
2016-10-26 0:49 ` Carlos Santa
2016-10-26 1:00 ` Carlos Santa
2016-10-03 18:43 ` [PATCH 6/8] drm/i915/huc: Add BXT HuC Loading Support Anusha Srivatsa
2016-10-13 21:36 ` Jeff McGee
2016-10-03 18:43 ` [PATCH 7/8] drm/i915/get_params: Add GuC status to getparams Anusha Srivatsa
2016-10-05 20:51 ` Rodrigo Vivi
2016-10-07 7:11 ` Daniel Vetter
2016-10-13 21:42 ` Jeff McGee
2016-10-17 6:49 ` Daniel Vetter
2016-10-03 18:43 ` [PATCH 8/8] drm/i915/get_params: Add HuC " Anusha Srivatsa
2016-10-05 20:51 ` Rodrigo Vivi
2016-10-13 21:47 ` Jeff McGee [this message]
2016-10-17 6:48 ` Daniel Vetter
2016-10-03 19:19 ` ✗ Fi.CI.BAT: warning for HuC Loading Patches Patchwork
2016-10-07 7:09 ` [PATCH 0/8] " Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2017-01-14 1:17 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-12-08 23:02 [PATCH 0/8]HuC Loading Patches anushasr
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
2016-12-12 15:17 ` Chris Wilson
2016-12-12 15:27 ` Arkadiusz Hiler
2016-12-12 19:20 ` Srivatsa, Anusha
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-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=20161013214732.GK18646@jeffdesk \
--to=jeff.mcgee@intel.com \
--cc=anusha.srivatsa@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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).