Skip to content

Commit 4154063

Browse files
dceraolojnikula
authored andcommitted
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: 1fb12c5 ("drm/i915/guc: skip disabling CTBs before sanitizing the GuC") Reported-by: kernel test robot <[email protected]> Signed-off-by: Daniele Ceraolo Spurio <[email protected]> Cc: Matthew Brost <[email protected]> Cc: John Harrison <[email protected]> Reviewed-by: Matthew Brost <[email protected]> Signed-off-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 5db1856) Signed-off-by: Jani Nikula <[email protected]>
1 parent c8dead5 commit 4154063

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/gpu/drm/i915/gt/uc/intel_uc.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,6 @@ void intel_uc_driver_remove(struct intel_uc *uc)
172172
__uc_free_load_err_log(uc);
173173
}
174174

175-
static inline bool guc_communication_enabled(struct intel_guc *guc)
176-
{
177-
return intel_guc_ct_enabled(&guc->ct);
178-
}
179-
180175
/*
181176
* Events triggered while CT buffers are disabled are logged in the SCRATCH_15
182177
* 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)
210205
static void guc_handle_mmio_msg(struct intel_guc *guc)
211206
{
212207
/* we need communication to be enabled to reply to GuC */
213-
GEM_BUG_ON(!guc_communication_enabled(guc));
208+
GEM_BUG_ON(!intel_guc_ct_enabled(&guc->ct));
214209

215210
spin_lock_irq(&guc->irq_lock);
216211
if (guc->mmio_msg) {
@@ -226,7 +221,7 @@ static int guc_enable_communication(struct intel_guc *guc)
226221
struct drm_i915_private *i915 = gt->i915;
227222
int ret;
228223

229-
GEM_BUG_ON(guc_communication_enabled(guc));
224+
GEM_BUG_ON(intel_guc_ct_enabled(&guc->ct));
230225

231226
ret = i915_inject_probe_error(i915, -ENXIO);
232227
if (ret)
@@ -662,7 +657,7 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication)
662657
return 0;
663658

664659
/* Make sure we enable communication if and only if it's disabled */
665-
GEM_BUG_ON(enable_communication == guc_communication_enabled(guc));
660+
GEM_BUG_ON(enable_communication == intel_guc_ct_enabled(&guc->ct));
666661

667662
if (enable_communication)
668663
guc_enable_communication(guc);

0 commit comments

Comments
 (0)