Commit f9cda048 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Tvrtko Ursulin

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.
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarArkadiusz Hiler <arkadiusz.hiler@intel.com>
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170113174157.104492-1-michal.wajdeczko@intel.com
parent a5e4c7d0
...@@ -56,6 +56,7 @@ i915-y += i915_cmd_parser.o \ ...@@ -56,6 +56,7 @@ i915-y += i915_cmd_parser.o \
# general-purpose microcontroller (GuC) support # general-purpose microcontroller (GuC) support
i915-y += intel_uc.o \ i915-y += intel_uc.o \
intel_guc_log.o \
intel_guc_loader.o \ intel_guc_loader.o \
i915_guc_submission.o i915_guc_submission.o
......
...@@ -1114,7 +1114,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv) ...@@ -1114,7 +1114,7 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
/* Reveal our presence to userspace */ /* Reveal our presence to userspace */
if (drm_dev_register(dev, 0) == 0) { if (drm_dev_register(dev, 0) == 0) {
i915_debugfs_register(dev_priv); i915_debugfs_register(dev_priv);
i915_guc_register(dev_priv); i915_guc_log_register(dev_priv);
i915_setup_sysfs(dev_priv); i915_setup_sysfs(dev_priv);
/* Depends on sysfs having been initialized */ /* Depends on sysfs having been initialized */
...@@ -1158,7 +1158,7 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv) ...@@ -1158,7 +1158,7 @@ static void i915_driver_unregister(struct drm_i915_private *dev_priv)
i915_perf_unregister(dev_priv); i915_perf_unregister(dev_priv);
i915_teardown_sysfs(dev_priv); i915_teardown_sysfs(dev_priv);
i915_guc_unregister(dev_priv); i915_guc_log_unregister(dev_priv);
i915_debugfs_unregister(dev_priv); i915_debugfs_unregister(dev_priv);
drm_dev_unregister(&dev_priv->drm); drm_dev_unregister(&dev_priv->drm);
......
This diff is collapsed.
...@@ -51,12 +51,6 @@ ...@@ -51,12 +51,6 @@
* 512K. In order to exclude 0-512K address space from GGTT, all gfx objects * 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. * 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 #define SKL_FW_MAJOR 6
......
This diff is collapsed.
...@@ -114,29 +114,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc) ...@@ -114,29 +114,3 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
return intel_guc_send(guc, action, ARRAY_SIZE(action)); 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));
}
...@@ -174,9 +174,6 @@ struct intel_guc { ...@@ -174,9 +174,6 @@ struct intel_guc {
void intel_uc_init_early(struct drm_i915_private *dev_priv); 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_send(struct intel_guc *guc, const u32 *action, u32 len);
int intel_guc_sample_forcewake(struct intel_guc *guc); 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 */ /* intel_guc_loader.c */
extern void intel_guc_init(struct drm_i915_private *dev_priv); 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); ...@@ -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_wq_unreserve(struct drm_i915_gem_request *request);
void i915_guc_submission_disable(struct drm_i915_private *dev_priv); 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_submission_fini(struct drm_i915_private *dev_priv);
void i915_guc_capture_logs(struct drm_i915_private *dev_priv); struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size);
void i915_guc_flush_logs(struct drm_i915_private *dev_priv);
void i915_guc_register(struct drm_i915_private *dev_priv); /* intel_guc_log.c */
void i915_guc_unregister(struct drm_i915_private *dev_priv); 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); int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val);
static inline u32 guc_ggtt_offset(struct i915_vma *vma) static inline u32 guc_ggtt_offset(struct i915_vma *vma)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment