<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/drm/drm_framebuffer.h, branch v6.6.132</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.6.132'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-17T16:35:14+00:00</updated>
<entry>
<title>drm/framebuffer: Acquire internal references on GEM handles</title>
<updated>2025-07-17T16:35:14+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2025-07-07T13:11:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2e2e9b3d708473040a08ab884f7dc2369752bb69'/>
<id>urn:sha1:2e2e9b3d708473040a08ab884f7dc2369752bb69</id>
<content type='text'>
commit f6bfc9afc7510cb5e6fbe0a17c507917b0120280 upstream.

Acquire GEM handles in drm_framebuffer_init() and release them in
the corresponding drm_framebuffer_cleanup(). Ties the handle's
lifetime to the framebuffer. Not all GEM buffer objects have GEM
handles. If not set, no refcounting takes place. This is the case
for some fbdev emulation. This is not a problem as these GEM objects
do not use dma-bufs and drivers will not release them while fbdev
emulation is running. Framebuffer flags keep a bit per color plane
of which the framebuffer holds a GEM handle reference.

As all drivers use drm_framebuffer_init(), they will now all hold
dma-buf references as fixed in commit 5307dce878d4 ("drm/gem: Acquire
references on GEM handles for framebuffers").

In the GEM framebuffer helpers, restore the original ref counting
on buffer objects. As the helpers for handle refcounting are now
no longer called from outside the DRM core, unexport the symbols.

v3:
- don't mix internal flags with mode flags (Christian)
v2:
- track framebuffer handle refs by flag
- drop gma500 cleanup (Christian)

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Fixes: 5307dce878d4 ("drm/gem: Acquire references on GEM handles for framebuffers")
Reported-by: Bert Karwatzki &lt;spasswolf@web.de&gt;
Closes: https://lore.kernel.org/dri-devel/20250703115915.3096-1-spasswolf@web.de/
Tested-by: Bert Karwatzki &lt;spasswolf@web.de&gt;
Tested-by: Mario Limonciello &lt;superm1@kernel.org&gt;
Tested-by: Borislav Petkov (AMD) &lt;bp@alien8.de&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: Anusha Srivatsa &lt;asrivats@redhat.com&gt;
Cc: Christian König &lt;christian.koenig@amd.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Sumit Semwal &lt;sumit.semwal@linaro.org&gt;
Cc: "Christian König" &lt;christian.koenig@amd.com&gt;
Cc: linux-media@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Christian König &lt;christian.koenig@amd.com&gt;
Link: https://lore.kernel.org/r/20250707131224.249496-1-tzimmermann@suse.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>drm/fb: Improve drm_framebuffer.offsets documentation</title>
<updated>2022-07-09T13:58:52+00:00</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert@linux-m68k.org</email>
</author>
<published>2022-07-06T13:16:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6de745238aa30529778a26622a430dfcb171b089'/>
<id>urn:sha1:6de745238aa30529778a26622a430dfcb171b089</id>
<content type='text'>
Fix various spelling and grammar mistakes in the kerneldoc comments
documenting the offsets member in the drm_framebuffer structure:
  - s/laytou/layout/,
  - Add missing "is",
  - s/it/its/.

Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Acked-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Reviewed-by: Simon Ser &lt;contact@emersion.fr&gt;
Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/33fda13b500b39645e7363806c6e458e915b581e.1657113304.git.geert@linux-m68k.org
</content>
</entry>
<entry>
<title>drm: Define DRM_FORMAT_MAX_PLANES</title>
<updated>2021-08-02T14:41:20+00:00</updated>
<author>
<name>Thomas Zimmermann</name>
<email>tzimmermann@suse.de</email>
</author>
<published>2021-07-30T18:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=279cc2e9543eb357c0ef299cf398b2e74a021f6b'/>
<id>urn:sha1:279cc2e9543eb357c0ef299cf398b2e74a021f6b</id>
<content type='text'>
DRM uses a magic number of 4 for the maximum number of planes per color
format. Declare this constant via DRM_FORMAT_MAX_PLANES and update the
related code. Some code depends on the length of arrays that are now
declared with DRM_FORMAT_MAX_PLANES. Convert it from '4' to ARRAY_SIZE.

v2:
	* mention usage of ARRAY_SIZE() in the commit message (Maxime)
	* also fix error handling in drm_gem_fb_init_with_funcs()
	  (kernel test robot)
	* include &lt;drm/drm_fourcc.h&gt; for DRM_FORMAT_MAX_PLANES

Signed-off-by: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20210730183511.20080-2-tzimmermann@suse.de
</content>
</entry>
<entry>
<title>drm/core: Calculate bpp in afbc helper</title>
<updated>2020-04-01T12:11:22+00:00</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-03-31T15:53:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcf6293d7ae931159fac4fbd9924b0276f1edabd'/>
<id>urn:sha1:bcf6293d7ae931159fac4fbd9924b0276f1edabd</id>
<content type='text'>
Some drivers (komeda, malidp) don't set anything in cpp. If that is the
case the right value can be inferred from the format. Then the "bpp" member
can be eliminated from struct drm_afbc_framebuffer.

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200331155308.6345-3-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>drm/fb: fix kernel-doc in drm_framebuffer.h</title>
<updated>2020-03-30T19:01:43+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2020-03-28T13:20:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=303973aaef1204fa205c1dccc6f8cac15812a8c9'/>
<id>urn:sha1:303973aaef1204fa205c1dccc6f8cac15812a8c9</id>
<content type='text'>
Fix following warnings:
drm_framebuffer.h:342: warning: Function parameter or member 'block_width' not described in 'drm_afbc_framebuffer'
drm_framebuffer.h:342: warning: Function parameter or member 'block_height' not described in 'drm_afbc_framebuffer'

Trivial spelling mistakes.

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Fixes: 55f7f72753ab ("drm/core: Add drm_afbc_framebuffer and a corresponding helper")
Cc: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Cc: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Cc: James Qian Wang &lt;james.qian.wang@arm.com&gt;
Cc: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;mripard@kernel.org&gt;
Cc: Thomas Zimmermann &lt;tzimmermann@suse.de&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200328132025.19910-3-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm/core: Add drm_afbc_framebuffer and a corresponding helper</title>
<updated>2020-03-18T10:22:05+00:00</updated>
<author>
<name>Andrzej Pietrasiewicz</name>
<email>andrzej.p@collabora.com</email>
</author>
<published>2020-03-11T14:55:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55f7f72753abdd46f35d027a25b43969dba56fac'/>
<id>urn:sha1:55f7f72753abdd46f35d027a25b43969dba56fac</id>
<content type='text'>
The new struct contains afbc-specific data.

The new function can be used by drivers which support afbc to complete
the preparation of struct drm_afbc_framebuffer. It must be called after
allocating the said struct and calling drm_gem_fb_init_with_funcs().

Signed-off-by: Andrzej Pietrasiewicz &lt;andrzej.p@collabora.com&gt;
Reviewed-by: Emil Velikov &lt;emil.velikov@collabora.com&gt;
Reviewed-by: James Qian Wang &lt;james.qian.wang@arm.com&gt;
Acked-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20200311145541.29186-3-andrzej.p@collabora.com
</content>
</entry>
<entry>
<title>drm/fb: document dirty helper better</title>
<updated>2019-06-11T16:02:48+00:00</updated>
<author>
<name>Daniel Vetter</name>
<email>daniel.vetter@ffwll.ch</email>
</author>
<published>2019-06-11T11:28:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecf79e7ca1565e4d36482aa4d2950bc397313425'/>
<id>urn:sha1:ecf79e7ca1565e4d36482aa4d2950bc397313425</id>
<content type='text'>
Apparently little known fact that there's no need to hand-roll your own
anymore. Cc'ing a bunch of driver people who might want to know this
too.

v2: s/none/known/ (Chris Wilson)

Cc: Rob Clark &lt;robdclark@gmail.com&gt;
Cc: Sebastian Reichel &lt;sebastian.reichel@collabora.com&gt;
Cc: Tomi Valkeinen &lt;tomi.valkeinen@ti.com&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: Gerd Hoffmann &lt;kraxel@redhat.com&gt;
Cc: David Lechner &lt;david@lechnology.com&gt;
Cc: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Hans de Goede &lt;hdegoede@redhat.com&gt;
Reviewed-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@intel.com&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190611112859.16375-1-daniel.vetter@ffwll.ch
</content>
</entry>
<entry>
<title>drm: Forward-declare struct drm_format_info in drm_framebuffer.h</title>
<updated>2019-03-28T04:06:33+00:00</updated>
<author>
<name>Laurent Pinchart</name>
<email>laurent.pinchart+renesas@ideasonboard.com</email>
</author>
<published>2019-03-13T10:29:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2471e7a534b7c7b42803b175d2fcc2b9dca600c3'/>
<id>urn:sha1:2471e7a534b7c7b42803b175d2fcc2b9dca600c3</id>
<content type='text'>
drm_framebuffer.h makes use of a pointer to struct drm_format_info but
doesn't include drm_fourcc.h (neither directly nor indirectly).
Forward-declare the structure.

Signed-off-by: Laurent Pinchart &lt;laurent.pinchart+renesas@ideasonboard.com&gt;
Reviewed-by: Jani Nikula &lt;jani.nikula@intel.com&gt;
Reviewed-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
</content>
</entry>
<entry>
<title>drm: make drm_framebuffer.h self contained</title>
<updated>2019-01-09T21:11:28+00:00</updated>
<author>
<name>Sam Ravnborg</name>
<email>sam@ravnborg.org</email>
</author>
<published>2019-01-08T19:29:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=2513147dce2353eb6d1a947ab543e3758724362d'/>
<id>urn:sha1:2513147dce2353eb6d1a947ab543e3758724362d</id>
<content type='text'>
Add forward declaration and pull in include
file to make drm_framebuffer.h self contained.

While add it order include files alphabetically.

The use of TASK_COMM_LEN is the reason for including sched.h.
I could not see any good way to avoid this dependency,
and users of drm_framebuffer.comm already use
TASK_COMM_LEN to check for length etc.

v2:
- Added forward declaration of drm_gem_object (Noralf)
- Added ack from Noralf

Signed-off-by: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Acked-by: Noralf Trønnes &lt;noralf@tronnes.org&gt;
Cc: Maarten Lankhorst &lt;maarten.lankhorst@linux.intel.com&gt;
Cc: Maxime Ripard &lt;maxime.ripard@bootlin.com&gt;
Cc: Sean Paul &lt;sean@poorly.run&gt;
Cc: David Airlie &lt;airlied@linux.ie&gt;
Cc: Daniel Vetter &lt;daniel@ffwll.ch&gt;
Signed-off-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20190108192939.15255-4-sam@ravnborg.org
</content>
</entry>
<entry>
<title>drm: remove deprecated "drm_framebuffer_[un]reference" functions</title>
<updated>2018-11-24T21:12:55+00:00</updated>
<author>
<name>Fernando Ramos</name>
<email>greenfoo@gluegarage.com</email>
</author>
<published>2018-11-15T22:16:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=55b446209d041383934308f7f5fc38dee813218e'/>
<id>urn:sha1:55b446209d041383934308f7f5fc38dee813218e</id>
<content type='text'>
There are no more places where this (deprecated) function is being used
from, thus it can now be removed.

Signed-off-by: Fernando Ramos &lt;greenfoo@gluegarage.com&gt;
Reviewed-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Signed-off-by: Linus Walleij &lt;linus.walleij@linaro.org&gt;
Link: https://patchwork.freedesktop.org/patch/msgid/20181115221634.22715-8-greenfoo@gluegarage.com
</content>
</entry>
</feed>
