From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Nikula, Jani" <jani.nikula@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 6/7] drm/i915/frontbuffer: call parent interface directly
Date: Fri, 6 Mar 2026 07:05:47 +0000 [thread overview]
Message-ID: <baa51e899fd242ad6563492dceee124f302e9daa.camel@intel.com> (raw)
In-Reply-To: <7451574d6840fe9a4af16d2d6b81ffb7739b5b76.1772475391.git.jani.nikula@intel.com>
On Mon, 2026-03-02 at 20:17 +0200, Jani Nikula wrote:
> Do away with the redundant intel_frontbuffer_get(),
> intel_frontbuffer_put(), and intel_frontbuffer_ref() functions, and
> call
> the parent interface functions directly.
You could have left these as they are with an idea that everything
related intel_frontbuffer goes via interfaces in intel_frontbuffer.h.
Now only these two are via parent interface. Patch is ok and I don't
have strong opinion on this:
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fb.c | 8 +++----
> .../gpu/drm/i915/display/intel_frontbuffer.c | 23 +++--------------
> --
> .../gpu/drm/i915/display/intel_frontbuffer.h | 5 ----
> 3 files changed, 7 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fb.c
> b/drivers/gpu/drm/i915/display/intel_fb.c
> index 6be07d8a7e81..49c6ca9d94c6 100644
> --- a/drivers/gpu/drm/i915/display/intel_fb.c
> +++ b/drivers/gpu/drm/i915/display/intel_fb.c
> @@ -2113,7 +2113,7 @@ static void
> intel_user_framebuffer_destroy(struct drm_framebuffer *fb)
>
> intel_fb_bo_framebuffer_fini(intel_fb_bo(fb));
>
> - intel_frontbuffer_put(intel_fb->frontbuffer);
> + intel_parent_frontbuffer_put(display, intel_fb-
> >frontbuffer);
>
> kfree(intel_fb->panic);
> kfree(intel_fb);
> @@ -2221,10 +2221,10 @@ int intel_framebuffer_init(struct
> intel_framebuffer *intel_fb,
> return -ENOMEM;
>
> /*
> - * intel_frontbuffer_get() must be done before
> + * intel_parent_frontbuffer_get() must be done before
> * intel_fb_bo_framebuffer_init() to avoid set_tiling vs.
> addfb race.
> */
> - intel_fb->frontbuffer = intel_frontbuffer_get(obj);
> + intel_fb->frontbuffer =
> intel_parent_frontbuffer_get(display, obj);
> if (!intel_fb->frontbuffer) {
> ret = -ENOMEM;
> goto err_free_panic;
> @@ -2335,7 +2335,7 @@ int intel_framebuffer_init(struct
> intel_framebuffer *intel_fb,
> err_bo_framebuffer_fini:
> intel_fb_bo_framebuffer_fini(obj);
> err_frontbuffer_put:
> - intel_frontbuffer_put(intel_fb->frontbuffer);
> + intel_parent_frontbuffer_put(display, intel_fb-
> >frontbuffer);
> err_free_panic:
> kfree(intel_fb->panic);
>
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> index a355dc064528..61ce82f85dad 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.c
> @@ -164,18 +164,13 @@ void __intel_fb_flush(struct intel_frontbuffer
> *front,
> frontbuffer_flush(display, frontbuffer_bits,
> origin);
> }
>
> -static void intel_frontbuffer_ref(struct intel_frontbuffer *front)
> -{
> - intel_parent_frontbuffer_ref(front->display, front);
> -}
> -
> static void intel_frontbuffer_flush_work(struct work_struct *work)
> {
> struct intel_frontbuffer *front =
> container_of(work, struct intel_frontbuffer,
> flush_work);
>
> intel_frontbuffer_flush(front, ORIGIN_DIRTYFB);
> - intel_frontbuffer_put(front);
> + intel_parent_frontbuffer_put(front->display, front);
> }
>
> /**
> @@ -190,9 +185,9 @@ void intel_frontbuffer_queue_flush(struct
> intel_frontbuffer *front)
> if (!front)
> return;
>
> - intel_frontbuffer_ref(front);
> + intel_parent_frontbuffer_ref(front->display, front);
> if (!schedule_work(&front->flush_work))
> - intel_frontbuffer_put(front);
> + intel_parent_frontbuffer_put(front->display, front);
> }
>
> void intel_frontbuffer_init(struct intel_frontbuffer *front, struct
> drm_device *drm)
> @@ -207,18 +202,6 @@ void intel_frontbuffer_fini(struct
> intel_frontbuffer *front)
> drm_WARN_ON(front->display->drm, atomic_read(&front->bits));
> }
>
> -struct intel_frontbuffer *intel_frontbuffer_get(struct
> drm_gem_object *obj)
> -{
> - struct intel_display *display = to_intel_display(obj->dev);
> -
> - return intel_parent_frontbuffer_get(display, obj);
> -}
> -
> -void intel_frontbuffer_put(struct intel_frontbuffer *front)
> -{
> - intel_parent_frontbuffer_put(front->display, front);
> -}
> -
> /**
> * intel_frontbuffer_track - update frontbuffer tracking
> * @old: current buffer for the frontbuffer slots
> diff --git a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
> b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
> index 22677acb4c06..c9a22b6ccfd6 100644
> --- a/drivers/gpu/drm/i915/display/intel_frontbuffer.h
> +++ b/drivers/gpu/drm/i915/display/intel_frontbuffer.h
> @@ -66,11 +66,6 @@ struct intel_frontbuffer {
> void intel_frontbuffer_flip(struct intel_display *display,
> unsigned frontbuffer_bits);
>
> -void intel_frontbuffer_put(struct intel_frontbuffer *front);
> -
> -struct intel_frontbuffer *
> -intel_frontbuffer_get(struct drm_gem_object *obj);
> -
> void __intel_fb_invalidate(struct intel_frontbuffer *front,
> enum fb_op_origin origin,
> unsigned int frontbuffer_bits);
next prev parent reply other threads:[~2026-03-06 7:05 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-02 18:17 [PATCH 0/7] drm/{i915, xe}/frontbuffer: refactor, move calls to parent interface Jani Nikula
2026-03-02 18:17 ` [PATCH 1/7] drm/i915/gem: relocate __i915_gem_object_{flush, invalidate}_frontbuffer() Jani Nikula
2026-03-04 14:20 ` Hogander, Jouni
2026-03-11 10:12 ` Jani Nikula
2026-03-02 18:17 ` [PATCH 2/7] drm/i915/gem: unify i915 gem object frontbuffer function names Jani Nikula
2026-03-05 6:41 ` Hogander, Jouni
2026-03-02 18:17 ` [PATCH 3/7] drm/i915/overlay: convert from struct intel_frontbuffer to i915_frontbuffer Jani Nikula
2026-03-05 7:07 ` Hogander, Jouni
2026-03-02 18:17 ` [PATCH 4/7] drm/intel: fix @dpt kernel-doc for parent interface Jani Nikula
2026-03-05 11:37 ` Hogander, Jouni
2026-03-02 18:17 ` [PATCH 5/7] drm/{i915, xe}/frontbuffer: move frontbuffer handling to " Jani Nikula
2026-03-06 6:54 ` Hogander, Jouni
2026-03-02 18:17 ` [PATCH 6/7] drm/i915/frontbuffer: call parent interface directly Jani Nikula
2026-03-06 7:05 ` Hogander, Jouni [this message]
2026-03-02 18:17 ` [PATCH 7/7] drm/i915/frontbuffer: reduce fb for frontbuffer abbreviation usage Jani Nikula
2026-03-06 7:25 ` Hogander, Jouni
2026-03-02 23:14 ` ✗ CI.checkpatch: warning for drm/{i915, xe}/frontbuffer: refactor, move calls to parent interface Patchwork
2026-03-02 23:16 ` ✓ CI.KUnit: success " Patchwork
2026-03-03 0:31 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-03 8:17 ` ✗ Xe.CI.FULL: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=baa51e899fd242ad6563492dceee124f302e9daa.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox