<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/gpu/drm/i915/gem/i915_gem_object_frontbuffer.h, branch master</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=master</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2026-03-11T09:32:10+00:00</updated>
<entry>
<title>drm/{i915, xe}/frontbuffer: move frontbuffer handling to parent interface</title>
<updated>2026-03-11T09:32:10+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2026-03-02T18:17:37+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=2cca25160d159e6351e3273b088db0b4f359ef6a'/>
<id>urn:sha1:2cca25160d159e6351e3273b088db0b4f359ef6a</id>
<content type='text'>
Move the get/put/ref/flush_for_display calls to the display parent
interface.

For i915, move the hooks next to the other i915 core frontbuffer code in
i915_gem_object_frontbuffer.c. For xe, add new file xe_frontbuffer.c for
the same.

Note: The intel_frontbuffer_flush() calls from
i915_gem_object_frontbuffer.c will partially route back to i915 core via
the parent interface. This is less than stellar.

Reviewed-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Link: https://patch.msgid.link/f69b967ed82bbcfd60ffa77ba197b26a1399f09f.1772475391.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/overlay: convert from struct intel_frontbuffer to i915_frontbuffer</title>
<updated>2026-03-11T09:32:10+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2026-03-02T18:17:35+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=df88ba8904ce23483889e3397814e91366e729b0'/>
<id>urn:sha1:df88ba8904ce23483889e3397814e91366e729b0</id>
<content type='text'>
The intel_frontbuffer_get() and intel_frontbuffer_put() calls are routed
through intel_frontbuffer.c to i915_gem_object_frontbuffer.c. We might
as well call the functions directly, instead of going through display
code. This would only get worse with get/put being moved to the parent
interface.

To make this easier, convert overlay code from struct intel_frontbuffer
to struct i915_frontbuffer, and add a
i915_gem_object_frontbuffer_track() wrapper for clarity.

Reviewed-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Link: https://patch.msgid.link/829b304a6451e80fbce554bdc7788077245e803a.1772475391.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/gem: unify i915 gem object frontbuffer function names</title>
<updated>2026-03-11T09:32:10+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2026-03-02T18:17:34+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e18eec6c299a194f3efaedc61f05d881697f07a8'/>
<id>urn:sha1:e18eec6c299a194f3efaedc61f05d881697f07a8</id>
<content type='text'>
Many of the i915 gem object frontbuffer function names follow the file
name as prefix. Follow suit with the remaining functions, renaming them
i915_gem_object_frontbuffer_*().

Reviewed-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Link: https://patch.msgid.link/3415b59497f2c3a79586600d259eeaf58be73498.1772475391.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/gem: s/i915_gem_object_get_frontbuffer/i915_gem_object_frontbuffer_lookup/</title>
<updated>2025-11-07T15:43:18+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2025-10-16T18:54:08+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=f85cd99e2c06cf38d97210885f31c8a0405c3341'/>
<id>urn:sha1:f85cd99e2c06cf38d97210885f31c8a0405c3341</id>
<content type='text'>
The i915_gem_object_get_frontbuffer() name is rather confusing wrt.
intel_frontbuffer_get(). Rename to i915_gem_object_frontbuffer_lookup()
to make things less confusing.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patch.msgid.link/20251016185408.22735-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/frontbuffer: Fix intel_frontbuffer lifetime handling</title>
<updated>2025-11-07T15:38:48+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2025-10-16T18:54:07+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=965930962a41cdb24a4b0e1c2f580b20b139bacb'/>
<id>urn:sha1:965930962a41cdb24a4b0e1c2f580b20b139bacb</id>
<content type='text'>
The current attempted split between xe/i915 vs. display
for intel_frontbuffer is a mess:
- the i915 rcu leaks through the interface to the display side
- the obj-&gt;frontbuffer write-side is now protected by a display
  specific spinlock even though the actual obj-&gt;framebuffer
  pointer lives in a i915 specific structure
- the kref is getting poked directly from both sides
- i915_active is still on the display side

Clean up the mess by moving everything about the frontbuffer
lifetime management to the i915/xe side:
- the rcu usage is now completely contained in i915
- frontbuffer_lock is moved into i915
- kref is on the i915/xe side (xe needs the refcount as well
  due to intel_frontbuffer_queue_flush()-&gt;intel_frontbuffer_ref())
- the bo (and its refcounting) is no longer on the display side
- i915_active is contained in i915

