Skip to contentSkip to conversation

drm/i915/guc: Move GuC log related functions into dedicated file

RFC Applied Michal Wajdeczko 5 participants 6 messages Jan 13, 2017 – Jan 18, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC 1/1 drm/i915/guc: Move GuC log related functions into dedicated file

Functions supporting GuC logging capabilities were spread across many files, with unnecessary exposures and mixed with unrelated code. Dedicate file will make maintenance of all GuC functions easier as more functions are coming to support GuC submissions.

---
 drivers/gpu/drm/i915/Makefile              |   1 +
 drivers/gpu/drm/i915/i915_drv.c            |   4 +-
 drivers/gpu/drm/i915/i915_guc_submission.c | 594 +-------------------------
 drivers/gpu/drm/i915/intel_guc_loader.c    |   6 -
 drivers/gpu/drm/i915/intel_guc_log.c       | 658 +++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_uc.c            |  26 --
 drivers/gpu/drm/i915/intel_uc.h            |  13 +-
 7 files changed, 673 insertions(+), 629 deletions(-)
 create mode 100644 drivers/gpu/drm/i915/intel_guc_log.c
drivers/gpu/drm/i915/Makefile +1 -0
index 5196509..40185fd 100644
@@ -56,6 +56,7 @@ i915-y += i915_cmd_parser.o \
 
 # general-purpose microcontroller (GuC) support
 i915-y += intel_uc.o \
+	  intel_guc_log.o \
 	  intel_guc_loader.o \
 	  i915_guc_submission.o
 
drivers/gpu/drm/i915/i915_drv.c +2 -2
index 4e5ea58..350ee06 100644
@@ -1114,7 +1114,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
 	/* Reveal our presence to userspace */
 	if (drm_dev_register(dev, 0) == 0) {
 		i915_debugfs_register(dev_priv);
-		i915_guc_register(dev_priv);
+		i915_guc_log_register(dev_priv);
 		i915_setup_sysfs(dev_priv);
 
 		/* Depends on sysfs having been initialized */
@@ -1158,7 +1158,7 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
 	i915_perf_unregister(dev_priv);
 
 	i915_teardown_sysfs(dev_priv);
-	i915_guc_unregister(dev_priv);
+	i915_guc_log_unregister(dev_priv);
 	i915_debugfs_unregister(dev_priv);
 	drm_dev_unregister(&dev_priv->drm);
 
drivers/gpu/drm/i915/i915_guc_submission.c +6 -588

646 lines not on this page · raw message

drivers/gpu/drm/i915/intel_guc_loader.c +0 -6
index b889191..4bcef5d 100644
@@ -51,12 +51,6 @@
  * 512K. In order to exclude 0-512K address space from GGTT, all gfx objects
  * used by GuC is pinned with PIN_OFFSET_BIAS along with size of WOPCM.
  *
- * Firmware log:
- * Firmware log is enabled by setting i915.guc_log_level to non-negative level.
- * Log data is printed out via reading debugfs i915_guc_log_dump. Reading from
- * i915_guc_load_status will print out firmware loading status and scratch
- * registers value.
- *
  */
 
 #define SKL_FW_MAJOR 6
drivers/gpu/drm/i915/intel_guc_log.c new file +658 -0

658 lines not on this page · raw message

drivers/gpu/drm/i915/intel_uc.c +0 -26
index c6be352..c46bc85 100644
@@ -114,29 +114,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
 	return intel_guc_send(guc, action, ARRAY_SIZE(action));
 }
 
-int intel_guc_log_flush_complete(struct intel_guc *guc)
-{
-	u32 action[] = { INTEL_GUC_ACTION_LOG_BUFFER_FILE_FLUSH_COMPLETE };
-
-	return intel_guc_send(guc, action, ARRAY_SIZE(action));
-}
-
-int intel_guc_log_flush(struct intel_guc *guc)
-{
-	u32 action[] = {
-		INTEL_GUC_ACTION_FORCE_LOG_BUFFER_FLUSH,
-		0
-	};
-
-	return intel_guc_send(guc, action, ARRAY_SIZE(action));
-}
-
-int intel_guc_log_control(struct intel_guc *guc, u32 control_val)
-{
-	u32 action[] = {
-		INTEL_GUC_ACTION_UK_LOG_ENABLE_LOGGING,
-		control_val
-	};
-
-	return intel_guc_send(guc, action, ARRAY_SIZE(action));
-}
drivers/gpu/drm/i915/intel_uc.h +6 -7
index 9490a8e..57f9088 100644
@@ -174,9 +174,6 @@ struct intel_guc {
 void intel_uc_init_early(struct drm_i915_private *dev_priv);
 int intel_guc_send(struct intel_guc *guc, const u32 *action, u32 len);
 int intel_guc_sample_forcewake(struct intel_guc *guc);
-int intel_guc_log_flush_complete(struct intel_guc *guc);
-int intel_guc_log_flush(struct intel_guc *guc);
-int intel_guc_log_control(struct intel_guc *guc, u32 control_val);
 
 /* intel_guc_loader.c */
 extern void intel_guc_init(struct drm_i915_private *dev_priv);
@@ -193,10 +190,12 @@ int i915_guc_wq_reserve(struct drm_i915_gem_request *rq);
 void i915_guc_wq_unreserve(struct drm_i915_gem_request *request);
 void i915_guc_submission_disable(struct drm_i915_private *dev_priv);
 void i915_guc_submission_fini(struct drm_i915_private *dev_priv);
-void i915_guc_capture_logs(struct drm_i915_private *dev_priv);
-void i915_guc_flush_logs(struct drm_i915_private *dev_priv);
-void i915_guc_register(struct drm_i915_private *dev_priv);
-void i915_guc_unregister(struct drm_i915_private *dev_priv);
+struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size);
+
+/* intel_guc_log.c */
+void intel_guc_log_create(struct intel_guc *guc);
+void i915_guc_log_register(struct drm_i915_private *dev_priv);
+void i915_guc_log_unregister(struct drm_i915_private *dev_priv);
 int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val);
 
 static inline u32 guc_ggtt_offset(struct i915_vma *vma)
