mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-21 04:53:46 -04:00
drm/i915: Rename global i915 to i915_modparams
Our global struct with params is named exactly the same way as new preferred name for the drm_i915_private function parameter. To avoid such name reuse lets use different name for the global. v5: pure rename v6: fix Credits-to: Coccinelle @@ identifier n; @@ ( - i915.n + i915_modparams.n ) Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Cc: Ville Syrjala <ville.syrjala@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Acked-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20170919193846.38060-1-michal.wajdeczko@intel.com
This commit is contained in:
committed by
Jani Nikula
parent
a3df2c857c
commit
4f044a88a8
@@ -144,7 +144,7 @@ static int guc_log_relay_file_create(struct intel_guc *guc)
|
||||
struct dentry *log_dir;
|
||||
int ret;
|
||||
|
||||
if (i915.guc_log_level < 0)
|
||||
if (i915_modparams.guc_log_level < 0)
|
||||
return 0;
|
||||
|
||||
/* For now create the log file in /sys/kernel/debug/dri/0 dir */
|
||||
@@ -480,7 +480,7 @@ err_runtime:
|
||||
guc_log_runtime_destroy(guc);
|
||||
err:
|
||||
/* logging will remain off */
|
||||
i915.guc_log_level = -1;
|
||||
i915_modparams.guc_log_level = -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -502,7 +502,8 @@ static void guc_flush_logs(struct intel_guc *guc)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = guc_to_i915(guc);
|
||||
|
||||
if (!i915.enable_guc_submission || (i915.guc_log_level < 0))
|
||||
if (!i915_modparams.enable_guc_submission ||
|
||||
(i915_modparams.guc_log_level < 0))
|
||||
return;
|
||||
|
||||
/* First disable the interrupts, will be renabled afterwards */
|
||||
@@ -529,8 +530,8 @@ int intel_guc_log_create(struct intel_guc *guc)
|
||||
|
||||
GEM_BUG_ON(guc->log.vma);
|
||||
|
||||
if (i915.guc_log_level > GUC_LOG_VERBOSITY_MAX)
|
||||
i915.guc_log_level = GUC_LOG_VERBOSITY_MAX;
|
||||
if (i915_modparams.guc_log_level > GUC_LOG_VERBOSITY_MAX)
|
||||
i915_modparams.guc_log_level = GUC_LOG_VERBOSITY_MAX;
|
||||
|
||||
/* The first page is to save log buffer state. Allocate one
|
||||
* extra page for others in case for overlap */
|
||||
@@ -555,7 +556,7 @@ int intel_guc_log_create(struct intel_guc *guc)
|
||||
|
||||
guc->log.vma = vma;
|
||||
|
||||
if (i915.guc_log_level >= 0) {
|
||||
if (i915_modparams.guc_log_level >= 0) {
|
||||
ret = guc_log_runtime_create(guc);
|
||||
if (ret < 0)
|
||||
goto err_vma;
|
||||
@@ -576,7 +577,7 @@ err_vma:
|
||||
i915_vma_unpin_and_release(&guc->log.vma);
|
||||
err:
|
||||
/* logging will be off */
|
||||
i915.guc_log_level = -1;
|
||||
i915_modparams.guc_log_level = -1;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -600,7 +601,7 @@ int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val)
|
||||
return -EINVAL;
|
||||
|
||||
/* This combination doesn't make sense & won't have any effect */
|
||||
if (!log_param.logging_enabled && (i915.guc_log_level < 0))
|
||||
if (!log_param.logging_enabled && (i915_modparams.guc_log_level < 0))
|
||||
return 0;
|
||||
|
||||
ret = guc_log_control(guc, log_param.value);
|
||||
@@ -610,7 +611,7 @@ int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val)
|
||||
}
|
||||
|
||||
if (log_param.logging_enabled) {
|
||||
i915.guc_log_level = log_param.verbosity;
|
||||
i915_modparams.guc_log_level = log_param.verbosity;
|
||||
|
||||
/* If log_level was set as -1 at boot time, then the relay channel file
|
||||
* wouldn't have been created by now and interrupts also would not have
|
||||
@@ -633,7 +634,7 @@ int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val)
|
||||
guc_flush_logs(guc);
|
||||
|
||||
/* As logging is disabled, update log level to reflect that */
|
||||
i915.guc_log_level = -1;
|
||||
i915_modparams.guc_log_level = -1;
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -641,7 +642,8 @@ int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val)
|
||||
|
||||
void i915_guc_log_register(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
if (!i915.enable_guc_submission || i915.guc_log_level < 0)
|
||||
if (!i915_modparams.enable_guc_submission ||
|
||||
(i915_modparams.guc_log_level < 0))
|
||||
return;
|
||||
|
||||
mutex_lock(&dev_priv->drm.struct_mutex);
|
||||
@@ -651,7 +653,7 @@ void i915_guc_log_register(struct drm_i915_private *dev_priv)
|
||||
|
||||
void i915_guc_log_unregister(struct drm_i915_private *dev_priv)
|
||||
{
|
||||
if (!i915.enable_guc_submission)
|
||||
if (!i915_modparams.enable_guc_submission)
|
||||
return;
|
||||
|
||||
mutex_lock(&dev_priv->drm.struct_mutex);
|
||||
|
||||
Reference in New Issue
Block a user