The use of on_each_cpu() with a no-op callback in __vlv_punit_get() was a
conservative safeguard to ensure all CPUs were active before accessing the
sideband, as introduced in commit a75d035fedbd ("drm/i915: Disable
preemption and sleeping while using the punit sideband").

However, this wake-up operation is redundant. The preceding call to
cpu_latency_qos_update_request() already triggers cpu_latency_qos_apply(),
which internally invokes wake_up_all_idle_cpus(). This mechanism reliably
ensures that all CPUs exit idle states and are sufficiently active to
avoid the known hardware errata.

Removing the on_each_cpu() call and its empty callback eliminates
unnecessary inter-CPU SMP overhead and simplifies the code path.

Signed-off-by: Zhongqiu Han <quic_zhon...@quicinc.com>
---
 drivers/gpu/drm/i915/vlv_sideband.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/vlv_sideband.c 
b/drivers/gpu/drm/i915/vlv_sideband.c
index 114ae8eb9cd5..d93b608c04e4 100644
--- a/drivers/gpu/drm/i915/vlv_sideband.c
+++ b/drivers/gpu/drm/i915/vlv_sideband.c
@@ -24,10 +24,6 @@
 /* Private register write, double-word addressing, non-posted */
 #define SB_CRWRDA_NP   0x07
 
-static void ping(void *info)
-{
-}
-
 static void __vlv_punit_get(struct drm_i915_private *i915)
 {
        iosf_mbi_punit_acquire();
@@ -42,10 +38,8 @@ static void __vlv_punit_get(struct drm_i915_private *i915)
         * specific. Hence we presume the workaround needs only be applied
         * to the Valleyview P-unit and not all sideband communications.
         */
-       if (IS_VALLEYVIEW(i915)) {
+       if (IS_VALLEYVIEW(i915))
                cpu_latency_qos_update_request(&i915->vlv_iosf_sb.qos, 0);
-               on_each_cpu(ping, NULL, 1);
-       }
 }
 
 static void __vlv_punit_put(struct drm_i915_private *i915)
-- 
2.43.0

Reply via email to