On Thu, 16 Oct 2025, Ville Syrjala <[email protected]> wrote:
> From: Ville Syrjälä <[email protected]>
>
> I want to hide the kref from the high level frontbuffer code.
> To that end abstract the kref_get() in intel_frontbuffer_queue_flush()
> (which is the only high level function that needs this) as a new
> intel_frontbuffer_ref().
>
> Acked-by: Jani Nikula <[email protected]>

Upgrade to

Reviewed-by: Jani Nikula <[email protected]>


> Signed-off-by: Ville Syrjälä <[email protected]>
> ---
>  drivers/gpu/drm/i915/display/intel_frontbuffer.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c 
> b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index 02b06dfb9fee..e5f3f0d555a8 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -165,6 +165,11 @@ void __intel_fb_flush(struct intel_frontbuffer *front,
>               frontbuffer_flush(display, frontbuffer_bits, origin);
>  }
>  
> +static void intel_frontbuffer_ref(struct intel_frontbuffer *front)
> +{
> +     kref_get(&front->ref);
> +}
> +
>  static void intel_frontbuffer_flush_work(struct work_struct *work)
>  {
>       struct intel_frontbuffer *front =
> @@ -186,7 +191,7 @@ void intel_frontbuffer_queue_flush(struct 
> intel_frontbuffer *front)
>       if (!front)
>               return;
>  
> -     kref_get(&front->ref);
> +     intel_frontbuffer_ref(front);
>       if (!schedule_work(&front->flush_work))
>               intel_frontbuffer_put(front);
>  }

-- 
Jani Nikula, Intel

Reply via email to