]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/i915/display: add lock while printing frontbuffer tracking bits to debugfs
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Mon, 14 Aug 2023 16:34:45 +0000 (19:34 +0300)
committerJouni Högander <jouni.hogander@intel.com>
Thu, 24 Aug 2023 10:02:27 +0000 (13:02 +0300)
Add missing spin_lock/unlock

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230814163452.2925-1-juhapekka.heikkila@gmail.com
drivers/gpu/drm/i915/display/intel_display_debugfs.c

index 63c1fb9e479faa9a611f84517bc5b5d9f9a81d2b..f05b52381a831b2fcfb8fb34bed51268cbfd6d29 100644 (file)
@@ -43,12 +43,16 @@ static int i915_frontbuffer_tracking(struct seq_file *m, void *unused)
 {
        struct drm_i915_private *dev_priv = node_to_i915(m->private);
 
+       spin_lock(&dev_priv->display.fb_tracking.lock);
+
        seq_printf(m, "FB tracking busy bits: 0x%08x\n",
                   dev_priv->display.fb_tracking.busy_bits);
 
        seq_printf(m, "FB tracking flip bits: 0x%08x\n",
                   dev_priv->display.fb_tracking.flip_bits);
 
+       spin_unlock(&dev_priv->display.fb_tracking.lock);
+
        return 0;
 }