Signature · 6 lines
2.7.4

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 7 lines · Michal Wajdeczko

Functions supporting GuC logging capabilities were spread across many files, with unnecessary exposures and mixed with unrelated code. Dedicate file will make maintenance of all GuC functions easier as more functions are coming to support GuC submissions.

Looks clean enough. I don't expect any objections, anyone? -Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 10 lines · Chris Wilson
Quoted 7 lines · Michal Wajdeczko

Functions supporting GuC logging capabilities were spread across many files, with unnecessary exposures and mixed with unrelated code. Dedicate file will make maintenance of all GuC functions easier as more functions are coming to support GuC submissions.

Looks clean enough. I don't expect any objections, anyone?

No objections whatsoever, just the opposite!

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by
#3 lore raw
Quoted 10 lines · Tvrtko Ursulin
Quoted 8 lines · Chris Wilson
Quoted 7 lines · Michal Wajdeczko

Functions supporting GuC logging capabilities were spread across many files, with unnecessary exposures and mixed with unrelated code. Dedicate file will make maintenance of all GuC functions easier as more functions are coming to support GuC submissions.

Quoted 4 lines
Quoted 2 lines

Looks clean enough. I don't expect any objections, anyone?

No objections whatsoever, just the opposite!

Agreed. We can just drop the RFC tag and merge it straight away.

Signature · 6 lines
Cheers,
Arek
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

✓ Fi.CI.BAT: success for drm/i915/guc: Move GuC log related functions into dedicated file

In reply to Michal Wajdeczko
== Series Details ==

== Series Details ==

Series: drm/i915/guc: Move GuC log related functions into dedicated file
URL : https://patchwork.freedesktop.org/series/17988/
State : success

== Summary ==

Series 17988v1 drm/i915/guc: Move GuC log related functions into dedicated file
https://patchwork.freedesktop.org/api/1.0/series/17988/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-plain-flip:
                dmesg-warn -> PASS       (fi-snb-2520m)
fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:82   pass:69   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21 
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21 
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31 
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32 

5b8951aa5fc71afeed8cda24ee88bbe64dbea968 drm-tip: 2017y-01m-13d-16h-36m-26s UTC integration manifest 3e80fb4 drm/i915/guc: Move GuC log related functions into dedicated file

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3511/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw

Re: ✓ Fi.CI.BAT: success for drm/i915/guc: Move GuC log related functions into dedicated file

Quoted 32 lines · Patchwork

== Series Details ==

Series: drm/i915/guc: Move GuC log related functions into dedicated file
URL : https://patchwork.freedesktop.org/series/17988/
State : success

== Summary ==

Series 17988v1 drm/i915/guc: Move GuC log related functions into dedicated file
https://patchwork.freedesktop.org/api/1.0/series/17988/revisions/1/mbox/

Test kms_flip:

        Subgroup basic-plain-flip:
                dmesg-warn -> PASS       (fi-snb-2520m)
fi-bdw-5557u     total:246  pass:232  dwarn:0   dfail:0   fail:0   skip:14
fi-bsw-n3050     total:246  pass:207  dwarn:0   dfail:0   fail:0   skip:39
fi-bxt-j4205     total:246  pass:224  dwarn:0   dfail:0   fail:0   skip:22
fi-bxt-t5700     total:82   pass:69   dwarn:0   dfail:0   fail:0   skip:12
fi-byt-j1900     total:246  pass:219  dwarn:0   dfail:0   fail:0   skip:27
fi-byt-n2820     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31
fi-hsw-4770      total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19
fi-hsw-4770r     total:246  pass:227  dwarn:0   dfail:0   fail:0   skip:19
fi-ivb-3520m     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21
fi-ivb-3770      total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21
fi-kbl-7500u     total:246  pass:225  dwarn:0   dfail:0   fail:0   skip:21
fi-skl-6260u     total:246  pass:233  dwarn:0   dfail:0   fail:0   skip:13
fi-skl-6700hq    total:246  pass:226  dwarn:0   dfail:0   fail:0   skip:20
fi-skl-6700k     total:246  pass:222  dwarn:3   dfail:0   fail:0   skip:21
fi-snb-2520m     total:246  pass:215  dwarn:0   dfail:0   fail:0   skip:31
fi-snb-2600      total:246  pass:214  dwarn:0   dfail:0   fail:0   skip:32
Quoted 2 lines

5b8951aa5fc71afeed8cda24ee88bbe64dbea968 drm-tip: 2017y-01m-13d-16h-36m-26s UTC integration manifest 3e80fb4 drm/i915/guc: Move GuC log related functions into dedicated file

Pushed to dinq, thanks for the patch and review!

Regards,

Tvrtko

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx