[Intel-gfx] [PATCH] drm/i915/display: add lock while printing frontbuffer tracking bits to debugfs

Hogander, Jouni jouni.hogander at intel.com
Mon Aug 21 06:33:03 UTC 2023


On Mon, 2023-08-14 at 19:34 +0300, Juha-Pekka Heikkila wrote:
> Add missing spin_lock/unlock
> 
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>

Reviewed-by: Jouni Högander <jouni.hogander at intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_debugfs.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> index 63c1fb9e479f..f05b52381a83 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_debugfs.c
> @@ -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;
>  }
>  



More information about the Intel-gfx mailing list