Commit 56b9a8b0 authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Chris Wilson

drm/i915/guc: Update syntax of GuC log functions

We moved GuC log related data and code to separate files and
definition but we didn't change functions syntax to follow
object-verb pattern. Let's fix that before we continue with
next round of code refactoring.

v2: rebased
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Michal Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarMichał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180314144539.11152-1-michal.wajdeczko@intel.com
[ickle: checkpatch booleans]
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent c080363f
......@@ -2502,7 +2502,7 @@ static int i915_guc_log_control_get(void *data, u64 *val)
if (!USES_GUC(dev_priv))
return -ENODEV;
*val = intel_guc_log_control_get(&dev_priv->guc);
*val = intel_guc_log_control_get(&dev_priv->guc.log);
return 0;
}
......@@ -2514,7 +2514,7 @@ static int i915_guc_log_control_set(void *data, u64 val)
if (!USES_GUC(dev_priv))
return -ENODEV;
return intel_guc_log_control_set(&dev_priv->guc, val);
return intel_guc_log_control_set(&dev_priv->guc.log, val);
}
DEFINE_SIMPLE_ATTRIBUTE(i915_guc_log_control_fops,
......
......@@ -64,7 +64,7 @@ void intel_guc_init_early(struct intel_guc *guc)
{
intel_guc_fw_init_early(guc);
intel_guc_ct_init_early(&guc->ct);
intel_guc_log_init_early(guc);
intel_guc_log_init_early(&guc->log);
mutex_init(&guc->send_mutex);
guc->send = intel_guc_send_nop;
......@@ -169,7 +169,7 @@ int intel_guc_init(struct intel_guc *guc)
return ret;
GEM_BUG_ON(!guc->shared_data);
ret = intel_guc_log_create(guc);
ret = intel_guc_log_create(&guc->log);
if (ret)
goto err_shared;
......@@ -184,7 +184,7 @@ int intel_guc_init(struct intel_guc *guc)
return 0;
err_log:
intel_guc_log_destroy(guc);
intel_guc_log_destroy(&guc->log);
err_shared:
guc_shared_data_destroy(guc);
return ret;
......@@ -196,7 +196,7 @@ void intel_guc_fini(struct intel_guc *guc)
i915_ggtt_disable_guc(dev_priv);
intel_guc_ads_destroy(guc);
intel_guc_log_destroy(guc);
intel_guc_log_destroy(&guc->log);
guc_shared_data_destroy(guc);
}
......
This diff is collapsed.
......@@ -25,11 +25,12 @@
#ifndef _INTEL_GUC_LOG_H_
#define _INTEL_GUC_LOG_H_
#include <linux/mutex.h>
#include <linux/relay.h>
#include <linux/workqueue.h>
#include "intel_guc_fwif.h"
struct drm_i915_private;
struct intel_guc;
/*
......@@ -59,12 +60,13 @@ struct intel_guc_log {
u32 flush_count[GUC_MAX_LOG_BUFFER];
};
int intel_guc_log_create(struct intel_guc *guc);
void intel_guc_log_destroy(struct intel_guc *guc);
void intel_guc_log_init_early(struct intel_guc *guc);
int intel_guc_log_control_get(struct intel_guc *guc);
int intel_guc_log_control_set(struct intel_guc *guc, u64 control_val);
int intel_guc_log_register(struct intel_guc *guc);
void intel_guc_log_unregister(struct intel_guc *guc);
void intel_guc_log_init_early(struct intel_guc_log *log);
int intel_guc_log_create(struct intel_guc_log *log);
int intel_guc_log_register(struct intel_guc_log *log);
void intel_guc_log_unregister(struct intel_guc_log *log);
void intel_guc_log_destroy(struct intel_guc_log *log);
int intel_guc_log_control_get(struct intel_guc_log *log);
int intel_guc_log_control_set(struct intel_guc_log *log, u64 control);
#endif
......@@ -229,7 +229,7 @@ int intel_uc_register(struct drm_i915_private *i915)
return 0;
if (i915_modparams.guc_log_level)
ret = intel_guc_log_register(&i915->guc);
ret = intel_guc_log_register(&i915->guc.log);
return ret;
}
......@@ -240,7 +240,7 @@ void intel_uc_unregister(struct drm_i915_private *i915)
return;
if (i915_modparams.guc_log_level)
intel_guc_log_unregister(&i915->guc);
intel_guc_log_unregister(&i915->guc.log);
}
static int guc_enable_communication(struct intel_guc *guc)
......
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