I was pondering whether we could do this in some kind of smaller
steps, and perhaps we could, but it would probably have to start
with a bunch of reverts (which for sure won't go cleanly anymore).
So not convinced it's worth the hassle.

Acked-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patch.msgid.link/20251016185408.22735-10-ville.syrjala@linux.intel.com
</content>
</entry>
<entry>
<title>drm/i915/frontbuffer: Split fb_tracking.lock into two</title>
<updated>2025-11-07T15:38:02+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2025-10-16T18:54:04+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=3afef438eee38947ba7e8bb9b23d56d77c25f14b'/>
<id>urn:sha1:3afef438eee38947ba7e8bb9b23d56d77c25f14b</id>
<content type='text'>
Our fb_tracking.lock is serving a double duty:
- protects fb_tracking.busy_bits
- provides the write-side protection for obj-&gt;frontbuffer

Split obj-&gt;frontbuffer role into a separate lock so that
we can clean up the current mess with the frontbuffer lifetime
management.

Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patch.msgid.link/20251016185408.22735-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/i915/frontbuffer: Move bo refcounting intel_frontbuffer_{get,release}()</title>
<updated>2025-10-09T18:01:48+00:00</updated>
<author>
<name>Ville Syrjälä</name>
<email>ville.syrjala@linux.intel.com</email>
</author>
<published>2025-10-03T14:57:30+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=eb4d490729a5fd8dc5a76d334f8d01fec7c14bbe'/>
<id>urn:sha1:eb4d490729a5fd8dc5a76d334f8d01fec7c14bbe</id>
<content type='text'>
Currently xe's intel_frontbuffer implementation forgets to
hold a reference on the bo. This makes the entire thing
extremely fragile as the cleanup order now depends on bo
references held by other things
(namely intel_fb_bo_framebuffer_fini()).

Move the bo refcounting to intel_frontbuffer_{get,release}()
so that both i915 and xe do this the same way.

I first tried to fix this by having xe do the refcounting
from its intel_bo_set_frontbuffer() implementation
(which is what i915 does currently), but turns out xe's
drm_gem_object_free() can sleep and thus drm_gem_object_put()
isn't safe to call while we hold fb_tracking.lock.

Fixes: 10690b8a49bc ("drm/i915/display: Add intel_fb_bo_framebuffer_fini")
Signed-off-by: Ville Syrjälä &lt;ville.syrjala@linux.intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20251003145734.7634-2-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
</content>
</entry>
<entry>
<title>drm/{i915,xe}: convert i915 and xe display members into pointers</title>
<updated>2025-05-16T08:15:16+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2025-05-07T15:22:54+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=96b451d53ae9760858c547081532b01038f00912'/>
<id>urn:sha1:96b451d53ae9760858c547081532b01038f00912</id>
<content type='text'>
As the first step towards making struct intel_display an opaque pointer
in i915 and xe drivers, convert the struct drm_i915_private and struct
xe_device display members into pointers.

Initially, add temporary struct intel_display __display members, and
point display at it to avoid dynamic allocation. In the future, we can
drop this, and switch to dynamic allocation.

The conversion is done simply with sed:

sed -i 's/&amp;\([a-zA-Z0-9_&gt;.-]*\)\(dev_priv\|i915\|xe\)-&gt;display\([^.]\)/\1\2-&gt;display\3/g' \
    $(git ls-files -- drivers/gpu/drm/i915 drivers/gpu/drm/xe)

sed -i 's/\(dev_priv\|i915\|xe\)-&gt;display\./\1-&gt;display-&gt;/g' \
    $(git ls-files -- drivers/gpu/drm/i915 drivers/gpu/drm/xe)

With a couple of manual tweaks on top.

v2: Initialize i915-&gt;display also in selftest mock_gem_device()

Reviewed-by: Gustavo Sousa &lt;gustavo.sousa@intel.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://lore.kernel.org/r/20250507152254.2398934-1-jani.nikula@intel.com
</content>
</entry>
<entry>
<title>drm/i915/display: Move releasing gem object away from fb tracking</title>
<updated>2023-10-23T06:06:10+00:00</updated>
<author>
<name>Jouni Högander</name>
<email>jouni.hogander@intel.com</email>
</author>
<published>2023-10-12T07:21:57+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=501069dad5214fafe1b8ba38fa26a5d07df784c3'/>
<id>urn:sha1:501069dad5214fafe1b8ba38fa26a5d07df784c3</id>
<content type='text'>
As a preparation for Xe we want to remove all i915_gem_object details away
from frontbuffer tacking code. Due to this move releasing gem object
reference to i915_gem_object_set_frontbuffer.

Signed-off-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Reviewed-by: Juha-Pekka Heikkila &lt;juhapekka.heikkila@gmail.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20231012072158.4115795-2-jouni.hogander@intel.com
</content>
</entry>
<entry>
<title>drm/i915: add minimal i915_gem_object_frontbuffer.h</title>
<updated>2023-08-31T15:41:34+00:00</updated>
<author>
<name>Jani Nikula</name>
<email>jani.nikula@intel.com</email>
</author>
<published>2023-08-30T08:51:27+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c1464a89e1a41695d5bda47d5c27923b1802ce00'/>
<id>urn:sha1:c1464a89e1a41695d5bda47d5c27923b1802ce00</id>
<content type='text'>
Split out frontbuffer related declarations and static inlines from
gem/i915_gem_object.h into new gem/i915_gem_object_frontbuffer.h.

The main goal is to reduce header interdependencies. With
gem/i915_gem_object.h including display/intel_frontbuffer.h,
modification of the latter causes a whopping 300+ objects to be rebuilt,
while many of the source files actually needing it aren't explicitly
including it at all.

After the change, only 21 objects depend on display/intel_frontbuffer.h,
directly or indirectly.

Cc: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Reviewed-by: Jouni Högander &lt;jouni.hogander@intel.com&gt;
Signed-off-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20230830085127.2416842-1-jani.nikula@intel.com
</content>
</entry>
</feed>
