From: Peter Antoine Subject: Re: [PATCH 4/6] drm/i915/huc: Add debugfs for HuC loading status check Date: Thu, 23 Jun 2016 10:51:29 +0100 (BST) Message-ID: References: <1466532685-5101-1-git-send-email-peter.antoine@intel.com> <1466532685-5101-5-git-send-email-peter.antoine@intel.com> <1466671554.27154.195.camel@intel.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323329-873075214-1466675492=:8449" Return-path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTP id DAB2E6E8D5 for ; Thu, 23 Jun 2016 09:51:32 +0000 (UTC) In-Reply-To: <1466671554.27154.195.camel@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: "Xiang, Haihao" Cc: "Kelley, Sean V" , "intel-gfx@lists.freedesktop.org" , "Li, Lawrence T" , "Vivi, Rodrigo" List-Id: intel-gfx@lists.freedesktop.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-873075214-1466675492=:8449 Content-Type: TEXT/PLAIN; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable On Thu, 23 Jun 2016, Xiang, Haihao wrote: > > Hi Peter, > > Besides debugfs, could you add a IOCTL to check HuC loading status? > Userspace media=C2=A0driver needs to advertise the features based on Hu= C to > user. > > Thanks > Haihao > > >> From: Alex Dai >> >> Add debugfs entry for HuC loading status check. >> >> Signed-off-by: Alex Dai >> Signed-off-by: Peter Antoine >> --- >> =C2=A0drivers/gpu/drm/i915/i915_debugfs.c | 32 >> ++++++++++++++++++++++++++++++++ >> =C2=A01 file changed, 32 insertions(+) >> >> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c >> b/drivers/gpu/drm/i915/i915_debugfs.c >> index 69964c2..f5976f8 100644 >> --- a/drivers/gpu/drm/i915/i915_debugfs.c >> +++ b/drivers/gpu/drm/i915/i915_debugfs.c >> @@ -2479,6 +2479,37 @@ static int i915_llc(struct seq_file *m, void >> *data) >> =C2=A0 return 0; >> =C2=A0} >> =C2=A0 >> +static int i915_huc_load_status_info(struct seq_file *m, void *data) >> +{ >> + struct drm_info_node *node =3D m->private; >> + struct drm_i915_private *dev_priv =3D node->minor->dev- >>> dev_private; >> + struct intel_uc_fw *huc_fw =3D &dev_priv->huc.huc_fw; >> + >> + if (!HAS_HUC_UCODE(dev_priv->dev)) >> + return 0; >> + >> + seq_puts(m, "HuC firmware status:\n"); >> + seq_printf(m, "\tpath: %s\n", huc_fw->uc_fw_path); >> + seq_printf(m, "\tfetch: %s\n", >> + intel_uc_fw_status_repr(huc_fw->fetch_status)); >> + seq_printf(m, "\tload: %s\n", >> + intel_uc_fw_status_repr(huc_fw->load_status)); >> + seq_printf(m, "\tversion wanted: %d.%d\n", >> + huc_fw->major_ver_wanted, huc_fw->minor_ver_wanted); >> + seq_printf(m, "\tversion found: %d.%d\n", >> + huc_fw->major_ver_found, huc_fw->minor_ver_found); >> + seq_printf(m, "\theader: offset is %d; size =3D %d\n", >> + huc_fw->header_offset, huc_fw->header_size); >> + seq_printf(m, "\tuCode: offset is %d; size =3D %d\n", >> + huc_fw->ucode_offset, huc_fw->ucode_size); >> + seq_printf(m, "\tRSA: offset is %d; size =3D %d\n", >> + huc_fw->rsa_offset, huc_fw->rsa_size); >> + >> + seq_printf(m, "\nHuC status 0x%08x:\n", >> I915_READ(HUC_STATUS2)); >> + >> + return 0; >> +} >> + >> =C2=A0static int i915_guc_load_status_info(struct seq_file *m, void *d= ata) >> =C2=A0{ >> =C2=A0 struct drm_info_node *node =3D m->private; >> @@ -5432,6 +5463,7 @@ static const struct drm_info_list >> i915_debugfs_list[] =3D { >> =C2=A0 {"i915_guc_info", i915_guc_info, 0}, >> =C2=A0 {"i915_guc_load_status", i915_guc_load_status_info, 0}, >> =C2=A0 {"i915_guc_log_dump", i915_guc_log_dump, 0}, >> + {"i915_huc_load_status", i915_huc_load_status_info, 0}, >> =C2=A0 {"i915_frequency_info", i915_frequency_info, 0}, >> =C2=A0 {"i915_hangcheck_info", i915_hangcheck_info, 0}, >> =C2=A0 {"i915_drpc_info", i915_drpc_info, 0}, -- Peter Antoine (Android Graphics Driver Software Engineer) --------------------------------------------------------------------- Intel Corporation (UK) Limited Registered No. 1134945 (England) Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47 --8323329-873075214-1466675492=:8449 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vaW50ZWwtZ2Z4Cg== --8323329-873075214-1466675492=:8449--