drm/i915/guc: Add GuC Load time to dmesg log.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): 9108028B3EB68E4CA5158371AB76E601633C4616@IRSMSX106.ger.corp.intel.com
Sending to intel-gfx.
Quoted 12 lines
-----Original Message-----
From: Ursulin, Tvrtko
Sent: Thursday, September 21, 2017 8:16 AM
To: Srivatsa, Anusha <[email protected]>; intel- [email protected]
Cc: Chris Wilson <[email protected]>; Vetter, Daniel <[email protected]>; Sundaresan, Sujaritha <[email protected]>; Mateo Lozano, Oscar <[email protected]>; Wajdeczko, Michal <[email protected]>
Subject: RE: [PATCH 1/2] drm/i915/guc: Add GuC Load time to dmesg log.
Quoted 4 lines
Hi,
For some reason this email hasn't appeared on the mailing list so apologies for a lame Outlook reply.
Thanks Tvrtko. I corrected the address.
Quoted 3 lines
I thought we agreed to use a better time source than jiffies (
ktime_get()) and also thatDRM_NOTEwould get emitted only in the case of load time being over some threshold. If it is in realm of normal it should be a normalDRM_DEBUG_DRIVER.
If it is over 20 ms (the threshold) wont DRM_ERROR be a better option? If it is within that limit, then the info will be in DRM_DEBUG_DRIVER from which the QA can pick it.
Anusha
Quoted 94 lines
Tvrtko
-----Original Message-----
From: Srivatsa, Anusha
Sent: Thursday, September 21, 2017 1:44 AM
To: [email protected]
Cc: Srivatsa, Anusha <[email protected]>; Chris Wilson <chris@chris- wilson.co.uk>; Ursulin, Tvrtko <[email protected]>; Vetter, Daniel <[email protected]>; Sundaresan, Sujaritha <[email protected]>; Mateo Lozano, Oscar <[email protected]>; Wajdeczko, Michal <[email protected]>
Subject: [PATCH 1/2] drm/i915/guc: Add GuC Load time to dmesg log.Calculate the time that GuC takes to load using jiffies. This information could be very useful in determining if GuC is taking unreasonably long time to load in a certain platforms.
v2: Calculate time before logs are collected.
Move theguc_load_timevariable as a part ofintel_uc_fwstruct. Store only final result which is to be exported to debugfs. (Michal) Add the load time in the print message as well.v3: Remove debugfs entry. Remove local variable
guc_finish_load. (Daniel, Tvrtko)Cc Chris Wilson <[email protected]>Cc Tvrtko ursulin <[email protected]>Cc Daniel Vetter <[email protected]>Cc Sujaritha Sundaresan <[email protected]>Cc Oscar Mateo <[email protected]>Cc Michal Wajdeczko <[email protected]>Signed-off-by Anusha Srivatsa <[email protected]>---
drivers/gpu/drm/i915/intel_guc_loader.c| 7 +++++++drivers/gpu/drm/i915/intel_uc.h| 1 +2 files changed, 8 insertions(+)drivers/gpu/drm/i915/intel_guc_loader.c +1
-0@@ -199,6 +199,7 @@ static int guc_ucode_xfer_dma(struct drm_i915_private *dev_priv, struct sg_table *sg = vma->pages;u32 status, rsa[UOS_RSA_SCRATCH_MAX_COUNT ];int i, ret =0 ; +unsigned long guc_start_load;/* where RSA signature starts */ offset = guc_fw->rsa_offset;drivers/gpu/drm/i915/intel_guc_loader.c +1
-0@@ -226,6 +227,7 @@ static int guc_ucode_xfer_dma(struct drm_i915_private *dev_priv,/* Finally start the DMA */ I915_WRITE (DMA_CTRL ,_MASKED_BIT_ENABLE (UOS_MOVE |START_DMA )); + guc_start_load = jiffies;/* * Wait for the DMA to complete & the GuC to start up.drivers/gpu/drm/i915/intel_guc_loader.c +5
-0@@ -237,6 +239,8 @@ static int guc_ucode_xfer_dma(struct drm_i915_private*dev_priv, */ ret =wait_for (guc_ucode_response (dev_priv, &status),100 ); + guc_fw->load_time =jiffies_to_msecs (jiffies - guc_start_load); +DRM_DEBUG_DRIVER ("DMA status 0x%x, GuC status 0x%x\n" ,I915_READ (DMA_CTRL ), status);@@ -372,6 +376,9 @@ int intel_guc_init_hw(struct intel_guc *guc) guc->fw.path, guc->fw.major_ver_found, guc->fw.minor_ver_found); +DRM_NOTE ("Time taken to load GuC is %lu ms\n" , + guc->fw.load_time); +return 0 ; }drivers/gpu/drm/i915/intel_uc.h +1
-1@@ -136,6 +136,7 @@ struct intel_uc_fw {uint32_t rsa_offset;uint32_t ucode_size;uint32_t ucode_offset; +unsigned long load_time; };struct intel_guc_log { --
Quoted 1 line
2.7.4
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 20 lines · Anusha
Sending to intel-gfx.
Quoted 12 lines
-----Original Message-----
From: Ursulin, Tvrtko
Sent: Thursday, September 21, 2017 8:16 AM
To: Srivatsa, Anusha <[email protected]>; intel- [email protected]
Cc: Chris Wilson <[email protected]>; Vetter, Daniel <[email protected]>; Sundaresan, Sujaritha <[email protected]>; Mateo Lozano, Oscar <[email protected]>; Wajdeczko, Michal <[email protected]>
Subject: RE: [PATCH 1/2] drm/i915/guc: Add GuC Load time to dmesg log.Quoted 4 lines
Hi,
For some reason this email hasn't appeared on the mailing list so apologies for a lame Outlook reply.
Quoted 7 lines
Thanks Tvrtko. I corrected the address.
Quoted 3 lines
I thought we agreed to use a better time source than jiffies (
ktime_get()) and also thatDRM_NOTEwould get emitted only in the case of load time being over some threshold. If it is in realm of normal it should be a normalDRM_DEBUG_DRIVER.If it is over 20 ms (the threshold) wont
DRM_ERRORbe a better option? If it is within that limit, then the info will be inDRM_DEBUG_DRIVERfrom which the QA can pick it.
Error only if it fails to load I think. DRM_NOTE was for cases when it succeeds but after taking unexpectedly long. Just so it is a level about informational.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx