Commit 5db18567 authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by John Harrison

drm/i915/guc: drop guc_communication_enabled

The function is only used from within GEM_BUG_ON(), which is causing
warnings with Wunneeded-internal-declaration in some builds. Since the
function is a simple wrapper around a CT function, we can just call the
CT function directly instead.

Fixes: 1fb12c58 ("drm/i915/guc: skip disabling CTBs before sanitizing the GuC")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Signed-off-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210823163137.19770-1-daniele.ceraolospurio@intel.com
parent f123efeb
...@@ -172,11 +172,6 @@ void intel_uc_driver_remove(struct intel_uc *uc) ...@@ -172,11 +172,6 @@ void intel_uc_driver_remove(struct intel_uc *uc)
__uc_free_load_err_log(uc); __uc_free_load_err_log(uc);
} }
static inline bool guc_communication_enabled(struct intel_guc *guc)
{
return intel_guc_ct_enabled(&guc->ct);
}
/* /*
* Events triggered while CT buffers are disabled are logged in the SCRATCH_15 * Events triggered while CT buffers are disabled are logged in the SCRATCH_15
* register using the same bits used in the CT message payload. Since our * register using the same bits used in the CT message payload. Since our
...@@ -210,7 +205,7 @@ static void guc_get_mmio_msg(struct intel_guc *guc) ...@@ -210,7 +205,7 @@ static void guc_get_mmio_msg(struct intel_guc *guc)
static void guc_handle_mmio_msg(struct intel_guc *guc) static void guc_handle_mmio_msg(struct intel_guc *guc)
{ {
/* we need communication to be enabled to reply to GuC */ /* we need communication to be enabled to reply to GuC */
GEM_BUG_ON(!guc_communication_enabled(guc)); GEM_BUG_ON(!intel_guc_ct_enabled(&guc->ct));
spin_lock_irq(&guc->irq_lock); spin_lock_irq(&guc->irq_lock);
if (guc->mmio_msg) { if (guc->mmio_msg) {
...@@ -226,7 +221,7 @@ static int guc_enable_communication(struct intel_guc *guc) ...@@ -226,7 +221,7 @@ static int guc_enable_communication(struct intel_guc *guc)
struct drm_i915_private *i915 = gt->i915; struct drm_i915_private *i915 = gt->i915;
int ret; int ret;
GEM_BUG_ON(guc_communication_enabled(guc)); GEM_BUG_ON(intel_guc_ct_enabled(&guc->ct));
ret = i915_inject_probe_error(i915, -ENXIO); ret = i915_inject_probe_error(i915, -ENXIO);
if (ret) if (ret)
...@@ -662,7 +657,7 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication) ...@@ -662,7 +657,7 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication)
return 0; return 0;
/* Make sure we enable communication if and only if it's disabled */ /* Make sure we enable communication if and only if it's disabled */
GEM_BUG_ON(enable_communication == guc_communication_enabled(guc)); GEM_BUG_ON(enable_communication == intel_guc_ct_enabled(&guc->ct));
if (enable_communication) if (enable_communication)
guc_enable_communication(guc); guc_enable_communication(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