drm/i915/guc: Don't store runtime GuC log level in modparam
Currently we are using modparam as placeholder for GuC log level. Stop doing this and keep runtime GuC level in intel_guc_log struct. v2: - rename functions intel_guc_log_level_[get|set] to intel_guc_log_[get|set]_level (Michał Wajdeczko) - remove GEM_BUG_ON from intel_guc_log_get_level() (Michał Wajdeczko) Signed-off-by: Piotr Piórkowski <piotr.piorkowski@intel.com> Cc: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Michał Winiarski <michal.winiarski@intel.com> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Link: https://patchwork.freedesktop.org/patch/msgid/20180604141947.8299-1-piotr.piorkowski@intel.com
This commit is contained in:

committed by
Chris Wilson

父節點
a9ded78535
當前提交
50935ac767
@@ -203,13 +203,11 @@ void intel_guc_fini(struct intel_guc *guc)
|
||||
guc_shared_data_destroy(guc);
|
||||
}
|
||||
|
||||
static u32 get_log_control_flags(void)
|
||||
static u32 guc_ctl_debug_flags(struct intel_guc *guc)
|
||||
{
|
||||
u32 level = i915_modparams.guc_log_level;
|
||||
u32 level = intel_guc_log_get_level(&guc->log);
|
||||
u32 flags = 0;
|
||||
|
||||
GEM_BUG_ON(level < 0);
|
||||
|
||||
if (!GUC_LOG_LEVEL_IS_ENABLED(level))
|
||||
flags |= GUC_LOG_DEFAULT_DISABLED;
|
||||
|
||||
@@ -250,7 +248,7 @@ void intel_guc_init_params(struct intel_guc *guc)
|
||||
|
||||
params[GUC_CTL_LOG_PARAMS] = guc->log.flags;
|
||||
|
||||
params[GUC_CTL_DEBUG] = get_log_control_flags();
|
||||
params[GUC_CTL_DEBUG] = guc_ctl_debug_flags(guc);
|
||||
|
||||
/* If GuC submission is enabled, set up additional parameters here */
|
||||
if (USES_GUC_SUBMISSION(dev_priv)) {
|
||||
|
Reference in New Issue
Block a user