diff options
author | Sagar Arun Kamble <sagar.a.kamble@intel.com> | 2018-01-24 21:16:59 +0530 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-01-24 19:44:06 +0000 |
commit | 065dd5ad6c94fde283477016ecb9525e30622431 (patch) | |
tree | b1ea7f99ff3c06cb310ce8c76d727bf498821584 /drivers/gpu/drm/i915/intel_guc_log.c | |
parent | 70deeaddc6e6c51bb5e2b088dd92bb5a0e5b8d8a (diff) | |
download | linux-065dd5ad6c94fde283477016ecb9525e30622431.tar.bz2 |
drm/i915/guc: Update name and prototype of i915_guc_log_control
i915_guc_log_control is GuC interface and GuC APIs that are not user
facing should be named with "intel_guc" prefix hence we change name to
intel_guc_log_control. Also changed the parameter to intel_guc struct.
v2: Move log vma check to intel_guc_log_control (Michal)
Return -ENODEV when log isn't initialized. (Chris)
Suggested-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@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/1516808821-3638-4-git-send-email-sagar.a.kamble@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_guc_log.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_guc_log.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c index d10ec53f9290..cb10f7aeb042 100644 --- a/drivers/gpu/drm/i915/intel_guc_log.c +++ b/drivers/gpu/drm/i915/intel_guc_log.c @@ -637,13 +637,16 @@ void intel_guc_log_destroy(struct intel_guc *guc) i915_vma_unpin_and_release(&guc->log.vma); } -int i915_guc_log_control(struct drm_i915_private *dev_priv, u64 control_val) +int intel_guc_log_control(struct intel_guc *guc, u64 control_val) { - struct intel_guc *guc = &dev_priv->guc; + struct drm_i915_private *dev_priv = guc_to_i915(guc); bool enable_logging = control_val > 0; u32 verbosity; int ret; + if (!guc->log.vma) + return -ENODEV; + BUILD_BUG_ON(GUC_LOG_VERBOSITY_MIN); if (control_val > 1 + GUC_LOG_VERBOSITY_MAX) return -EINVAL; |